sweetmole Posted April 9, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 26 Reputation: 3 Joined: 02/25/13 Last Seen: December 12, 2019 Share Posted April 9, 2018 hi everyone can i request a simple script like this an npc that gives u a quest to kill 5 different mobs with 1000 qty. item requirements. once done the npc will set @aura to a player Quote Link to comment Share on other sites More sharing options...
0 Hyroshima Posted April 9, 2018 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 189 Reputation: 122 Joined: 07/11/14 Last Seen: November 27, 2024 Share Posted April 9, 2018 6 hours ago, sweetmole said: hi everyone can i request a simple script like this an npc that gives u a quest to kill 5 different mobs with 1000 qty. item requirements. once done the npc will set @aura to a player Hi... prontera,152,166,5 script Quest KMob 4_M_02,{ if(QP_Act) { if(QT_MobKill < .mob_qt[QP_Val]) { mes "You have not completed the mission!","Kill: ["+QT_MobKill+"/"+.mob_qt[QP_Val]+"] "+strmobinfo(1,.mob_id[QP_Val])+""; close; } mes "Congratulations, you completed the quest!"; atcommand "@aura 2"; set QP_Act,0; set QT_MobKill,0; close; } mes "Hello, will I now ask you to kill some monsters for me ok?"; if(select("Ok:I do not want...")==2){ close; } next; set QP_Val,rand(1,getarraysize(.mob_id))-1; //Get a random mob_id set QP_Act,1; mes "Okay, go and kill "+.mob_qt[QP_Val]+"x "+strmobinfo(1,.mob_id[QP_Val])+" !"; close; OnNPCKillEvent: if(QP_Act && killedrid == .mob_id[QP_Val]){ set QT_MobKill,QT_MobKill+1; } end; OnInit: setarray .mob_id[0],1031,1002,1166,1784; //Mob ID, limited (0,126) mobs_ids setarray .mob_qt[0], 1, 2, 3, 5; //Qty kills, limited (0,126) mobs_qty end; } 1 Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 10, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 10, 2018 if(QP_Act && killedrid == .mob_id[QP_Val]) I'm sure this condition is wrong if you use Comparisons conditions ( || == &&), it only return true(1) or false(0) since you want to make the condition to be true that is in the .mob_id array, you have to loop it Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted April 10, 2018 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted April 10, 2018 (edited) 6 minutes ago, AnnieRuru said: if(QP_Act && killedrid == .mob_id[QP_Val]) I'm sure this condition is wrong if you use Comparisons conditions ( || == &&), it only return true(1) or false(0) since you want to make the condition to be true that is in the .mob_id array, you have to loop it It looks like in his example the NPC assigns one monster to kill at random from the list. Instead of looping through it which is what OP asked... In other words, @AnnieRuru, u right. Also it's good to see you more active again and junk. Edited April 10, 2018 by Skorm 1 Quote Link to comment Share on other sites More sharing options...
0 Hyroshima Posted April 10, 2018 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 189 Reputation: 122 Joined: 07/11/14 Last Seen: November 27, 2024 Share Posted April 10, 2018 29 minutes ago, AnnieRuru said: if(QP_Act && killedrid == .mob_id[QP_Val]) I'm sure this condition is wrong if you use Comparisons conditions ( || == &&), it only return true(1) or false(0) since you want to make the condition to be true that is in the .mob_id array, you have to loop it but the question is this, if QP_Act equals 0, so stop, and if 1 then it checks killedrid == .mob_id [QP_Val] or should it be: if(QP_Act) { if(killedrid == .mob_id[QP_Val]) } ? 1 Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 10, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 10, 2018 hmm ... perhaps I misunderstood your script .... *test in my test server* oops ~ you are right ah ~ even I can make mistakes sometimes you directly set the condition into the array itself, and thus doesn't need to loop it give you 2 reps ~ damn it ... now I recalled I used this trick before on my soul linker script ... how come I've forgotten Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted April 10, 2018 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted April 10, 2018 My interpretation of OP's request is that you can kill any of the 5 monsters and it will count. Not just a single monster at a time which is what this script does. Also OP wanted item requirements. Quote Link to comment Share on other sites More sharing options...
0 sweetmole Posted April 11, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 26 Reputation: 3 Joined: 02/25/13 Last Seen: December 12, 2019 Author Share Posted April 11, 2018 thank you everyone for giving time on this matter. On 4/9/2018 at 10:17 PM, Hyroshima said: Hi... prontera,152,166,5 script Quest KMob 4_M_02,{ if(QP_Act) { if(QT_MobKill < .mob_qt[QP_Val]) { mes "You have not completed the mission!","Kill: ["+QT_MobKill+"/"+.mob_qt[QP_Val]+"] "+strmobinfo(1,.mob_id[QP_Val])+""; close; } mes "Congratulations, you completed the quest!"; atcommand "@aura 2"; set QP_Act,0; set QT_MobKill,0; close; } mes "Hello, will I now ask you to kill some monsters for me ok?"; if(select("Ok:I do not want...")==2){ close; } next; set QP_Val,rand(1,getarraysize(.mob_id))-1; //Get a random mob_id set QP_Act,1; mes "Okay, go and kill "+.mob_qt[QP_Val]+"x "+strmobinfo(1,.mob_id[QP_Val])+" !"; close; OnNPCKillEvent: if(QP_Act && killedrid == .mob_id[QP_Val]){ set QT_MobKill,QT_MobKill+1; } end; OnInit: setarray .mob_id[0],1031,1002,1166,1784; //Mob ID, limited (0,126) mobs_ids setarray .mob_qt[0], 1, 2, 3, 5; //Qty kills, limited (0,126) mobs_qty end; } the script working perfectly, but sir this npc let me to kill only savage mob. i want it to be 4 different mos Quote Link to comment Share on other sites More sharing options...
0 Hyroshima Posted April 12, 2018 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 189 Reputation: 122 Joined: 07/11/14 Last Seen: November 27, 2024 Share Posted April 12, 2018 @sweetmole Sorry, I just realized... the way I did this is random, I tried to do the same for 5 but it did not work very well, i can do it for 5 mobs but it will be fixed and not random, can it be? Quote Link to comment Share on other sites More sharing options...
0 sweetmole Posted April 12, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 26 Reputation: 3 Joined: 02/25/13 Last Seen: December 12, 2019 Author Share Posted April 12, 2018 sure @Hyroshima thanks a lot my friend. ang btw im looking also for a item requirements. give items to npc before doing killing monster. if it is hard just stick with the killing function Quote Link to comment Share on other sites More sharing options...
0 Hyroshima Posted April 12, 2018 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 189 Reputation: 122 Joined: 07/11/14 Last Seen: November 27, 2024 Share Posted April 12, 2018 @sweetmole rdy: prontera,152,166,5 script Quest KMob 4_M_02,{ if(mob_qt1) { if(QT_MobKill1 < mob_qt1 || QT_MobKill2 < mob_qt2 || QT_MobKill3 < mob_qt3 || QT_MobKill4 < mob_qt4 || QT_MobKill5 < mob_qt5) { mes "You have not completed the mission!"; mes "Kill: ["+QT_MobKill1+"/"+mob_qt1+"] "+strmobinfo(1,mob_id1)+""; if(mob_qt2) mes "Kill: ["+QT_MobKill2+"/"+mob_qt2+"] "+strmobinfo(1,mob_id2)+""; if(mob_qt3) mes "Kill: ["+QT_MobKill3+"/"+mob_qt3+"] "+strmobinfo(1,mob_id3)+""; if(mob_qt4) mes "Kill: ["+QT_MobKill4+"/"+mob_qt4+"] "+strmobinfo(1,mob_id4)+""; if(mob_qt5) mes "Kill: ["+QT_MobKill5+"/"+mob_qt5+"] "+strmobinfo(1,mob_id5)+""; close; } mes "Congratulations, you completed the quest!"; atcommand "@aura 2"; set mob_id1,0; set mob_qt1,0; set mob_id2,0; set mob_qt2,0; set mob_id3,0; set mob_qt3,0; set mob_id4,0; set mob_qt4,0; set mob_id5,0; set mob_qt5,0; close; } mes "Hello, will I now ask you to kill some monsters for me ok?"; if(select("Ok:I do not want...")==2){ close; } next; set mob_id1,1031; //mob_id set mob_qt1,50; //Qty set mob_id2,1002; //mob_id set mob_qt2,150; //Qty set mob_id3,1166; //mob_id set mob_qt3,200; //Qty set mob_id4,1784; //mob_id set mob_qt4,250; //Qty set mob_id5,1095; //mob_id set mob_qt5,300; //Qty mes "Okay, go and kill:", ""+mob_qt1+"x "+strmobinfo(1,mob_id1)+"", ""+mob_qt2+"x "+strmobinfo(1,mob_id2)+"", ""+mob_qt3+"x "+strmobinfo(1,mob_id3)+"", ""+mob_qt4+"x "+strmobinfo(1,mob_id4)+"", ""+mob_qt5+"x "+strmobinfo(1,mob_id5)+""; close; OnNPCKillEvent: if(killedrid == mob_id1){ set QT_MobKill1,QT_MobKill1+1; dispbottom "["+QT_MobKill1+"/"+mob_qt1+"] "+strmobinfo(1,mob_qt1)+""; } if(killedrid == mob_id2){ set QT_MobKill2,QT_MobKill2+1; dispbottom "["+QT_MobKill2+"/"+mob_qt2+"] "+strmobinfo(1,mob_qt2)+""; } if(killedrid == mob_id3){ set QT_MobKill3,QT_MobKill3+1; dispbottom "["+QT_MobKill3+"/"+mob_qt3+"] "+strmobinfo(1,mob_qt3)+""; } if(killedrid == mob_id4){ set QT_MobKill4,QT_MobKill4+1; dispbottom "["+QT_MobKill4+"/"+mob_qt4+"] "+strmobinfo(1,mob_qt4)+""; } if(killedrid == mob_id5){ set QT_MobKill5,QT_MobKill5+1; dispbottom "["+QT_MobKill5+"/"+mob_qt5+"] "+strmobinfo(1,mob_qt5)+""; } end; } 1 Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 13, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 13, 2018 @Hyroshima after I review your script, reminds me of my mission board script, I'm so glad I made that script XD I think your script has a bug, after the player completed the objective and receive the @aura, they can do the quest again also also OnNPCKillEvent: if(killedrid == mob_id1){ set QT_MobKill1,QT_MobKill1+1; dispbottom "["+QT_MobKill1+"/"+mob_qt1+"] "+strmobinfo(1,mob_qt1)+""; } if(killedrid == mob_id2){ set QT_MobKill2,QT_MobKill2+1; dispbottom "["+QT_MobKill2+"/"+mob_qt2+"] "+strmobinfo(1,mob_qt2)+""; } if(killedrid == mob_id3){ set QT_MobKill3,QT_MobKill3+1; dispbottom "["+QT_MobKill3+"/"+mob_qt3+"] "+strmobinfo(1,mob_qt3)+""; } if(killedrid == mob_id4){ set QT_MobKill4,QT_MobKill4+1; dispbottom "["+QT_MobKill4+"/"+mob_qt4+"] "+strmobinfo(1,mob_qt4)+""; } if(killedrid == mob_id5){ set QT_MobKill5,QT_MobKill5+1; dispbottom "["+QT_MobKill5+"/"+mob_qt5+"] "+strmobinfo(1,mob_qt5)+""; } I believe that part should be mob_id1-5 ? erm ... I believe I make simple script complicated again XD http://upaste.me/b10549617c6f2d960 1 Quote Link to comment Share on other sites More sharing options...
0 Capuche Posted April 13, 2018 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 13, 2018 (edited) @AnnieRuru I believe that the player can't finish the quest if the owner raise .questsize value Edited April 13, 2018 by Capuche Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 13, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 13, 2018 (edited) yeah, isn't that's the reason I've also put "I give up ... its too hard" option in the script if the server owner mess up the script ? I saw a typo in the script ... hmm ... maybe that's the one you refer to ? aura_quest$ += "0#0#0#0#0"; change to for-loop Edited April 13, 2018 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
0 sweetmole Posted April 13, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 26 Reputation: 3 Joined: 02/25/13 Last Seen: December 12, 2019 Author Share Posted April 13, 2018 hello masters, Can possible add a item requirements before killing monster?? Quote Link to comment Share on other sites More sharing options...
0 sweetmole Posted April 13, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 26 Reputation: 3 Joined: 02/25/13 Last Seen: December 12, 2019 Author Share Posted April 13, 2018 and also cannot be loop. npc will say " you already have aura or something like that " thanks Quote Link to comment Share on other sites More sharing options...
0 Hyroshima Posted April 13, 2018 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 189 Reputation: 122 Joined: 07/11/14 Last Seen: November 27, 2024 Share Posted April 13, 2018 @AnnieRuru hoho, I have to stop using alt + c & alt + v kk. I work on a very complete quest script and I think the excess complexity is leaving me with the lack of attention kk @sweetmole wait for him to answer his code is impeccél! rsrs Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 14, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 14, 2018 I just modify existing paste then http://upaste.me/b10549617c6f2d960 curious ... do you want to randomize the item requirement too ? I don't really understand what you say 16 hours ago, sweetmole said: and also cannot be loop. npc will say " you already have aura or something like that " thanks I just do it with different aura then 1 1 Quote Link to comment Share on other sites More sharing options...
0 sweetmole Posted April 14, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 26 Reputation: 3 Joined: 02/25/13 Last Seen: December 12, 2019 Author Share Posted April 14, 2018 @AnnieRuru thanks a lot. there is a certain item requirements like 20 different items... Quote Link to comment Share on other sites More sharing options...
0 sweetmole Posted April 14, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 26 Reputation: 3 Joined: 02/25/13 Last Seen: December 12, 2019 Author Share Posted April 14, 2018 @AnnieRuru hi annie i tried the script. working perfectly. thank you for that!! one last request please?? when the player finished the quest. it doesnt need to pick one of those aura options. should be @aura 1 only after the quest is done, this npc will ask you to quest again if they want to change their auras to @aura 2 same thing. kill mobs and item requirements.. Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 16, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 16, 2018 @sweetmole http://upaste.me/b10549617c6f2d960 Quote Link to comment Share on other sites More sharing options...
Question
sweetmole
hi everyone
can i request a simple script like this
an npc that gives u a quest to kill 5 different mobs with 1000 qty. item requirements. once done the npc will set @aura to a player
Link to comment
Share on other sites
20 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.