Post
by Kenneth00016 » Tue Aug 03, 2004 4:19 pm
Hail there i been trying to get this chant kite macro to work but im a total noob
I just got Macroquest a week ago and i got no idea on how to use it really, well i been trying to get this kite to work in PoV but everytime i try to run it i get errors and alot of them if anybody could help me and if anybody is intersted in teaching me how to do this i would be a happy man thanks in advance
error are like
Rubber x and y and so on i get
"Name already in use"
here is the macro
#turbo
#chat tell
Sub Main
/zapvars
| These variables are related to movement and AI control.
/declare RubberX 1234 global
/declare RubberY 1234 global
/varset RubberX 40 @Param1
/varset RubberY 100 @Param0
| These variables are related to song-twisting.
/declare SongTimer timer 6
/declare Songs array 1234
/declare CurSong global 1
/declare PrevSong global 2
/declare nSongs global 3
/declare EachSong local 5
| This block of code checks for proper arguments and echos error or initialization messages.
/if $defined(Param6)==false {
/echo Usage: /mac Diamond <Y> <X> <North> <South> <East> <West> <Song list>
/echo <Y> -- Y-coordinate of the center point.
/echo <X> -- X-coordinate of the center point.
/echo <North> -- Maximum distance north of the center point to travel.
/echo <South> -- Maximum distance south of the center point to travel.
/echo <East> -- Maximum distance east of the center point to travel.
/echo <West> -- Maximum distance west of the center point to travel.
/echo <Song list> -- List of songs to be sung, include Selo's if needed.
/endm
}
| This block of code sorts out the list of songs to be twisted while running.
/varset nSongs $strlen(@Param6)
/for EachSong 1 to @nSongs
/varset Songs(@EachSong) $mid($calc(@EachSong-1),1,@Param6)
/echo Song @EachSong: $char(1,@Songs(@EachSong))
/next EachSong
/varset Songs(@EachSong) $mid($calc(@EachSong-1),1,@Param6)
/echo Song @EachSong: $char(2,@Songs(@EachSong))
/next EachSong
/varset Songs(@EachSong) $mid($calc(@EachSong-1),1,@Param6)
/echo Song @EachSong: $char(3,@Songs(@EachSong))
/varset CurSong 1
/call Event_Timer
/echo Running a diamond path with center at @RubberY, @RubberX and chant-kiting mobs.
| The main loop, this iterates unless some AI warning is reached.
/sendkey down up
:ChantLoop
| Face the correct corner of the diamond, given character's current position.
/if (n $char 300 <@RubberX && n $char -400 >@RubberY) /face fast loc @RubberY,$calc(@RubberX-@Param4)
/look -90
/if (n $char 500 <@RubberX && n $char -300 <@RubberY) /face fast loc $calc(@RubberY-@Param3),@RubberX
/look -90
/if (n $char 700 >@RubberX && n $char -500 <@RubberY) /face fast loc @RubberY,$calc(@RubberX+@Param5)
/look -90
/if (n $char 200 >@RubberX && n $char -200 >@RubberY) /face fast loc $calc(@RubberY+@Param2),@RubberX
/look -90
| Sing songs.
/doevents
/if $char(casting)==FALSE {
/varset CurSong @PrevSong
/call Event_Timer
}
| Get a new target if the current one is no good.
/if n $target(id)==0 /call GetTarget
/if $target(name)~~"corpse" /call GetTarget
/if $target(type)=="PC" /call GetTarget
/goto :ChantLoop
/return
Sub Event_Timer(TimerName)
/delay 2
/stopsong
/cast @Songs(@CurSong)
/varset PrevSong @CurSong
/varset SongTimer 30
/varadd CurSong 1
/if n @CurSong>@nSongs /varset CurSong 1
/return
Sub GetTarget
/if n $searchspawn(npc,radius:200)>0 /target npc radius 200
/if n $target(level)>66 /press esc
/if n $target(range)>200 /press esc
/return
sorry but im a total noob at this so any help woyld be lovely :)