Hello!
I want to make a custom mob for a server quest which drops an item when killed. I want to do this by script and not by adding a real custom mob (if possible). Is this possible? I have the following script:
- script Weird Plant -1,{
OnInit:
.mobid = 2135; //2135
monster "prontera",0,0,"Weird Plant",.mobid,10,strnpcinfo(0)+"::OnMyMobDead";
end;
OnMyMobDead:
getmapxy(.@map$, .@x, .@y, 3);
.@itemno = rand(2);
for(set .@i,0; .@i<.@itemno; set .@i,.@i+1){
makeitem(909, 1, .@map$, .@x+rand(2)-1, .@y+rand(2)-1);
}
monster "prontera",0,0,"Weird Plant",.mobid,1,strnpcinfo(0)+"::OnMyMobDead";
end;
}
Unfortunately, getmapxy neither with 3(monster) nor with 1(npc) as flag does return the position of the monster, so is it possible to get it in another way??