Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wear ring when player attack
#1
Hi,


I need simple script to equip might ring if player attacks me, and then unequip after 30 seconds.



btw. Is is possible to make hotkey to stop cavebot & targeting from keyboard?

Just something like option "pause", but only for cavebot and targeting.
Reply

#2
1. Might ring
IF someone attacks you then equip might ring and unequip it 30 seconds after last attack.
local PLAYERS = { 'Arkilys', 'Some other guy' }
local RING_BP = 'red backpack' -- Might rings backpack.
local RING_ID = 3048

local isUnderAttack = attackingme(1000, 'p')
local item = finger()
if isUnderAttack then
    if item.id ~= RING_ID then
        moveitems(RING_ID, 'finger', RING_BP)
        wait(100, 300)
    end
    LAST_ATTACK = runningtime()
elseif not isUnderAttack and LAST_ATTACK ~= nil and (runningtime() - LAST_ATTACK) >= 30 and item.id == RING_ID then
    moveitems(RING_ID, RING_BP, 'finger')
    wait(100, 300)
    LAST_ATTACK = nil
end

2. Disable Cavebot/Targeting only.
setsettings('Cavebot/Enabled', false)
setsettings('Targeting/Enabled', false)

Toggle instead of just disabling it.
local status = getsettings('Cavebot/Enabled')

setsettings('Cavebot/Enabled', status == false)
setsettings('Targeting/Enabled', status == false)
Reply

#3
Reply

#4
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Try again, I just updated the code.
Reply

#5
hey! I have just tried to use this script and it looks like bot doesn't like either attackingme variable or (if I follow docs) isattackingme.

attackingme error
08:22:16 - LUA Script -> Persistent01: 2088: Invalid arguments to method call

isattackingme error
08:24:00 - LUA Script -> Persistent01: 5: global 'isattackingme' is not callable (a nil value)

am I doing something wrong here?
Reply

#6
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Fixed it.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016