@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 )