diff options
author | wushin <pasekei@gmail.com> | 2015-08-27 21:51:33 -0500 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2015-08-27 21:51:33 -0500 |
commit | be594ed37e06b2c2e63ecb678fc6a854059acde2 (patch) | |
tree | de61937621e2bf197198a96a83ff328eb937794c /world | |
parent | 49207457d8e7767a12b3a1be8e667660c06b8eb7 (diff) | |
download | serverdata-be594ed37e06b2c2e63ecb678fc6a854059acde2.tar.gz serverdata-be594ed37e06b2c2e63ecb678fc6a854059acde2.tar.bz2 serverdata-be594ed37e06b2c2e63ecb678fc6a854059acde2.tar.xz serverdata-be594ed37e06b2c2e63ecb678fc6a854059acde2.zip |
Cash in max items/dp in Daily Quests
Diffstat (limited to 'world')
-rw-r--r-- | world/map/npc/functions/dailyquest.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/world/map/npc/functions/dailyquest.txt b/world/map/npc/functions/dailyquest.txt index 4448feed..4bbe7800 100644 --- a/world/map/npc/functions/dailyquest.txt +++ b/world/map/npc/functions/dailyquest.txt @@ -68,6 +68,7 @@ function|script|DailyQuest mes "\"If you bring me " + @dq_count + " " + @dq_friendly_name$ + ", I will give you a reward.\""; menu "I have what you want.", L_Trade, + "Take all you need.", L_All, "Ok, I'll get to work.", L_Next, "Nah, I'm not going to help you.", L_Next; @@ -95,6 +96,35 @@ L_Trade: mes "[" + @dq_exp + " experience points]"; goto L_Exit_Good; +L_All: + if (countitem(@dq_name$) < @dq_count) + goto L_Not_Enough; + + set @item_multiple, (countitem(@dq_name$) / @dq_count); + set @dp_multiple, (DailyQuestPoints / @dq_cost); + + if (@dp_multiple > @item_multiple) + set @multipler, @item_multiple; + if (@item_multiple >= @dp_multiple) + set @multipler, @dp_multiple; + + set DailyQuestPoints, DailyQuestPoints - (@dq_cost * @multipler); + + delitem @dq_name$, (@dq_count * @multipler); + + set Zeny, Zeny + (@dq_money * @multipler); + getexp (@dq_exp * @multipler), 0; + + if (@dq_handle_return) + goto L_Exit_Good; + + mes "\"Thank you!\""; + callsub S_SayPhrase; + mes ""; + mes "[" + (@dq_money * @multipler) + " money]"; + mes "[" + (@dq_exp * @multipler) + " experience points]"; + goto L_Exit_Good; + L_Exit_Good: set @dq_return, 4; goto L_Exit; |