This is workable, however, I need to or more Tombs (NPC). I have managed to move the Tomb on a different location by editing the coordinates of UMOB. But I'm having a hard time adding another Tomb(NPC). the 2nd Tomb should be on a different location as the first one. Does anyone know how to add a 2nd Tomb by editing this script above?
Edited by Almond Snicker added a possible core script
Hi all,
Is it possible to spawn NPC around the player after killing a monster? or spawn a NPC around the monster where it was killed?
Update: I found a script..
The script..
- script Main NPC -1,{ end; OnNPCKillEvent: if (.state != 1) end; [email protected] = inarray(.moblist[0], killedrid); if ([email protected] == -1) end; [email protected] = getelementofarray(getvariableofnpc(.tombid, "TheTomb"), [email protected]); debugmes "npcid: "[email protected]; getunitdata(killedgid, [email protected]); setunitdata([email protected], UNPC_MAPID, [email protected][UMOB_MAPID]); setunitdata([email protected], UNPC_X, [email protected][UMOB_X]); setunitdata([email protected], UNPC_Y, [email protected][UMOB_Y]); setunitdata([email protected], UNPC_LOOKDIR, 0); end; OnInit: setarray .moblist[0], 1002, 1003, 1004, 1005; [email protected] = getarraysize(.moblist); [email protected] = getvariableofnpc(.tombcount, "TheTomb"); if ([email protected] < [email protected]) { debugmes "The Tomb count isn't match with the mob count in list"; debugmes "Size of Mob List: "[email protected]+", NPC Tomb Count: "[email protected]; end; } .state = 1; end; } - script TheTomb -1,{ end; OnInit: if (strnpcinfo(2) == "") end; .tombcount++; .tombid[.tombcount-1] = getnpcid(0); end; } prontera,0,0,0 duplicate(TheTomb) Tomb#1 112 prontera,0,0,0 duplicate(TheTomb) Tomb#2 112 prontera,0,0,0 duplicate(TheTomb) Tomb#3 112 prontera,0,0,0 duplicate(TheTomb) Tomb#4 112This is workable, however, I need to or more Tombs (NPC). I have managed to move the Tomb on a different location by editing the coordinates of UMOB. But I'm having a hard time adding another Tomb(NPC). the 2nd Tomb should be on a different location as the first one. Does anyone know how to add a 2nd Tomb by editing this script above?
Edited by Almond Snickeradded a possible core script
Link to comment
Share on other sites