diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-05-24 23:40:12 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-05-24 23:40:12 -0300 |
commit | 6e6d7c558e80866e53454048608abae093eefcfe (patch) | |
tree | 7574ab793cea2f544343a54ac3656498b7d39390 | |
parent | 226072b5fc269e2e1565d2e616938d6d11a36607 (diff) | |
download | serverdata-6e6d7c558e80866e53454048608abae093eefcfe.tar.gz serverdata-6e6d7c558e80866e53454048608abae093eefcfe.tar.bz2 serverdata-6e6d7c558e80866e53454048608abae093eefcfe.tar.xz serverdata-6e6d7c558e80866e53454048608abae093eefcfe.zip |
Upgrade Mirror Lake rules, and force-equip the Mirror Lake Armor
-rw-r--r-- | db/re/item_db.conf | 51 | ||||
-rw-r--r-- | npc/functions/hub.txt | 30 |
2 files changed, 77 insertions, 4 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index cfc7180ba..a92b7c2f0 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -7374,6 +7374,57 @@ item_db: ( addtoskill(TMW2_SPEECH, 1, 2); "> }, +{ + Id: 1340 + AegisName: "MirrorLakeArmor" + Name: "Mirror Lake Armor" + Type: "IT_ARMOR" + Buy: 0 + Sell: 0 + Weight: 0 + Def: 0 + Loc: "EQP_HEAD_MID" + EquipLv: 0 + Refine: false + AllowPickup: false + Trade: { + nodrop: true + notrade: true + partneroverride: false + noselltonpc: true + nocart: true + nostorage: true + nogstorage: true + nomail: true + noauction: true + } + Script: <" + .@slv = callfunc("get_byte", ##00_INFO, 0) + 1; + + // Bonus + bonus bMaxHP, .@slv*100; + bonus bMaxSP, .@slv*20; + bonus bAllStats, .@slv*5; + bonus bDef2, .@slv*10; + bonus bDef, .@slv*10; + bonus bFlee, .@slv*10; + bonus bHitRate, .@slv*10; + bonus bAddMaxWeight, .@slv*25; + + // Penalties + bonus bAtkRate,-100; + bonus bMatkRate,-100; + bonus bBaseAtk,-300; + bonus bCriticalRate,-100; + bonus bCastrate, -500; + bonus bDelayrate, 50; + + // Neutral + bonus bAtkEle, Ele_Ghost; + bonus bDefEle, Ele_Ghost; + "> + OnUnequipScript: <" equip(1340); "> +}, // Boots { diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index f9987f9b5..382fb21d7 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -26,17 +26,29 @@ function script HUB_Login { if (getvaultid()) { .@gto=get_byte(##00_INFO, 3); .@mlp=get_nibble(##00_INFO, 5); - if (.@gto == $WID) { + // Work only on new chars, or chars which cleared Tulimshar. + if (.@gto == $WID && + (!getq(General_Narrator) || + (getq(General_Narrator) && BaseLevel > 20))) + { // Warp to the proper Mirror Lake switch (.@mlp) { - case 1: warp "018-7-1", 90, 47; break; - default: warp "014-4", 28, 31; break; + case 1: warp "018-7-1", 90, 47; LOCATION$ = "LoF"; break; + default: warp "014-4", 28, 31; LOCATION$ = "LoF"; break; } // Send debug information debugmes("Vault User %d moved to lake %d.", getvaultid(), .@mlp); - // FIXME: Handle new user (non-native) accounts + // Handle new user (non-native) accounts + if (!getq(General_Narrator)) { + getitembound MirrorLakeArmor, 1, 4; + equip(MirrorLakeArmor); + TUTORIAL=true; + //BaseLevel = get_byte(##00_INFO, 0) + 1; + // TODO: Display quick tutorial + dispbottom l("Mirror Lake : Obtain help with %s.", b("@info")); + } // Unset the target lake/world set_byte(##00_INFO, 0, 3); @@ -261,6 +273,16 @@ function script HUB_Logout { "MLTO", 0); ##VAULT_EXP=0; api_send(API_FLUSHVAULT, .@api$); + // Destroy temporary characters + if (countitem(MirrorLakeArmor)) { + delitem MirrorLakeArmor, countitem(MirrorLakeArmor); + clearitem(); + resetlvl(2); + resetstatus(); + resetskill(); + warp "000-0", 22, 24; + debugmes("Vault User %d reset!", getvaultid()); + } } } |