Originally posted by [b]~AnnieRuru~[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4984
http://eathena-project.googlecode.com/svn/...t_duplicate.txtCODE
// Outcome (r11216 trunk):
// * the variables are _shared_ between all duplicates
yes it is
if you test this script these 3 porings always tells you same coordinate,
because the npc variable overwriting each other
it should use an array or getd ...
maybe something like this
CODE
- script Test Script -1,1,1,{
mes "Hi.";
set .@id, atoi( strnpcinfo(2) );
mes "My coords are "+ .map$[.@id] +", "+ .x[.@id] +"/" +.y[.@id];
close;
OnInit:
set .@id, atoi( strnpcinfo(2) );
getmapxy .map$[.@id], .x[.@id], .y[.@id], 1;
end;
OnTouch:
emotion e_scissors;
end;
}
prontera,150,175,4 duplicate(Test Script) Test1#1 909
prontera,155,175,4 duplicate(Test Script) Test2#2 909,2,2
prontera,160,175,4 duplicate(Test Script) Test3#3 909,3,3
but please do not revert the npc variable to not sharing among duplicates,
because some of our event scripts which uses duplicates already adept to this system
This post has been edited by ~AnnieRuru~: Jun 27 2011, 06:03 AM