Code:
while (get npc id (29) == true) do (
wait (50)
if (npc direction (29) == left) then (
create npc (32,(npc x (29)-1),(npc y (29)))
set timer (13,3,18,@webdespawn)
)
if (npc direction (29) == left && get npc id (32) == -1 ) then (
create npc (32,(npc x (29)--1),(npc y (29)))
set timer (13,3,18,@webdespawn)
)
if (npc direction (29) == right && get npc id (32) == -1 ) then (
create npc (32,(npc x (29)+1),(npc y (29)))
set timer (13,3,18,@webdespawn)
)
if (npc direction (29) == up && get npc id (32) == -1 ) then (
create npc (32,(npc x (29)),(npc y (29)--1))
set timer (13,3,18,@webdespawn)
)
if (npc direction (29) == down && get npc id (32) == -1 ) then (
create npc (32,(npc x (29)+1),(npc y (29)))
set timer (13,3,18,@webdespawn)
)
)
wait (50)
if (npc direction (29) == left) then (
create npc (32,(npc x (29)-1),(npc y (29)))
set timer (13,3,18,@webdespawn)
)
if (npc direction (29) == left && get npc id (32) == -1 ) then (
create npc (32,(npc x (29)--1),(npc y (29)))
set timer (13,3,18,@webdespawn)
)
if (npc direction (29) == right && get npc id (32) == -1 ) then (
create npc (32,(npc x (29)+1),(npc y (29)))
set timer (13,3,18,@webdespawn)
)
if (npc direction (29) == up && get npc id (32) == -1 ) then (
create npc (32,(npc x (29)),(npc y (29)--1))
set timer (13,3,18,@webdespawn)
)
if (npc direction (29) == down && get npc id (32) == -1 ) then (
create npc (32,(npc x (29)+1),(npc y (29)))
set timer (13,3,18,@webdespawn)
)
)
Am I on the right track with this?
Cornbread Chemist



