diff options
author | Jessica Tölke <jtoelke@mail.upb.de> | 2012-10-20 21:52:55 +0200 |
---|---|---|
committer | Jessica Tölke <jtoelke@mail.upb.de> | 2012-10-21 10:32:42 +0200 |
commit | a9486fc70e9b7678c3289c0550df28e0a642f18b (patch) | |
tree | 9351a7188a7d1815970213d441df08075bfbbf23 | |
parent | b28b3f4ef54b8b1b2619ed8ff66256b6459a5071 (diff) | |
download | classic-serverdata-a9486fc70e9b7678c3289c0550df28e0a642f18b.tar.gz classic-serverdata-a9486fc70e9b7678c3289c0550df28e0a642f18b.tar.bz2 classic-serverdata-a9486fc70e9b7678c3289c0550df28e0a642f18b.tar.xz classic-serverdata-a9486fc70e9b7678c3289c0550df28e0a642f18b.zip |
Daily Quest: some coding style changes.
Command after if in newline.
Newline after menu.
Whitespace after //
-rw-r--r-- | world/map/npc/functions/dailyquest.txt | 34 |
1 files changed, 20 insertions, 14 deletions
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; |