Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Action open/close doors

  1. #1
    iBot User
    Join Date
    Jun 2012
    Location
    Germany
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Exclamation Action open/close doors

    So I have the next problem:

    I'm doing my own script and the problem is that on my way there is 2 doors. I got no problem about opening them and close them after that but since my script is just with this action, when someone come and open the door and leave it like that my script don't detect such a thing which means he close the door and of course get stuck.

    Could someone help me with what I should do to no matter what my char go throw the door in case it's open instead of closing it and get stuck?

    Thanks ^^

  2. #2
    Banned
    Join Date
    May 2012
    Posts
    1,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    127
    Rep Power
    0
    Theres a few ways..Here is the way I do it:

    PHP Code:
    if toptileitem(32817,31274,6) == 4912 then
         useitem
    (4912,32817,31274,6)
    end 

  3. #3
    iBot User luesko's Avatar
    Join Date
    Jun 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    hey bugwt could you explain the wpt.XXX action to me?

    heres what i need defined

    pointer wpt
    .label
    .type
    .id
    .x
    .y
    .z


    example where used:-

    local monsters = {'Medusa','Serpent Spawn'}

    if maround(7, unpack(monsters)) >= 3 then
    settargeting('off')
    if not hasted then
    cast('utani hur')
    wait(200,300)
    gotolabel(wpt.id-2)
    end
    else
    wait(1000)
    if getsettings("Settings\\Targeting\\Enabled") == 'no' then
    settargeting('on')
    wait(1000,2000)
    end
    end

  4. #4
    iBot User
    Join Date
    Jun 2012
    Location
    Germany
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Thanks BugWT

  5. #5
    iBot User Ducklin's Avatar
    Join Date
    Jun 2012
    Posts
    377
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    33 Post(s)
    Reputation
    45
    Rep Power
    5
    Hmm didnt work here :\

    FREE SCRIPTS
    PAID SCRIPTS
    Give me some Credit, give me you're REP
    +

  6. #6
    Banned
    Join Date
    May 2012
    Posts
    1,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    127
    Rep Power
    0
    Make sure you get the x,y,z of the door and then the ID of the door CLOSED

  7. #7
    Normal User jesusz0r's Avatar
    Join Date
    Jun 2012
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    17
    Rep Power
    5
    If the door is 1 sqm to the south of where you are standing.
    PHP Code:
    if toptileitem(posxposy+1posz) == 4912 then
         useitem
    (4912posxposy+1posz)
    end 
    If the door is 1 sqm to the north of where you are standing.
    PHP Code:
    if toptileitem(posxposy-1posz) == 4912 then
         useitem
    (4912posxposy-1posz)
    end 
    If the door is 1 sqm to the west of where you are standing.
    PHP Code:
    if toptileitem(posx-1posyposz) == 4912 then
         useitem
    (4912posx-1posyposz)
    end 
    If the door is 1 sqm to the east of where you are standing.
    PHP Code:
    if toptileitem(posx+1posyposz) == 4912 then
         useitem
    (4912posx+1posyposz)
    end 
    If not, change the posx, posy, posz for the coordinates of the door.
    Last edited by jesusz0r; 07-02-2012 at 04:35 PM.

  8. #8
    Banned
    Join Date
    May 2012
    Posts
    1,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    127
    Rep Power
    0
    Quote Originally Posted by jesusz0r View Post
    If the door is 1 sqm to the south of where you are standing.
    PHP Code:
    if toptileitem(posxposy-1posz) == 4912 then
         useitem
    (4912posxposy-1posz)
    end 
    If the door is 1 sqm to the north of where you are standing.
    PHP Code:
    if toptileitem(posxposy+1posz) == 4912 then
         useitem
    (4912posxposy+1posz)
    end 
    If the door is 1 sqm to the west of where you are standing.
    PHP Code:
    if toptileitem(posx-1posyposz) == 4912 then
         useitem
    (4912posx-1posyposz)
    end 
    If the door is 1 sqm to the east of where you are standing.
    PHP Code:
    if toptileitem(posx+1posyposz) == 4912 then
         useitem
    (4912posx+1posyposz)
    end 
    If not, change the posx, posy, posz for the coordinates of the door.
    posy-1 = north
    posy+1 = south


  9. #9
    Normal User jesusz0r's Avatar
    Join Date
    Jun 2012
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    17
    Rep Power
    5
    Hahaha i already changed it ty

  10. #10
    Normal User
    Join Date
    Jul 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by BUgWT View Post
    Theres a few ways..Here is the way I do it:

    PHP Code:
    if toptileitem(32817,31274,6) == 4912 then
         useitem
    (4912,32817,31274,6)
    end 
    How do I get the closed door Id ? plz help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •