Without mod
- script Weird Plant -1,{
OnInit:
.mobid = 2135; //2135
for ( .@i = 0; .@i < 10; .@i++ ) {
monster "prontera",0,0,"Weird Plant",.mobid,1,strnpcinfo(0)+"::OnMyMobDead"+ .@i;
.mob_gid[.@i] = $@mobid[0];
}
end;
OnMyMobDead0: callsub S_Makeitem, 0,.mob_gid[0];
OnMyMobDead1: callsub S_Makeitem, 1,.mob_gid[1];
OnMyMobDead2: callsub S_Makeitem, 2,.mob_gid[2];
OnMyMobDead3: callsub S_Makeitem, 3,.mob_gid[3];
OnMyMobDead4: callsub S_Makeitem, 4,.mob_gid[4];
OnMyMobDead5: callsub S_Makeitem, 5,.mob_gid[5];
OnMyMobDead6: callsub S_Makeitem, 6,.mob_gid[6];
OnMyMobDead7: callsub S_Makeitem, 7,.mob_gid[7];
OnMyMobDead8: callsub S_Makeitem, 8,.mob_gid[8];
OnMyMobDead9: callsub S_Makeitem, 9,.mob_gid[9];
S_Makeitem:
getunitdata getarg(1),.@array;
// dispbottom "Coordonnée x : "+ .@array[6];
// dispbottom "Coordonnée y : "+ .@array[7];
for ( .@i = 0; .@i < rand(2); .@i++ )
makeitem 909, 1, strcharinfo(3), ( .@array[6]+rand(2)-1 ), ( .@array[7]+rand(2)-1 );
monster "alberta",94,54,"Weird Plant",.mobid,1,strnpcinfo(0)+"::OnMyMobDead"+ getarg(0);
.mob_gid[ getarg(0) ] = $@mobid[0];
end;
}
It's true it would be better to return the mob unique id to use getunitdata. Maybe we should implement it