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
REACH NPC
#1
HELLO,


I'm making simple bless buyer, and i need simple action script:

to reach npc "@Arkilys"  (waypoints i already made to have npc on screen)

then say:
hi
spiritual shielding
yes
Reply

#2
Hello.

As you can speak with NPCs even few sqms away then you can setup MAX_DIST_NPC according to your needs. So if for some reason you need to actually need to stand right next to it then you can setup MAX_DIST_NPC = 1.
It will play sound, flash client and print on Console tab if it cannot find the npc or could not reach the npc.
local NAME = 'npc name'
local MAX_DIST_NPC = 2

local creatureDistance = findcreature(NAME)
while creatureDistance > MAX_DIST_NPC do
    if not reachcreature(NAME) then
        break
    end
    creatureDistance = findcreature(NAME)
end

if creatureDistance == -1 then
    playsound('default')
    flashclient()
    print('Could not find creature ' .. NAME)
elseif creatureDistance > MAX_DIST_NPC then
    playsound('default')
    flashclient()
    print('Failed to reach creature ' .. NAME)
else
    say('hi')
    wait(500, 800)
    say('spiritual shielding')
    wait(500, 800)
    say('yes')
    wait(500, 800)
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016