Results 1 to 10 of 10

Thread: Wear Energy Ring if named creature next to you

  1. #1
    Banned
    Join Date
    Oct 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    0

    Wear Energy Ring if named creature next to you

    I need someone to code a action for me which basically wears the energy ring if there is a monster (Dragon Lord), standing next to you.

    Thanks in advance.

  2. #2
    Normal User Tomix's Avatar
    Join Date
    Aug 2012
    Posts
    78
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    36
    Rep Power
    5
    PHP Code:
    local CONFIG = {
        
    RING "energy ring",
        
    CREATURES = {"Dragon Lord"},
        
    CREATURE_AMOUNT 1,
    }

    if (
    maround(6,false,unpack(CONFIG.CREATURES)) >= CONFIG.CREATURE_AMOUNT and itemcount(CONFIG.RING) > and ring == 0then
        moveitems
    (CONFIG.RING,"all","ring",1)
    elseif (
    maround(6,false,unpack(CONFIG.CREATURES)) < CONFIG.CREATURE_AMOUNT and ring ~= 0then
        moveitems
    (ring,"ring","all",1)
    end 
    Target = DL = it equip e ring, after battle it wear off it and put in bp.

  3. #3
    Banned
    Join Date
    Oct 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    0
    Thanks, but does that only eq the energy ring if the DL is next to you (1 sqm and meleeing you), or is that for if the DL is anywhere on screen?

  4. #4
    Normal User Tomix's Avatar
    Join Date
    Aug 2012
    Posts
    78
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    36
    Rep Power
    5
    Quote Originally Posted by trix909 View Post
    Thanks, but does that only eq the energy ring if the DL is next to you (1 sqm and meleeing you), or is that for if the DL is anywhere on screen?
    This will equip if dl in around you.

  5. #5
    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
    If you want it just around you(1 square) just change this:

    maround(1

  6. #6
    Normal User Tomix's Avatar
    Join Date
    Aug 2012
    Posts
    78
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    36
    Rep Power
    5
    or use this script on target name (it will put ring when you attack dl):

    PHP Code:
    local 
    CONFIG 
    = {
            
    RING_NAME "energy ring"
        
    }

        
    local RING_ID Item.GetID(CONFIG.RING_NAME)
        
    local RING_USED_ID Item.GetID(Self.Ring().id)

    if 
    target.id ~= and (target.name == 'Dragon Lord'then
    System
    .PauseWalking (10003000)
    while 
    Self.Ring().count do
    Self.MoveItems(RING_ID"ring""all"1)
    end
    elseif target.id == and Self.Ring().count 0 then
    Self
    .MoveItems(RING_USED_ID"all""ring"1)
    wait (5001000)
    end 

  7. #7
    Banned
    Join Date
    Oct 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    0
    Well at the moment, I have this script for if 2 DLS on screen to eq e-ring:

    Code:
    local CREATURES = {"dragon lord"} -- add more if wanted 
    local AMOUNT = 2 
    local RING = "energy ring" 
    
    if (maround(6,false,unpack(CREATURES)) >= AMOUNT and not manashielded and ring == 0) then 
        moveitems(RING,"all","ring",1) 
    elseif (maround(6,false,unpack(CREATURES)) < AMOUNT and manashielded and ring > 0) then 
        moveitems(ring,"ring","all",1) 
    end
    I need so it also eqs e-ring if 1 DL is around you (1 sqm)

  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
    Editing that hotkey:

    PHP Code:
    local CREATURES = {"dragon lord"} -- add more if wanted 
    local AMOUNT 

    local RING 
    "energy ring" 

    if (maround(1,false,unpack(CREATURES)) >= AMOUNT and not manashielded and ring == 0then 
        moveitems
    (RING,"all","ring",1
    elseif (
    maround(1,false,unpack(CREATURES)) < AMOUNT and manashielded and ring 0then 
        moveitems
    (ring,"ring","all",1
    end 

  9. #9
    Banned
    Join Date
    Oct 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    0
    Thanks for helping, but that wouldn't eq if 2 dls are on screen(like anywhere), anyhow I managed to fix it myself:

    PHP Code:
    local CREATURES = {"dragon lord"} -- add more if wanted 
    local AMOUNT 

    local RING 
    "energy ring" 

    if (maround(6,false,unpack(CREATURES)) >= AMOUNT and not manashielded and ring == or maround(1,false,unpack(CREATURES)) >= 1then 
        moveitems
    (RING,"all","ring",1
    elseif (
    maround(6,false,unpack(CREATURES)) < AMOUNT and manashielded and ring 0then 
        moveitems
    (ring,"ring","all",1
    end 

  10. #10
    Normal User dragonicevo's Avatar
    Join Date
    May 2012
    Location
    canada
    Posts
    1,600
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    65
    Rep Power
    8
    thats good bro thats for the post and help
    http://www.tibiaibot.com/forum/showt...2925#post42925 for basic setup for knight

    If i helped or you liked my scripts rep + me

    trusted free scripts by pink_panther and 3173654 and acid alchamy and marlhex and spens13

Posting Permissions

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