Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;################################## Mainloop ####################################
- ;######### Do not edit below here unless you know what you are doing! ###########
- gosub Init
- gosub Tame
- ;############################### End of Mainloop ################################
- ;############################# Taming Subroutines ###############################
- sub TAME
- set #TARGCURS 1
- waitfortarget:
- if #TARGCURS = 0
- {
- set %TameTarget #ltargetid
- gosub Taming
- }
- else
- {
- goto waitfortarget
- }
- return
- sub Taming
- TamingLoop:
- event macro 13 35
- target
- set #ltargetkind 1
- set #ltargetid %TameTarget
- event macro 22 0
- set %_timer #scnt + 15
- FollowLoop:
- finditem %TameTarget
- if #findX > #charPosX + 1 || #findX < #charPosX - 1 || #findY > #charPosY + 1
- + || #findY < #charPosY - 1
- {
- event pathfind #findX #findY #findZ
- wait 20
- }
- for %i 5 1
- {
- scanjournal %i
- if YOU_FAIL_TO_TAME in #journal || TOO_FAR_AWAY in #journal
- + || %_timer < #scnt
- goto TamingLoop
- if SEEMS_TO_ACCEPT_YOU in #journal || THAT_WASN'T_EVEN in #journal
- {
- exevent popup %TameTarget 10
- waitForCont:
- wait 5
- if #contkind <> OXHD
- goto waitForCont
- set #contposx 0
- set #contposy 0
- click 30 90 dmc
- set %_timer N/A
- goto TamingReturn
- }
- if THAT_ANIMAL_LOOKS_TAME in #journal
- {
- exevent popup %TameTarget 10
- waitForCont2:
- wait 5
- if #contkind <> OXHD `
- goto waitForCont2
- set #contposx 0
- set #contposy 0
- click 30 90 dmc
- goto TamingReturn
- }
- deletejournal
- }
- goto FollowLoop
- TamingReturn:
- return
- ;########################## End of Taming Subroutines ###########################
- ;############################## Setup Subroutines ###############################
- sub Init
- initevents
- set %_timer N/A
- return
- ;########################## End of Setup Subroutines ############################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement