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
Question
Gouki
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; .@inlist = inarray(.moblist[0], killedrid); if (.@inlist == -1) end; .@npcid = getelementofarray(getvariableofnpc(.tombid, "TheTomb"), .@inlist); debugmes "npcid: "+.@npcid; getunitdata(killedgid, .@md); setunitdata(.@npcid, UNPC_MAPID, .@md[UMOB_MAPID]); setunitdata(.@npcid, UNPC_X, .@md[UMOB_X]); setunitdata(.@npcid, UNPC_Y, .@md[UMOB_Y]); setunitdata(.@npcid, UNPC_LOOKDIR, 0); end; OnInit: setarray .moblist[0], 1002, 1003, 1004, 1005; .@moblistsize = getarraysize(.moblist); .@tombcount = getvariableofnpc(.tombcount, "TheTomb"); if (.@moblistsize < .@tombcount) { debugmes "The Tomb count isn't match with the mob count in list"; debugmes "Size of Mob List: "+.@moblistsize+", NPC Tomb Count: "+.@tombcount; 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 112
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 Snickeradded a possible core script
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.