purityz - Jul 18, 2013 12:16
running this script.
[code=auto:0]
- script MainWalker -1,{
mes "Hello";
close;
}
morocc,159,55,4 duplicate(MainWalker) Walker#1 1002
- script Walking -1,{
OnTimer1000:
set .@npcmove,getnpcid(0,"Walker#1");
unitwalk .@npcmove,rand(169,181),rand(27,38);
OnInit:
initnpctimer;
end;
}
[/code]
It will give you this error in console.
[code=auto:0]
--- nullpo info --------------------------------------------
c:\users\purityz\desktop\hercules\trunk\src\map\status.c:6030: in func `unknown'
--- end nullpo info ----------------------------------------
--- nullpo info --------------------------------------------
c:\users\purityz\desktop\hercules\trunk\src\map\status.c:6030: in func `unknown'
--- end nullpo info ----------------------------------------
--- nullpo info --------------------------------------------
c:\users\purityz\desktop\hercules\trunk\src\map\status.c:6030: in func `unknown'
--- end nullpo info ----------------------------------------
[/code]
and all the npc in my screen keep moving randomly.
Poison - Jul 19, 2013 0:53
[s]This ain't a string. Try using this.[/s][quote]
[s][color=rgb(0,0,136)]set[/color] [color=rgb(102,102,0)].[/color][color=rgb(0,102,102)]@npcmove$[/color][color=rgb(102,102,0)],[/color]getnpcid[color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]0[/color][color=rgb(102,102,0)],[/color][color=rgb(0,136,0)]"Walker#1"[/color][color=rgb(102,102,0)]);[/color]
unitwalk [color=rgb(102,102,0)].[/color][color=rgb(0,102,102)]@npcmove$[/color][color=rgb(102,102,0)],[/color]rand[color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]169[/color][color=rgb(102,102,0)],[/color][color=rgb(0,102,102)]181[/color][color=rgb(102,102,0)]),[/color]rand[color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]27[/color][color=rgb(102,102,0)],[/color][color=rgb(0,102,102)]38[/color][color=rgb(102,102,0)]);[/color][/s][/quote]
Or maybe try unitwalk "Walking#1",rand(169,181),rand(27,38)[s][color=rgb(102,102,0)];[/color][/s]
This post has been edited by
Poison
on Jul 19, 2013 0:55
purityz - Jul 19, 2013 6:33
from document
[code=auto:0]
unitwalk .GID,150,150;
[/code]
this should work. In rathena its working.So I think this is a bug.
[code=auto:0]
set .@npcmove,getnpcid(0,"Walker#1");
unitwalk .@npcmove,rand(169,181),rand(27,38);
[/code]