From a9486fc70e9b7678c3289c0550df28e0a642f18b Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Sat, 20 Oct 2012 21:52:55 +0200 Subject: Daily Quest: some coding style changes. Command after if in newline. Newline after menu. Whitespace after // --- world/map/npc/functions/dailyquest.txt | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'world/map/npc') diff --git a/world/map/npc/functions/dailyquest.txt b/world/map/npc/functions/dailyquest.txt index 16f015a9..6a09c291 100644 --- a/world/map/npc/functions/dailyquest.txt +++ b/world/map/npc/functions/dailyquest.txt @@ -23,29 +23,34 @@ // Variables used inside: // DailyQuestPoints - The number of points the player currently has // DailyQuestTime - Time since DailyQuestPoints was lasted renewed -// DailyQuestBonus - Additional points added once in addition to player BaseLevel +// DailyQuestBonus - Additional points added in addition to player BaseLevel // (DailyQuestBonus makes a good reward from non-daily quests) + function|script|DailyQuest|{ set @dq_earliest, gettimetick(2) - 86400; - if (DailyQuestTime < @dq_earliest) set DailyQuestTime, @dq_earliest; + if (DailyQuestTime < @dq_earliest) + set DailyQuestTime, @dq_earliest; - //how many whole daily quest points the player has earned - //we increment DailyQuestTime by the number of seconds in that many increments + // how many whole daily quest points the player has earned + // we increment DailyQuestTime by the number of seconds in that many increments set @dq_increments, (gettimetick(2) - DailyQuestTime)*BaseLevel / 86400; - set DailyQuestTime, DailyQuestTime+@dq_increments*86400/BaseLevel; + set DailyQuestTime, DailyQuestTime + @dq_increments*86400/BaseLevel; - //player can't regenerate any quest points, but might have a bonus - if (DailyQuestPoints >= BaseLevel) goto L_Bonus; + // player can't regenerate any quest points, but might have a bonus + if (DailyQuestPoints >= BaseLevel) + goto L_Bonus; - //normal recharging case - increment, but don't let it recharge more than a day's worth + // normal recharging case - increment, but don't let it recharge more than a day's worth set DailyQuestPoints, DailyQuestPoints + @dq_increments; - if (DailyQuestPoints > BaseLevel) set DailyQuestPoints, BaseLevel; - //fallthrough to bonus, which *is* allowed to push DailyQuestPoints above BaseLevel + if (DailyQuestPoints > BaseLevel) + set DailyQuestPoints, BaseLevel; + // fallthrough to bonus, which *is* allowed to push DailyQuestPoints above BaseLevel L_Bonus: - if (DailyQuestBonus != 0) set DailyQuestPoints, DailyQuestPoints + DailyQuestBonus; + if (DailyQuestBonus != 0) + set DailyQuestPoints, DailyQuestPoints + DailyQuestBonus; set DailyQuestBonus, 0; if (BaseLevel < @dq_level) @@ -54,9 +59,10 @@ L_Bonus: goto L_Not_Enough_Points; mes "\"If you bring me " + @dq_count + " " + @dq_friendly_name$ + ", I will give you a reward.\""; - menu "I have what you want.", L_Trade, - "Ok, I'll get to work.", -, - "Nah, I'm not going to help you.", -; + menu + "I have what you want.", L_Trade, + "Ok, I'll get to work.", -, + "Nah, I'm not going to help you.", -; set @dq_return, 1; goto L_Exit; -- cgit v1.2.3-70-g09d2