diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-10-24 13:34:42 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-10-24 13:34:42 -0300 |
commit | 6481ee3bd3f88e6764efba225579375a667c426b (patch) | |
tree | ef2b94564e76832321cf0421caed5f1bece0c156 /npc/033-4 | |
parent | 6b5d2f3fd43bf5d56b57f42f7bd825b7c8a810da (diff) | |
download | serverdata-6481ee3bd3f88e6764efba225579375a667c426b.tar.gz serverdata-6481ee3bd3f88e6764efba225579375a667c426b.tar.bz2 serverdata-6481ee3bd3f88e6764efba225579375a667c426b.tar.xz serverdata-6481ee3bd3f88e6764efba225579375a667c426b.zip |
Move Malindou from 003-3 to 033-4
Diffstat (limited to 'npc/033-4')
-rw-r--r-- | npc/033-4/_import.txt | 1 | ||||
-rw-r--r-- | npc/033-4/malindou.txt | 175 |
2 files changed, 176 insertions, 0 deletions
diff --git a/npc/033-4/_import.txt b/npc/033-4/_import.txt index 9642c94..31fe402 100644 --- a/npc/033-4/_import.txt +++ b/npc/033-4/_import.txt @@ -1,3 +1,4 @@ // Map 033-4: Porthos' Bank // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/033-4/_warps.txt", +"npc/033-4/malindou.txt", diff --git a/npc/033-4/malindou.txt b/npc/033-4/malindou.txt new file mode 100644 index 0000000..0606d7d --- /dev/null +++ b/npc/033-4/malindou.txt @@ -0,0 +1,175 @@ +// TMW-2 Script. +// Author: +// Saulc +// Jesusalva +// Notes: +// Tulim banker, and also handles PCLogin events: CheckClientVersion, and bank +// Take care of server updates, but instances are defined on their ships. + +033-4,35,31,0 script Malindou NPC_LLOYD,{ + Banker(.name$, "Porthos", 50); + close; + +OnInit: + .sex = G_MALE; + .distance = 4; + + // Update handler (use `date +%s` for this) + // Current UPDATE value: Qui Jun 7 08:10:55 -03 2018 + if ($UPDATE < 1528369855) { + $UPDATE=1528369855; + debugmes "Warning."; + debugmes "Warning."; + debugmes "Warning: This introduces a server update:"; + debugmes ""; + debugmes "* Automatic variable setup"; + debugmes ""; + $BCONFN_SPAWN = 70; + $BCONFD_SPAWN = 100; + $BCONFN_MOBHP = 100; + $BCONFD_MOBHP = 90; + $BCONFB_EXPR = 100; + $BCONFN_EXPR = 5; + $BCONFD_EXPR = 0; + $BCONFB_DROP = 100; + $BCONFN_DROP = 7; + $BCONFD_DROP = 0; + $BETASERVER = false; + $AUTORESTART = false; + $ALLIANCE_TAX1 = 7500; + $ALLIANCE_TAX2 = 60; + } + /* + // Current UPDATE value: Ter Jul 28 22:49:52 BRT 2020 + // Tulimshar Volcano + if ($UPDATE < 1595987392) { + $UPDATE=1595987392; + ReplaceItemFromEveryPlayer(816, IcedBottle); + debugmes ""; + debugmes "* Iced Water re-id"; + debugmes ""; + } + // Current UPDATE value: Ter Mar 9 18:45:00 BRT 2021 + // Easter Upgrade + if ($UPDATE < 1615326300) { + $UPDATE=1615326300; + DelChrRegFromEveryPlayer("EASTER_EVENT"); + debugmes ""; + debugmes "* Easter changes"; + debugmes ""; + } + // Current UPDATE value: Qui Set 23 18:46:36 BRT 2021 + // Variable Update + if ($UPDATE < 1632433596) { + $UPDATE=1632433596; + $ALLIANCE_TAX1 = 7500; + $ALLIANCE_TAX2 = 60; + debugmes ""; + debugmes "* New global variables"; + debugmes ""; + } + */ + + + end; + +OnClock0500: + if (gettime(GETTIME_DAYOFMONTH) >= 7) + query_sql("DELETE FROM `chatlog` WHERE `time` < '"+sqldate(-7)+"'"); + query_sql("DELETE FROM `picklog` WHERE `time` < '"+sqldate(0, -3)+"'"); + end; + +// This is for HUB +OnSkillInvoke: + if (!playerattached()) + end; + HUB_SkillInvoke(); + @skillId=0; + end; + +OnPCBonusEvent: + if (!playerattached()) + end; + HUB_PCBonus(); + end; + +OnGlobalChat: + .@msg$ = @chat$; + + // We don't care with punctuation or capitalization + .@msg$ = strtolower(.@msg$); + .@msg$ = replacestr(.@msg$, ",", ""); + .@msg$ = replacestr(.@msg$, ".", ""); + .@msg$ = replacestr(.@msg$, "!", ""); + .@msg$ = replacestr(.@msg$, ":", ""); + .@msg$ = replacestr(.@msg$, ";", ""); + .@msg$ = replacestr(.@msg$, "(", ""); + .@msg$ = replacestr(.@msg$, ")", ""); + .@msg$ = replacestr(.@msg$, "<", ""); + .@msg$ = replacestr(.@msg$, ">", ""); + .@msg$ = replacestr(.@msg$, "*", ""); + + SK_Scripture(.@msg$); + end; + +// Level up events +OnPCBaseLvUpEvent: + end; + +// Every time the server starts, clean up possibly broken data about treasures. +// NPC ID might have changed. +OnInterIfInitOnce: + atcommand("@channel setopt #world MessageDelay 1"); + $@HAS_API=apiasync("PING", ""); + query_sql("DELETE FROM `char_reg_num_db` WHERE `key`='RNGTREASURE_DATE'"); + query_sql("DELETE FROM `char_reg_num_db` WHERE `key`='PVP_COOLDOWN'"); + query_sql("DELETE FROM `char_reg_num_db` WHERE `key`='CHAREG_CLEANUP'"); + end; + +// This control all PC Login events +// Position matters! +OnPCLoginEvent: + // Vault override + if (#MerchantBank) { + if (#MerchantBank < 0) + consolebug("Negative bank data for %s!", strcharinfo(0)); + BankVault += #MerchantBank; + #MerchantBank = 0; + } + + // Cannot login with outdated client + checkclientversion(); + + // Message of the Day have priority + MOTDHandler(); + + // Scheduled Announces + StoneBoardRead(); + + // TODO: npc/commands/rate-management.txt + + // Main update handler + clientupdater(); + + // Position and gameplay fixes + HUB_Login(); + + // Alcohol system reset + ALCReset(); + + // Daily rewards (The first with dialog interactions) + daily_login_bonus_handler(); + + // Guild Weekly Login Bonus + guild_login_bonus(); + + // Thanksgiving Event + sThanksgiving(); + end; +} + +/* Some hacks */ +function script refinesync { + return; +} + |