TBH, the best way to get help is to post what you have an let others look at it and help with fixes or suggestions.
Hey everyone!! I’m trying to write a script, but I need some guidance. I’ve read the tutorials on here, and they helped somewhat. But what I have in mind, is a little different. I don’t want to put specifics on here, but would love it if an experienced coder could pm me, and maybe we can work together to create the script.
set %hotkey DELETE ; Pauses Script
set %paused #false
set %Enemy N/A
; Setup:
set #targcurs 0
set #targcurs 1
event SysMessage Target The Enemy You Wish To Attack
while #targcurs = 1
{
wait 1
}
set %Enemy #ltargetid
set %enemykind #ltargetkind
event SysMessage Enemy set.
; main Loop:
repeat
onhotkey %hotkey
{
if %Paused
{
event sysmessage Resumed.
set %paused #false
wait 20
}
else
{
event sysmessage Paused.
wait 10
set %paused #true
}
}
if ! %Paused
gosub AttackEnemy
wait 1
until #charghost = #true ; repeat until dead.
halt ; end the script
sub AttackEnemy
finditem %enemyid G_10 ; find enemy within a radius of 10 from me.
If #findcnt > 0
{ ; if found attack it.
set #ltargetID %enemyid
set #ltargetkind %enemykind
event maco .... ; attackdont rember the event macro numbers.
}
return
I hate gotos and repeated code so i rewrote your script with no gotos. And added in an attack function... This is just an example for you to expand your knowledge with...
I hate gotos and repeated code so i rewrote your script with no gotos. And added in an attack function... This is just an example for you to expand your knowledge with...
I miss how GOTOs would make Cerveza's veins in his head nearly burst. lol
I hate gotos and repeated code so i rewrote your script with no gotos. And added in an attack function... This is just an example for you to expand your knowledge with...
I miss how GOTOs would make Cerveza's veins in his head nearly burst. lol
So I was kind of on the right track?
I hate gotos and repeated code so i rewrote your script with no gotos. And added in an attack function... This is just an example for you to expand your knowledge with...
I miss how GOTOs would make Cerveza's veins in his head nearly burst. lol