Rafael 0 Report post Posted May 28, 2017 I need help, i want put 5 items with random quest, click = get 1 random of 5 quest when you finish the quest go for the other item. 5 Items = 5 random quest ea, then 5 items = 25 quests, how i can do a "random quest"? Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted May 28, 2017 (edited) @Rafael Not if this works .. you will have to try, I did while reading your post, anyway .. Try it! -----in Npcscript0x.lua function rand_quest() Talk( 1, "PKODev: bla bla bla") RandQuest = {} RandQuest[1] = 0001 - put your quest Id RandQuest[2] = 0002 - put your quest Id RandQuest[3] = 0003 - put your quest Id RandQuest[4] = 0004 - put your quest Id RandQuest[5] = 0005 - put your quest Id local i = math.random (1,5) AddMission(RandQuest[i]) end ---in Missionscript0x.lua QuestItem ={} QuestItem[1] = #### - put your item Id QuestItem[2] = #### - put your item Id QuestItem[3] = #### - put your item Id QuestItem[4] = #### - put your item Id QuestItem[5] = #### - put your item Id local i = math.random(1,5) DefineMission( 6000, "Mission Test", 6000 ) MisBeginTalk("<t>Hi! Get Me <r5x> of <b..GetItemName(QuestItem[i])..> and Win <b300M>.") MisBeginCondition(NoMission,6000) MisBeginAction(AddMission,6000) MisBeginAction(AddTrigger, 60001, TE_GETITEM, QuestItem[i] , 5) MisCancelAction(ClearMission, 6000) MisNeed(MIS_NEED_DESP, "Get x700 <rWood>") MisNeed(MIS_NEED_ITEM, QuestItem[i] , 5, 10, 5) MisPrize(MIS_PRIZE_MONEY, 300000000, 1) MisPrizeSelAll() MisHelpTalk("<t>You can get Pine Tree near of Argent") MisResultTalk("<t>Obtain <300M>.") MisResultCondition(HasItem, QuestItem[i] , 5) MisResultAction(TakeItem, QuestItem[i] , 5 ) MisResultAction(ClearMission, 6000) MisResultAction(SetRecord, 6000) MisResultBagNeed(1) InitTrigger() TriggerCondition( 1, IsItem, QuestItem[i] ) TriggerAction( 1, AddNextFlag, 6000, 10, 1 ) RegCurTrigger( 60001 ) Edited May 28, 2017 by Ximboliex 1 Quote Share this post Link to post Share on other sites
Rafael 0 Report post Posted May 29, 2017 thank you, bro! no is my point, but this go work good for me, ty Quote Share this post Link to post Share on other sites
Rafael 0 Report post Posted May 29, 2017 (edited) @Ximboliex function dd_dd() Talk( 1, "dddddddd" ) AddNpcMission(7783) end its work the random, but when i finish the quest still with the same quest, just change with "updateall" its like this now: MOB1 ={} MOB1[1] = 237 MOB1[2] = 298 MOB1[3] = 225 MOB1[4] = 252 MOB1[5] = 93 local a = math.random(1,5) MOB2 ={} MOB2[1] = 62 MOB2[2] = 100 MOB2[3] = 101 MOB2[4] = 203 MOB2[5] = 45 local b = math.random(1,5) MOB3 ={} MOB3[1] = 83 MOB3[2] = 266 MOB3[3] = 46 MOB3[4] = 130 MOB3[5] = 281 local c = math.random(1,5) DefineMission( 7783, "Travel of Gold", 6089 ) MisBeginTalk( "Kill all this mobs and i go give you my Necklace" ) MisBeginAction(AddMission, 6089) MisBeginAction(AddTrigger, 60891, TE_KILL, MOB1[a] , 10 ) MisBeginAction(AddTrigger, 60892, TE_KILL, MOB2 , 10 ) MisBeginAction(AddTrigger, 60893, TE_KILL, MOB3[c] , 10 ) MisCancelAction( ClearMission, 6089) MisNeed(MIS_NEED_DESP, "<Good Luck!> ") MisNeed(MIS_NEED_KILL,MOB1[a] , 10, 10, 10 ) MisNeed(MIS_NEED_KILL,MOB2 , 10, 20, 10 ) MisNeed(MIS_NEED_KILL,MOB3[c] , 10, 30, 10 ) MisPrize(MIS_PRIZE_MONEY, 500000, 1) MisPrizeSelAll() MisResultTalk("Nice, you follow my words! Here is the Necklace.") MisHelpTalk("In Forgotten Island you can find this mobs.") MisResultCondition(HasMission, 6089) MisResultCondition(HasFlag, 6089, 19 ) MisResultCondition(HasFlag, 6089, 29 ) MisResultCondition(HasFlag, 6089, 39 ) MisResultAction(ClearMission, 6089 ) MisResultBagNeed(1) InitTrigger() TriggerCondition( 1, IsMonster,MOB1[a] ) TriggerAction( 1, AddNextFlag, 6089, 10, 10 ) RegCurTrigger( 60891 ) InitTrigger() TriggerCondition( 1, IsMonster,MOB2 ) TriggerAction( 1, AddNextFlag, 6089, 20, 10 ) RegCurTrigger( 60892 ) InitTrigger() TriggerCondition( 1, IsMonster,MOB3[c] ) TriggerAction( 1, AddNextFlag, 6089, 30, 10 ) RegCurTrigger( 60893 ) Edited May 29, 2017 by Rafael Quote Share this post Link to post Share on other sites
Rafael 0 Report post Posted May 29, 2017 (edited) MisNeed(MIS_NEED_KILL,MOB2 , 10, 20, 10) have MOB2 [ b ] no work put together in this forum lol Edited May 29, 2017 by Rafael Quote Share this post Link to post Share on other sites
Maximilian 25 Report post Posted May 29, 2017 I would suggest looking at "A [Class]'s Life" quests. (A Swordsman'sLiife from Peter , A Herbalist's Life from Gannon , and so on. Every class-quest bearing NPC has it) Instead of making 5 different quests and setting them to come up randomly , just make one quest with randomized goals. Quote Share this post Link to post Share on other sites