diff options
author | gumi <git@gumi.ca> | 2019-04-08 16:47:30 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2019-04-08 16:47:34 -0400 |
commit | 6b9477145428ef2aa9bd1b146ab43e9f365fa70d (patch) | |
tree | bd96fb8b37ddac3438c3ca8df2eb0af2c1f0c582 | |
parent | 604d1c7945c0ecab7a1651f24a9f970210834a22 (diff) | |
download | serverdata-6b9477145428ef2aa9bd1b146ab43e9f365fa70d.tar.gz serverdata-6b9477145428ef2aa9bd1b146ab43e9f365fa70d.tar.bz2 serverdata-6b9477145428ef2aa9bd1b146ab43e9f365fa70d.tar.xz serverdata-6b9477145428ef2aa9bd1b146ab43e9f365fa70d.zip |
add the anniversary hatstmp
Co-authored-by: Jesusaves <cpntb1@ymail.com>
Co-authored-by: Micksha <Micksha@users.noreply.github.com>
m--------- | client-data | 0 | ||||
-rw-r--r-- | world/map/db/item_db_head.txt | 5 | ||||
-rw-r--r-- | world/map/db/item_db_use.txt | 1 | ||||
-rw-r--r-- | world/map/npc/functions/global_event_handler.txt | 5 | ||||
-rw-r--r-- | world/map/npc/items/tmwgift.txt | 32 | ||||
-rw-r--r-- | world/map/npc/scripts.conf | 1 |
6 files changed, 44 insertions, 0 deletions
diff --git a/client-data b/client-data -Subproject 9f188983c4711358ce4bad4a78ddd5501c265c3 +Subproject 501a122d0d9767f705e471793c2555564827bd2 diff --git a/world/map/db/item_db_head.txt b/world/map/db/item_db_head.txt index c082e89f..01d261db 100644 --- a/world/map/db/item_db_head.txt +++ b/world/map/db/item_db_head.txt @@ -199,3 +199,8 @@ 5228, ChicSantaHat, 5, 400, 200, 20, 0, 2, 0, -2, 0, 2, 256, 0, 0, 0, {}, {} //ID, Name___________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript} 5229, ScentedCandleHelmet, 5, 20000, 1, 450, 0, 10, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bInt, 2; addtimer 1, "ScentedCandle::OnEquip";} +5230, AnniversaryHat, 5, 100000, 1, 100, 0, 12, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bInt, 2;} +5231, RedPresentHat, 5, 1000, 1, 60, 0, 1, 0, 0, 0, 2, 256, 0, 0, 0, {}, {} +5232, GreenPresentHat, 5, 1000, 1, 60, 0, 1, 0, 0, 0, 2, 256, 0, 0, 0, {}, {} +5233, BluePresentHat, 5, 1000, 1, 60, 0, 1, 0, 0, 0, 2, 256, 0, 0, 0, {}, {} +5234, YellowPresentHat, 5, 1000, 1, 60, 0, 1, 0, 0, 0, 2, 256, 0, 0, 0, {}, {} diff --git a/world/map/db/item_db_use.txt b/world/map/db/item_db_use.txt index 2b58cdcb..9b6a49a4 100644 --- a/world/map/db/item_db_use.txt +++ b/world/map/db/item_db_use.txt @@ -97,3 +97,4 @@ 5210, GrassFedTofu, 0, 50, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {heal -10, -2, 1;}, {} 5213, VeganWater, 0, 200, 100, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {heal 250, 0, 1;getitem 540, 1;}, {} 5214, LactoseFreeAcorn, 0, 100, 50, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {heal 15, 0, 1;}, {} +5235, TMWBirthdayGift, 0, 1000000, 50, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {callfunc "TMWBirthdayGift";}, {} diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index 9e0b495d..987845bb 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -14,6 +14,7 @@ OnPCLoginEvent: callfunc "DisplayMOTD"; // send the motd to the client, if enabled callfunc "getBroadcast"; // get the scheduled broadcast, if any addtimer 0, "Magic Timer::OnLogin"; // prevent cast rate abuse + callfunc "MaybeGiveBirthday"; // add more here set @login_event, 2; end; @@ -37,4 +38,8 @@ OnInit: callfunc "ClearGlobalVars"; callfunc "MOTD"; // set the MOTD array end; + +OnDay0411: + callfunc "MaybeAnnounceBirthday"; + end; } diff --git a/world/map/npc/items/tmwgift.txt b/world/map/npc/items/tmwgift.txt new file mode 100644 index 00000000..ebc3f7b6 --- /dev/null +++ b/world/map/npc/items/tmwgift.txt @@ -0,0 +1,32 @@ +function|script|MaybeAnnounceBirthday +{ + if (gettime(7) == 2019 && gettime(6) == 4 && gettime(5) == 11) + goto L_B15; + return; + +L_B15: + announce "It is TMW's 15th Anniversary! Log out and log back in to [@@https://themanaworld.org/15|receive your present@@]", 0; + return; +} + +function|script|MaybeGiveBirthday +{ + if ((gettime(7) == 2019) && (gettime(6) == 4) && + ((gettime(5) == 11) || (gettime(5) == 12) || (gettime(5) == 13)) && + #TMW15 == 0) + goto L_Give; + return; + +L_Give: + set #TMW15, gettimetick(2); + getitem "TMWBirthdayGift", 1; + message strcharinfo(0), "Server : ##BIt's TMW's 15th Anniversary! You have [@@https://themanaworld.org/15|received a present@@]!"; + return; +} + +function|script|TMWBirthdayGift +{ + setarray .@gifts$, "RedPresentHat", "GreenPresentHat", "BluePresentHat", "YellowPresentHat"; + getitem .@gifts$[rand(4)], 1; + return; +} diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index 1b67d647..5a850bb6 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -46,6 +46,7 @@ npc: npc/items/check_wand.txt npc: npc/items/mirror.txt npc: npc/items/rubber_bat.txt npc: npc/items/scentedcandle.txt +npc: npc/items/tmwgift.txt import: npc/_import.txt // magic |