diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-12-24 07:14:20 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-12-24 07:14:20 -0300 |
commit | e90014e862ca97244f73c5c3ebbfa3b9c8373de4 (patch) | |
tree | 839c4260f65939be92ed83fcb46b93e607b7b2aa | |
parent | e6494d1ef2fd3e34f4c71a03a5ad9b7802c5b461 (diff) | |
download | serverdata-e90014e862ca97244f73c5c3ebbfa3b9c8373de4.tar.gz serverdata-e90014e862ca97244f73c5c3ebbfa3b9c8373de4.tar.bz2 serverdata-e90014e862ca97244f73c5c3ebbfa3b9c8373de4.tar.xz serverdata-e90014e862ca97244f73c5c3ebbfa3b9c8373de4.zip |
Add summoning scrolls (untested)
-rw-r--r-- | db/re/item_db.conf | 132 | ||||
-rw-r--r-- | npc/config/magic.txt | 1 | ||||
-rw-r--r-- | npc/functions/hub.txt | 10 | ||||
-rw-r--r-- | npc/magic/scrolls.txt | 36 | ||||
-rw-r--r-- | npc/scripts.conf | 1 |
5 files changed, 178 insertions, 2 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 63f36ff2b..91181b120 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -18914,6 +18914,138 @@ item_db: ( sc_start SC_DPOISON, 30000, 10; "> }, +{ + Id: 8031 + AegisName: "ScrollSMaggot" + Name: "Scroll Summon Maggot" + Type: "IT_USABLE" + Buy: 15000 + Sell: 150 + Weight: 10 + Refine: false + Delay: 2500 + Script: <" + callfunc "SummonScroll", Maggot, 60, GiantMaggot, 40; + "> +}, +{ + Id: 8032 + AegisName: "ScrollSCave" + Name: "Scroll Summon Cave Maggot" + Type: "IT_USABLE" + Buy: 15000 + Sell: 150 + Weight: 10 + Refine: false + Delay: 2500 + Script: <" + callfunc "SummonScroll", CaveMaggot, 60; + "> +}, +{ + Id: 8033 + AegisName: "ScrollSDragon" + Name: "Scroll Summon Dragon" + Type: "IT_USABLE" + Buy: 150000 + Sell: 1500 + Weight: 10 + Refine: false + Delay: 2500 + Script: <" + callfunc "SummonScroll", GreenDragon, 50, NightmareDragon, 105; + "> +}, +{ + Id: 8034 + AegisName: "ScrollSWolvern" + Name: "Scroll Summon Wolvern" + Type: "IT_USABLE" + Buy: 30000 + Sell: 300 + Weight: 10 + Refine: false + Delay: 2500 + Script: <" + callfunc "SummonScroll", Wolvern, 60; + "> +}, +{ + Id: 8035 + AegisName: "ScrollSYeti" + Name: "Scroll Summon Yeti" + Type: "IT_USABLE" + Buy: 75000 + Sell: 750 + Weight: 10 + Refine: false + Delay: 2500 + Script: <" + callfunc "SummonScroll", Moggun, 60, Yeti, 60; + "> +}, +{ + Id: 8036 + AegisName: "ScrollSTerranite" + Name: "Scroll Summon Terranite" + Type: "IT_USABLE" + Buy: 125000 + Sell: 1250 + Weight: 10 + Refine: false + Delay: 2500 + Script: <" + callfunc "SummonScroll", Terranite, 50, TerraniteProtector, 90; + "> +}, +{ + Id: 8037 + AegisName: "ScrollMagnusHealA" + Name: "Scroll Magnus Heal" + Type: "IT_USABLE" + Buy: 25000 + Sell: 250 + Weight: 10 + Refine: false + Delay: 1500 + Script: <" + @skillId=TMW2_MAGNUSHEAL; @skillLv=1; + @skillTarget=getcharid(3); @scriptsk=true; + callfunc "HUB_SkillInvoke"; + "> +}, +{ + Id: 8038 + AegisName: "ScrollMagnusHealB" + Name: "Scroll Magnus Heal+" + Type: "IT_USABLE" + Buy: 25000 + Sell: 250 + Weight: 10 + Refine: false + Delay: 1500 + Script: <" + @skillId=TMW2_MAGNUSHEAL; @skillLv=5; + @skillTarget=getcharid(3); @scriptsk=true; + callfunc "HUB_SkillInvoke"; + "> +}, +{ + Id: 8039 + AegisName: "ScrollMagnusHealC" + Name: "Scroll Magnus Heal++" + Type: "IT_USABLE" + Buy: 25000 + Sell: 250 + Weight: 10 + Refine: false + Delay: 1500 + Script: <" + @skillId=TMW2_MAGNUSHEAL; @skillLv=10; + @skillTarget=getcharid(3); @scriptsk=true; + callfunc "HUB_SkillInvoke"; + "> +}, ) diff --git a/npc/config/magic.txt b/npc/config/magic.txt index 87a9bc65c..ff3785147 100644 --- a/npc/config/magic.txt +++ b/npc/config/magic.txt @@ -245,6 +245,7 @@ function script alignment_cansummon { if (!@hatesummon) { dispbottom l("Nature itself express hate against you!"); getmapxy(.@m$, .@x, .@y, 0); + // FIXME: .@mob is or may be undefined .@opo=monster(.@m$, .@x, .@y, "Failed summon", .@mob, 1); unitattack(.@opo, getcharid(3)); @hatesummon=true; diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 5c926ccb5..8441436ac 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -386,8 +386,14 @@ function script HUB_SkillInvoke { // TODO: Detect what was script-cast and what was player-case. Then, readd RB_IRCBROADCAST // If you can't do this: You can't do this - if (getskilllv(@skillId) < @skillLv && @skillId != BS_GREED) - Exception("System ERROR, HSI."+@skillId+" INVALID CAST (got "+@skillLv+" expected "+getskilllv(@skillId)+", sub-LC."+(getcharid(3)-2000000)+")", RB_DEBUGMES|RB_ISFATAL); + if (getskilllv(@skillId) < @skillLv && @skillId != BS_GREED) { + // Is this ignorable? + if (@scriptsk) { + @scriptsk=false; + } else { + Exception("System ERROR, HSI."+@skillId+" INVALID CAST (got "+@skillLv+" expected "+getskilllv(@skillId)+", sub-LC."+(getcharid(3)-2000000)+")", RB_DEBUGMES|RB_ISFATAL); + } + } // You are AFK for over 3 minutes, that's crazy, disregard if (checkidle() > 180) return; diff --git a/npc/magic/scrolls.txt b/npc/magic/scrolls.txt new file mode 100644 index 000000000..39672db54 --- /dev/null +++ b/npc/magic/scrolls.txt @@ -0,0 +1,36 @@ +// TMW2 Script +// Author: +// Jesusalva +// Description: +// Scroll System + +// SummonScroll(mob, life, {mob2, minlv}) +function script SummonScroll { + .@mob = getarg(0); + .@tim = getarg(1, 60); + .@mbb = getarg(2, 0); + .@blv = getarg(3, 0); + + // Depending on alignment status, invoke superior form + if (alignment_cansummon() && BaseLevel > .@blv && .@mbb) { + .@mids = summon("Summoned Monster", .@mbb, .@tim); + } else { + .@mids = summon("Summoned Monster", .@mob, .@tim); + } + + // Reconfigure monster modes + .@opt=getunitdata(.@mids, UDT_MODE); + // Disable looting + if (.@opt & MD_LOOTER) + .@opt=.@opt^MD_LOOTER; + // All summons can suffer knockback + if (.@opt & MD_NOKNOCKBACK) + .@opt=.@opt^MD_NOKNOCKBACK; + // Strip summons from BOSS mode and immunity + if (.@opt & MD_BOSS) + .@opt=.@opt^MD_BOSS; + // Save new options + setunitdata(.@mids, UDT_MODE, .@opt); + return; +} + diff --git a/npc/scripts.conf b/npc/scripts.conf index e4ea674cf..98bb5639e 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -136,6 +136,7 @@ "npc/magic/revive.txt", "npc/magic/study.txt", "npc/magic/transmigration.txt", +"npc/magic/scrolls.txt", // These are to be proccessed later "npc/functions/clientversion.txt", |