2011-02-22 17:03:22
// ============================================================================================= //
// Fighter target and attack script // 
// Version 1.2 //
// ============================================================================================= //
 
// ////////////////////////////////////////Farm setting///////////////////////////////////////// //
 
//Return point setting. Put your location to return below
 
DEFINE INT HP 2
HP = CHAR_MAX_HP / HP
 
DEFINE INT x 0
DEFINE INT y 0
DEFINE INT z 0
 
 
// /////////////////////////////////////////Global Variable////////////////////////////////////////
DEFINE INT 736
 
DEFINE_GLOBAL INT TDIST 0
DEFINE_GLOBAL INT MAXMOVES 0
DEFINE_GLOBAL INT APPROXIMATION 10
 
// ////////////////////Main Program, edit it if you know what to do////////////////////////////////
DO
CALLSUB Target
CALLSUB KILLTARGET
SLEEP 1000
LOOP ONE == ONE
END_SCRIPT
 
// //////////////////////////////////////////////Sub Function//////////////////////////////////////
SUB Target
TARGET_NEAREST
SLEEP 300
IF (CHAR_CUR_HP == ZERO )
SLEEP 1000
TAP_TO TOWN
SLEEP 1000
CALLSUB TELE
ENDIF
RETURNSUB
 
SUB KILLTARGET
ATTACK_TARGET
SLEEP 1000
RETURNSUB
 
SUB TELE
move_to "80721" "148618" "-3468"
sleep 1000
move_to "82900" "149265" "-3473"
sleep 1000
move_to "82818" "148063" "-3469"
sleep 1000
move_to "82957" "148512" "-3469"
sleep 1000
x = #i83688
y = #i148885
z = #i-3400
CALL PROXIMITY VOID 3 X Y Z
SLEEP 5000
COMMAND "/target anakim"
SLEEP 1000
TALK_TARGET
SLEEP 1000
NPC_DIALOG "bypass -h Quest 555_NPCBuffer castBuffSet 0 0 0"
SLEEP 1000
x = #i83696
y = #i149262
z = #i-3400
CALL PROXIMITY VOID 3 X Y Z
SLEEP 1000
COMMAND "/target Divine Healer"
SLEEP 1000
TALK_TARGET
SLEEP 1000
NPC_DIALOG "bypass -h npc_268474522_goto 1000000"
SLEEP 1000
RETURNSUB
 
FUNCTION PROXIMITY 3 X Y Z
MAXMOVES = #i0
DISTANCE TDIST X Y Z CHAR_X CHAR_Y CHAR_Z
WHILE TDIST > APPROXIMATION
MAXMOVES = MAXMOVES + #i1
MOVE_TO "<&X&>" "<&Y&>" "<&Z&>"
SLEEP 500
DISTANCE TDIST X Y Z CHAR_X CHAR_Y CHAR_Z
IF MAXMOVES >= #i20 //10 seconds until antistuck kicks in
IF tdist <= #i500
RETURN VOID
ELSE
SLEEP 1000
ENDIF
ENDIF
WEND
RETURN VOID
Invalid Email or Password