L2W script

07/21/2010 14:32 tommy14#1
Hey guys, I'm trying to make a script that does the following:

Goes to town when no buffs
Buffs
Ports to MOS from rune village (back ent)
Run to bot spot
Start bot.

But it doesn't quite seem to work. Can someone point out my problem(s)

Code:
//Loop Start\\
LABEL(FOREVER)

//Buff Check\\
POSOUTRANGE(43898, -47814, -798)
{
CALL(BUFFCHECK)
}

//Calls\\
POSINRANGE(43898, -47814, -798)
{
CALL(RUNTOBUFFS)
CALL(RUNTOGK)
CALL(RUNTOSPOT)
}

//Loop End\\
JMP(FOREVER)


//Labels\\
LABEL(RUNTOBUFFS)
{
MSG(Running to Buffer...)
MOVETO(43932, -47709, -798)
NPCSEL(Beryl[ID=31323])
NPCDLG(Beryl[ID=31323])
MSG(Buffing...)
DELAY(1000)
DLGSEL(View the list of available Magical Support.)
DELAY(1000)
DLGSEL(Mages)
DELAY(1000)
DLGSEL(Chant of Spirit)
DELAY(1000)
DLGSEL(Chant of Protection)
DELAY(1000)
DLGSEL(Resist Shock)
DELAY(1000)
DLGSEL(Mental Shield)
DELAY(1000)
DLGSEL(Prophecy of Water)
DELAY(1000)
RETURN()
}

LABEL(RUNTOGK)
{
MSG(Running to gatekeeper...)
MOVETO(43898, -47814, -798)
NPCSEL(Ilyana[31320])
NPCDLG(Ilyana[31320])
DLGSEL(Ilyana Teleport)
MSG(Teleporting...)
DELAY(1000)
DLGSEL(Monastery of Silence - 14000 Adena)
DELAY(1000)
RETURN()
}

LABEL(RUNTOSPOT)
{
MSG(Moving to bot spot...)
MOVETO(122826, -74857, -2885)
MOVETO(120779, -74842, -3286)
MOVETO(120684, -75213, -2370)
MOVETO(120684, -75990, -3270)
MOVETO(120733, -76360, -3270)
MOVETO(120070, -76399, -3270)
MOVETO(119854, -76798, -3270)
MOVETO(118993, -77317, -3389)
MOVETO(118933, -77917, -3524)
RETURN()
}

LABEL(BUFFCHECK)
{

CharStatus(CMP,<=,3662)
{
CharStatus(MP,>=,63)
{

CharStatus(CMP,<=,2950)
{
CALL(TOTOWN)
}
}	
}
RETURN()
}

LABEL(TOTOWN)
{
MSG(Going to town...)
SET(FIGHTSTOP)
DELAY(25000)
USEITEM(Escape - Rune Township[ID=13412])
MSG(Returning to town...)
SET(FIGHTSTART)

DELAY(20000)
CALL(FOREVER)
}
I went to one of the l2w scripts posted in the stickie in L2 macros, bots, ect section for the buff check code.


Any help would be greatly appreciated.
Thanks,
Tommy14
07/25/2010 10:38 tommy14#2
Script attempt 2:

Code:
LABEL(FOREVER)
//Rune SOE\\
LABEL(ToTown)
{
USEITEM(Escape - Rune Township[ID=20389])
Call(RuneToBuff)
Return()
}
//Checks if in Goddar\\
Label(IfGoddard)
{
POSINRANGE(147792,-56189,-2786,3000)
USEITEM(Escape - Rune Township[ID=20389])
MSG(SOE to Rune)
DELAY(20000)
CALL(IfRune)
Return()
}
//Checks if in spot\\
Label(IfSpot)
{
POSOUTRANGE(x,y,z,range)
CALL(ToRune)
DELAY(20000)
CALL(RunToSpot)
Return()
}
//Checks if buffing\\
Label(IfColi)
{
POSINRANGE(151661,47055,-3400,700)
CALL(ColiBuff)
Return()
}
//Buff Check\\
Label(BuffCheck)
{
CharStatus(HP,>=,60)
Return()
{
//Ports to Coli\\
{
LABEL(RuneToBuff)
Return()
}
MSG(Porting to buff spot...)
NPCSEL(Ilyana[ID=31320])
NPCDLG(Ilyana[ID=31320])
DELAY(10000)
RETURN()
}
//Buffs in Coli\\
LABEL(ColiBuff)
{
MSG(Buffing...)
MOVETO(119424,-78384,-3520)
MOVETO(119182,-78349,-3520)
MOVETO(151661,47055,-3400)
MOVETO(151827,47115,-3400)
NPCSEL(Beryl the Cat[ID=31774])
NPCDLG(Beryl the Cat[ID=31774])
MOVETO(151824,47027,-3400)
USEITEM(Escape - Rune Township[ID=20389])
DELAY(20000)
RETURN()
}
//Ports to mos\\
LABEL(PortToMos)
{
MSG(Porting to leveling area...)
NPCSEL(Ilyana[ID=31320])
NPCDLG(Ilyana[ID=31320])
DELAY(10000)
RETURN()
}
//Runs to Spot\\
LABEL(RunToSpot)
{
MSG(Running to leveling spot...)
MOVETO(123041,-74861,-2888)
MOVETO(122601,-74780,-2880)
MOVETO(120918,-74856,-3264)
MOVETO(120700,-75153,-3264)
MOVETO(120844,-76214,-3264)
MOVETO(120772,-76346,-3264)
MOVETO(120556,-76369,-3264)
MOVETO(120264,-76393,-3264)
MOVETO(120038,-76415,-3264)
MOVETO(119946,-76657,-3264)
MOVETO(119731,-77140,-3264)
MOVETO(119005,-77270,-3392)
MOVETO(118960,-77399,-3392)
MOVETO(119012,-78332,-3520)
MOVETO(118953,-78525,-3520)
MOVETO(118890,-78836,-3520)
MOVETO(118823,-78299,-3520)
CALL(Forever)
RETURN()
}
also doesn't work. Just uses escape to rune, then tries to run to botting spot from rune