leadtech Posted November 20, 2011 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 59 Reputation: 2 Joined: 11/12/11 Last Seen: March 31, 2020 Share Posted November 20, 2011 I got tried this MVP Instant Spawning script and i have problem .. MVP's are not instant spawning .. - script mvp spawned -1,{ OnInit: setarray $@mvpID[0],1511,1674,1785,1039,1874,1272,1719,1046,1389,1112,1115,1658,1957, 1418,1871,1252,1786,1086,1885,1649,1651,1832,1492,1734,1251,1779,1688,1646,1373, 1147,1059,1150,1956,1087,1190,1038,1157,1159,1052,1623,1917,1650,1583,1389,1312, 1751,1685,1630,1648; for(set .i,0; .i<getarraysize($@mvpID); set .i,.i+1) {monster "mapname",0,0,""+getmonsterinfo($@mvpID[.i],0)+"",$@mvpID[.i],1;} end; OnNPCKillEvent: getmapxy(@map$,@x,@y,0); if (@map$ == "mapname") {for(set @i,0; @i<getarraysize($@mvpID); set @i,@i+1) {if (killedrid==$@mvpID) {monster "@map$",0,0,""+getmonsterinfo($@mvpID[@i],0)+"",$@mvpID[@i],1;}}} end; } I got error when i start the server .. [Debug]: mapindex_name2id: Map "mapname" not found in index list! Help me plss .. Thanks in advance Quote Link to comment Share on other sites More sharing options...
0 Shinryo Posted November 20, 2011 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 61 Reputation: 153 Joined: 11/10/11 Last Seen: June 1, 2020 Share Posted November 20, 2011 Just as the map server says: This map does not exist. If you have copied this script from somewhere, than don't forget to rename the map where mvps have to spawn... E.g. - script mvp spawned -1,{ OnInit: setarray $@mvpID[0],1511,1674,1785,1039,1874,1272,1719,1046,1389,1112,1115,1658,1957, 1418,1871,1252,1786,1086,1885,1649,1651,1832,1492,1734,1251,1779,1688,1646,1373, 1147,1059,1150,1956,1087,1190,1038,1157,1159,1052,1623,1917,1650,1583,1389,1312, 1751,1685,1630,1648; for(set .i,0; .i<getarraysize($@mvpID); set .i,.i+1) {monster "prontera",0,0,""+getmonsterinfo($@mvpID[.i],0)+"",$@mvpID[.i],1;} end; OnNPCKillEvent: getmapxy(@map$,@x,@y,0); if (@map$ == "prontera") {for(set @i,0; @i<getarraysize($@mvpID); set @i,@i+1) {if (killedrid==$@mvpID) {monster "@map$",0,0,""+getmonsterinfo($@mvpID[@i],0)+"",$@mvpID[@i],1;}}} end; } 1 Quote Link to comment Share on other sites More sharing options...
0 Z3R0 Posted November 20, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 20, 2011 I would totally re do this... you are only spawning mvp's in 1 map... thus you don't need to run the OnNPCKillEvent everytime something is dead and determine the map, you just need to add a trigger... // Assuming you want to spawn ALL these NPC's in prontera... (crazy btw) // If Not, I've started a .maps$ array, that will house every map name the npc release each corresponding MVP ID - script mvp spawned -1,{ OnInit: // Set Spawn Map set .map$, "prontera"; //setarray .maps$[0],"prontera","geffen",//etc setarray .mvpID[0],1511,1674,1785,1039,1874,1272,1719,1046,1389,1112,1115,1658,1957,1418,1871,1252,1786,1086,1885,1649,1651,1832,1492,1734,1251,1779,1688,1646,1373,1147,1059,1150,1956,1087,1190,1038,1157,1159,1052,1623,1917,1650,1583,1389,1312,1751,1685,1630,1648; // If using the array .maps$ change hte below .map$ to .maps$[.@i] for(set .i,0; .i<getarraysize(.mvpID); set .i,.i+1) { monster .map$,0,0,""+getmonsterinfo(.mvpID[.i],0)+"",.mvpID[.i],1,"spawned::OnMVPKill"; } end; OnMVPKill: // Uncomment if using the multiple map technique // getmapxy(.@map$, .@x, .@y, 0); // If Using the multiple map (change the below .map$) to .@map$ monster .map$,0,0,""+getmonsterinfo(.mvpID[@i],0)+"",.mvpID[@i],1; end; } Quote Link to comment Share on other sites More sharing options...
0 leadtech Posted November 20, 2011 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 59 Reputation: 2 Joined: 11/12/11 Last Seen: March 31, 2020 Author Share Posted November 20, 2011 Do i need to put all that maps where the MVP are spawneda ? like this // Set Spawn Map set .map$, "prontera,moc_fild17"; Quote Link to comment Share on other sites More sharing options...
0 Z3R0 Posted November 20, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 20, 2011 no, disable the // set .map$ and use the setarray .maps$[0] // array insead Quote Link to comment Share on other sites More sharing options...
0 leadtech Posted November 20, 2011 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 59 Reputation: 2 Joined: 11/12/11 Last Seen: March 31, 2020 Author Share Posted November 20, 2011 So it will be look like this ? // Set Spawn Map setarray .maps$[0], "prontera,moc_fild17"; Quote Link to comment Share on other sites More sharing options...
0 Truly Posted November 20, 2011 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 201 Reputation: 48 Joined: 11/17/11 Last Seen: December 26, 2021 Share Posted November 20, 2011 So it will be look like this ? // Set Spawn Map setarray .maps$[0], "prontera,moc_fild17"; Small change, you need " before and after the map name, then the comma to separate strings within the array (Im pretty sure you need to O.O) So change it to: setarray .maps$[0], "prontera","moc_fild17"; Quote Link to comment Share on other sites More sharing options...
0 Z3R0 Posted November 20, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 20, 2011 let's suppose you have 3 mob id's and each one spawns on a different map... // MVP ID's setarray .mvpID[0],123,456,789; // Map Locations setarray .maps$[0],"morc_field_1","prt_field1","gef_dun01"; // Loop Through Each Mob ID and Spawn in Correct Field for (set .@a, 0; .@a < getarraysize(.mvpID); set .@a, .@a + 1) { monster .maps$[.@a],0,0,""+getmonsterinfo(.mvpID[.i],0)+"",.mvpID[.i],1,"spawned::OnMVPKill"; } Quote Link to comment Share on other sites More sharing options...
0 llchrisll Posted November 20, 2011 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted November 20, 2011 (edited) - script mvp spawned -1,{ } // Map Locations setarray .maps$[0],"morc_field_1","prt_field1","gef_dun01"; monster .maps$[.@a],0,0,""+getmonsterinfo(.mvpID[.i],0)+"",.mvpID[.i],1,"spawned::OnMVPKill"; } I found two "typos" ^^: 1st: "morc_field_1" > does not exist except custom map, so > "moc_fild01" should be correct, same goes for "prt_field01" > "prt_fild01" ^^ 2nd: In the 2nd quote the NPC name is wrong, according to the 1st quote > "mvp spawned", but you wrote "spawned" only. Regards, Chris Edited November 21, 2011 by llchrisll 1 Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted November 20, 2011 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted November 20, 2011 (edited) - script mvp spawned -1,{ } // Map Locations setarray .maps$[0],"morc_field_1","prt_field1","gef_dun01"; monster .maps$[.@a],0,0,""+getmonsterinfo(.mvpID[.i],0)+"",.mvpID[.i],1,"spawned::OnMVPKill"; } I found two "typos" ^^: 1st: "morc_field_1" > does not exist except custom map, so > "moc_fild01" should be correct, same goes for "prt_field01" > "prt_fild01" ^^ 2nd: In the 2nd quite the NPC name is wrong, according to the 1st quote > "mvp spawned", but you wrote "spawned" only. Regards, Chris erm..Z3R0 put the correct header..while you miss looked at the "mvp" word LOL..i looked at the Header only..>.< didnt wonder inside the content..LOL.... Edited November 21, 2011 by Emistry Quote Link to comment Share on other sites More sharing options...
0 Z3R0 Posted November 21, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 21, 2011 LOL! First off the "morc_field" thing was simply a filler, I didn't know or care what the maps where... (that's for him to find out) Second, completely my bad on the mvp spawned thingy Quote Link to comment Share on other sites More sharing options...
0 Toshiro Posted November 21, 2011 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 106 Reputation: 29 Joined: 11/08/11 Last Seen: Monday at 07:54 PM Share Posted November 21, 2011 To avoid any problems when changing the NPC's (unique) name, I'd suggest to use strnpcinfo(3)+"::OnMVPKill" instead of "mvp spawned::OnMVPKill". It prevents potential errors when changing the name (e.g. you might forget to change the name at every position; or typod the name ). Also getmonsterinfo(x, 0) already returns a string, so there is no need to concatenate an empty string to it's return value. And instead of looking up the name with getmonsterinfo, you could also just write "--ja--" or "--en--" and the name would be added appropriately, especially if you'd might prefer to use the English/iRO name over of the Korean one (e.g. Korean: Civil Servant; English: Mao Guai). Updated Z3R0's script from this post with the mentioned changes. // Assuming you want to spawn ALL these NPC's in prontera... (crazy btw) // If Not, I've started a .maps$ array, that will house every map name the npc release each corresponding MVP ID - script mvp spawned -1,{ OnInit: // Set Spawn Map set .map$, "prontera"; //setarray .maps$[0],"prontera","geffen"; //etc setarray .mvpID[0],1511,1674,1785,1039,1874,1272,1719,1046,1389,1112,1115,1658,1957,1418,1871,1252,1786,1086,1885,1649,1651,1832,1492,1734,1251,1779,1688,1646,1373,1147,1059,1150,1956,1087,1190,1038,1157,1159,1052,1623,1917,1650,1583,1389,1312,1751,1685,1630,1648; // If using the array .maps$ change the below .map$ to .maps$[.@i] for(set .i,0; .i<getarraysize(.mvpID); set .i,.i+1) { monster .map$,0,0,getmonsterinfo(.mvpID[.i],0),.mvpID[.i],1,strnpcinfo(3)+"::OnMVPKill"; } end; OnMVPKill: // Uncomment if using the multiple map technique // getmapxy(.@map$, .@x, .@y, 0); // If Using the multiple map (change the below .map$) to .@map$ monster .map$,0,0,getmonsterinfo(.mvpID[@i],0),.mvpID[@i],1; end; } Quote Link to comment Share on other sites More sharing options...
0 Z3R0 Posted November 21, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted November 21, 2011 did I actually type that? ""+getmonsterinfo(.mvpID, 0)+"" ??? Edit: Wow I did! Very noobish of me sorry... lolz Quote Link to comment Share on other sites More sharing options...
Question
leadtech
I got tried this MVP Instant Spawning script and i have problem .. MVP's are not instant spawning ..
I got error when i start the server ..
Help me plss ..
Thanks in advance
Link to comment
Share on other sites
12 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.