Just created this "system" for my map, there a lot of repeatable quests and i don't want to create them one by one, that's very boring. So i decided to make my life a little bit easier.
Will it work fine in MUI(Quests is intended to be for ALL players they will just gain lower rewards if they are lower/higher requirement level)?
Unit buy a item from shop(power-up) => set RepeatableQuest_id = item hp(im setting them 1,2,3,4,5 and etc hp in object editor)
Unit dies => set RepeatableQuestUnit_ID = supply used by that unit(same with items, can't use point-value because it's used in respawn system)
This is quests preset where i give all quests "stats"
Will it work fine in MUI(Quests is intended to be for ALL players they will just gain lower rewards if they are lower/higher requirement level)?
Unit buy a item from shop(power-up) => set RepeatableQuest_id = item hp(im setting them 1,2,3,4,5 and etc hp in object editor)
Unit dies => set RepeatableQuestUnit_ID = supply used by that unit(same with items, can't use point-value because it's used in respawn system)
This is quests preset where i give all quests "stats"
-
RepeatableQuestsPresets
-
Events
- Time - Elapsed game time is 1.00 seconds
- Conditions
-
Actions
- -------- ================================================================================================================ --------
- Set VariableSet RepeatableQuestInit = 1
- -------- ========================WolfsQuest======================== --------
- Set VariableSet RepeatableQuestKillCount[RepeatableQuestInit] = 0
- Set VariableSet RepeatableQuestKillRequired[RepeatableQuestInit] = 50
- Set VariableSet RepeatableQuestMaxLevel[RepeatableQuestInit] = 10
- Set VariableSet RepeatableQuestMinLevel[RepeatableQuestInit] = 1
- Set VariableSet RepeatableQuestRewardGold[RepeatableQuestInit] = 5
- Set VariableSet RepeatableQuestRewardXP[RepeatableQuestInit] = 50
- Set VariableSet RepeatableQuestRewardGoldNerfe[RepeatableQuestInit] = 1
- Set VariableSet RepeatableQuestRewardXPNerfed[RepeatableQuestInit] = 5
- Set VariableSet RepeatableQuestTitle[RepeatableQuestInit] = |cffd45e19Wolfs!
- Set VariableSet RepeatableQuestDesc[RepeatableQuestInit] = |cffd45e19Kill 50 wolves. Reward - 100 exp, 5 gold.|r |cffff0000Max Level - 10.|r
- Set VariableSet RepeatableQuestIconPath[RepeatableQuestInit] = ReplaceableTextures\CommandButtons\BTNTimberWolf.blp
- -------- ================================================================================================================ --------
- -------- ================================================================================================================ --------
- Set VariableSet RepeatableQuestInit = (RepeatableQuestInit + 1)
- -------- ========================GnollsQuest======================== --------
- Set VariableSet RepeatableQuestKillCount[RepeatableQuestInit] = 0
- Set VariableSet RepeatableQuestKillRequired[RepeatableQuestInit] = 75
- Set VariableSet RepeatableQuestMaxLevel[RepeatableQuestInit] = 20
- Set VariableSet RepeatableQuestMinLevel[RepeatableQuestInit] = 10
- Set VariableSet RepeatableQuestRewardGold[RepeatableQuestInit] = 15
- Set VariableSet RepeatableQuestRewardXP[RepeatableQuestInit] = 200
- Set VariableSet RepeatableQuestRewardGoldNerfe[RepeatableQuestInit] = 1
- Set VariableSet RepeatableQuestRewardXPNerfed[RepeatableQuestInit] = 5
- Set VariableSet RepeatableQuestTitle[RepeatableQuestInit] = |cffd45e19Gnolls|R
- Set VariableSet RepeatableQuestDesc[RepeatableQuestInit] = |cffd45e19Kill 75 gnolls.|r|n|cff00ffffReward : 200 exp, 15 gold|r. |cffff0000Min lvl - 10, Max lvl - 20 |r|r
- Set VariableSet RepeatableQuestIconPath[RepeatableQuestInit] = ReplaceableTextures\CommandButtons\BTNGnollWarden.blp
- -------- ================================================================================================================ --------
-
Events
-
RepeatableQuestsStart
-
Events
- Unit - Village Elder 0157 <gen> Sells an item (from shop)
- Unit - Village Engineer 0085 <gen> Sells an item (from shop)
-
Conditions
- (Item: (Sold Item)'s Integer Field: Hit Points ('ihtp')) Less than 10000
-
Actions
- Set VariableSet RepeatableQuest_id = (Item: (Sold Item)'s Integer Field: Hit Points ('ihtp'))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RepeatableQuestBool[RepeatableQuest_id] Equal to Да
- ((Buying unit) is A Hero) Equal to Да
- RepeatableQuestKillCount[RepeatableQuest_id] Equal to RepeatableQuestKillRequired[RepeatableQuest_id]
-
Then - Actions
- Quest - Destroy RepeatableQuest[RepeatableQuest_id]
- Set VariableSet RepeatableQuestKillCount[RepeatableQuest_id] = 0
- Set VariableSet RepeatableQuestBool[RepeatableQuest_id] = Нет
- Sound - Play Rescue <gen>
- Set VariableSet RepeatableQuestInt = 0
-
For each (Integer A) from 1 to PlayerAmount, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero level of hero[RepeatableQuestInt]) Less than or equal to RepeatableQuestMaxLevel[RepeatableQuest_id]
- (Hero level of hero[RepeatableQuestInt]) Greater than or equal to RepeatableQuestMinLevel[RepeatableQuest_id]
-
Then - Actions
- Hero - Add RepeatableQuestRewardXP[RepeatableQuest_id] experience to hero[RepeatableQuestInt], Show level-up graphics
- Player - Add RepeatableQuestRewardGold[RepeatableQuest_id] to (Owner of hero[RepeatableQuestInt]).Current gold
-
Else - Actions
- Hero - Add RepeatableQuestRewardXPNerfed[RepeatableQuest_id] experience to hero[RepeatableQuestInt], Show level-up graphics
- Player - Add RepeatableQuestRewardGoldNerfe[RepeatableQuest_id] to (Owner of hero[RepeatableQuestInt]).Current gold
-
If - Conditions
- Set VariableSet RepeatableQuestInt = (RepeatableQuestInt + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RepeatableQuestBool[RepeatableQuest_id] Equal to Нет
-
Then - Actions
- Quest - Create a Optional quest titled RepeatableQuestTitle[RepeatableQuest_id] with the description RepeatableQuestDesc[RepeatableQuest_id], using icon path RepeatableQuestIconPath[RepeatableQuest_id]
- Set VariableSet RepeatableQuestBool[RepeatableQuest_id] = Да
- Set VariableSet RepeatableQuest[RepeatableQuest_id] = (Last created quest)
- Sound - Play QuestNew <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
-
RepeatableQuestProgress
-
Events
- Unit - A unit Dies
-
Conditions
- (Owner of (Dying unit)) Equal to Player 23 (Emerald)
-
Actions
- Set VariableSet RepeatableQuestUnit_ID = (Supply used by (Dying unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RepeatableQuestBool[RepeatableQuestUnit_ID] Equal to Да
- RepeatableQuestKillCount[RepeatableQuestUnit_ID] Less than RepeatableQuestKillRequired[RepeatableQuestUnit_ID]
-
Then - Actions
- Set VariableSet RepeatableQuestKillCount[RepeatableQuestUnit_ID] = (RepeatableQuestKillCount[RepeatableQuestUnit_ID] + 1)
- Quest - Change the description of RepeatableQuest[RepeatableQuestUnit_ID] to ((RepeatableQuestDesc[RepeatableQuestUnit_ID] + |n|n|cffff0000Killed: ) + ((String(RepeatableQuestKillCount[RepeatableQuestUnit_ID])) + ((/ + (String(RepeatableQuestKillRequired[RepeatableQuestUnit_ID]))) + |r)))
- Else - Actions
-
If - Conditions
-
Events