Results 1 to 9 of 9

Thread: Script Request (Action)

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

    Question Script Request (Action)

    Hey guys!
    I need some help with an action
    The action should closetibia when the character have less than 50 cap, IF the NPC called "Ferks" is on screen and the POSZ is 6.
    Also, closetibia if less than 50 cap, Ferks on screen and posz == 6.

    EDIT:
    I also need a script that closes tibia if inpz==0 and itemcount uhp (7643) is lower than 10 ... (Like, if somebody waste me, instead of dying by monster xlog).
    It will be used in a refiller script, which closes the backpacks from time to time, so it has to xlog once the message "Using one of 10 ultimate health potions..." appears..
    Is this possible?

    Thanks in advance! REP+
    Last edited by Axemaster; 05-21-2014 at 04:42 PM.

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Lua Code:
    local CapToExit = 50
    if maround("Ferks") > 0 and cap < CapToExit then
    closetibia()
    end

  3. #3
    iBot User jose maria's Avatar
    Join Date
    Jan 2014
    Location
    Brazil
    Posts
    85
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    19 Post(s)
    Reputation
    41
    Rep Power
    3
    ...and the POSZ is 6.

    PHP Code:
    local CapToExit 50
    if maround("Ferks") > and cap CapToExit and (posz == 6then
    closetibia
    ()
    end 
    Just fix

  4. #4
    iBot User
    Join Date
    Jun 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    5
    Thanks guys!
    I also need a script that closes tibia if inpz==0 and itemcount uhp (7643) is lower than 10 ... (Like, if somebody waste me, instead of dying by monster xlog).
    It will be used in a refiller script, which closes the backpacks from time to time, so it has to xlog once the message "Using one of 10 ultimate health potions..." appears..
    Is this possible?
    Thanks in advance!

  5. #5
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Quote Originally Posted by jose maria View Post
    ...and the POSZ is 6.

    PHP Code:
    local CapToExit 50
    if maround("Ferks") > and cap CapToExit and (posz == 6then
    closetibia
    ()
    end 
    Just fix
    there is no need for posz cus if you see that npc on screen that mean you are already on that floor....

  6. #6
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Quote Originally Posted by Axemaster View Post
    Thanks guys!
    I also need a script that closes tibia if inpz==0 and itemcount uhp (7643) is lower than 10 ... (Like, if somebody waste me, instead of dying by monster xlog).
    It will be used in a refiller script, which closes the backpacks from time to time, so it has to xlog once the message "Using one of 10 ultimate health potions..." appears..
    Is this possible?
    Thanks in advance!
    Lua Code:
    if posz == 0 and itemcount("ultimate health potion") < 10 then
    closetibia()
    end

  7. #7
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by RafiXWPT View Post
    Lua Code:
    if posz == 0 and itemcount("ultimate health potion") < 10 then
    closetibia()
    end
    It will be used in a refiller script, which closes the backpacks from time to time, so it has to xlog once the message "Using one of 10 ultimate health potions..." appears..
    servercountitem(string item) [int]: Represent the number of defined items, based on the last message from the server log "Using one of X items", items need not be visible.

    Lua Code:
    if posz == 0 and servercountitem("ultimate health potion") < 10 then
    closetibia()
    end


    I'm not sure if the default count is 0 or undefined, so I'd probably test that beefore using it. Maybe even use:

    Lua Code:
    if posz == 0 and servercountitem("ultimate health potion") < 10 and servercountitem("ultimate health potion") > 0 then
    closetibia()
    end


    Quote Originally Posted by Axemaster View Post
    I also need a script that closes tibia if inpz==0
    Do you mean in pzone or posz = 0?

    you can change "posz == 0" to "pzone"

    IE:

    Lua Code:
    if pzone and servercountitem("ultimate health potion") < 10 and servercountitem("ultimate health potion") > 0 then
    closetibia()
    end
    Last edited by pink_panther; 05-21-2014 at 11:10 PM.

  8. #8
    iBot User
    Join Date
    Jun 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by pink_panther View Post
    servercountitem(string item) [int]: Represent the number of defined items, based on the last message from the server log "Using one of X items", items need not be visible.

    Lua Code:
    if posz == 0 and servercountitem("ultimate health potion") < 10 then
    closetibia()
    end


    I'm not sure if the default count is 0 or undefined, so I'd probably test that beefore using it. Maybe even use:

    Lua Code:
    if posz == 0 and servercountitem("ultimate health potion") < 10 and servercountitem("ultimate health potion") > 0 then
    closetibia()
    end




    Do you mean in pzone or posz = 0?

    you can change "posz == 0" to "pzone"

    IE:

    Lua Code:
    if pzone and servercountitem("ultimate health potion") < 10 and servercountitem("ultimate health potion") > 0 then
    closetibia()
    end
    Thanks alot, Pink Panther!
    I'll make a few tests and return with response

  9. #9
    iBot User
    Join Date
    Jun 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    5
    local CapToExit = 50
    if paround("Ferks") > 0 and pzone and cap < CapToExit and (posz == 6) then
    closetibia()
    end

    Had to change to paround instead of maround, as Ferks is a NPC and not a monster :P
    All 2/2 scripts are now working, thanks guys

Posting Permissions

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