Results 1 to 3 of 3

Thread: Low spear count

  1. #1
    Normal User
    Join Date
    Jan 2013
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Low spear count

    I'm trying to make an action that turns off targeting if I get low on spears.
    I tried using this action but it doesn't seem to work.
    PHP Code:
    if weaponamount <= 2 then 
    settargeting
    ('no')
    end 
    Anyone know how to fix it?

  2. #2
    iBot User Raph_'s Avatar
    Join Date
    Feb 2013
    Posts
    391
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    59
    Rep Power
    4
    Well, your code shud work, well i did this one for u.
    Code:
    --[[ START ]]--
    	local ammoName = "spear"
    	local ammoCheck = 2
    --[[ END ]]--
    
    if Self.Weapon().id == itemid(ammoName) then
    	if Self.Weapon().count <= ammoCheck then
    		System.TargetingEnabled("off")
    		wait(300, 600)
    	else
    		System.TargetingEnabled("on")
    		wait(300, 600)
    	end
    end

  3. #3
    Normal User
    Join Date
    Jan 2013
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    That one works, thanks.

Posting Permissions

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