summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-28 03:59:42 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-28 03:59:42 -0300
commit503a4b600768ee7599b4c065de519d4f42430f10 (patch)
tree5318578b99c72524d128f693ca5d5b48aa85afac
parent4c766ea76c95fa3f836bb10a1f543c8b8aa07949 (diff)
downloadserverdata-503a4b600768ee7599b4c065de519d4f42430f10.tar.gz
serverdata-503a4b600768ee7599b4c065de519d4f42430f10.tar.bz2
serverdata-503a4b600768ee7599b4c065de519d4f42430f10.tar.xz
serverdata-503a4b600768ee7599b4c065de519d4f42430f10.zip
Initial sketch of Guild Magic
-rw-r--r--db/re/skill_tree.conf3
-rw-r--r--npc/042-0/arthur.txt1
-rw-r--r--npc/commands/kami.txt6
-rw-r--r--npc/functions/filters.txt29
-rw-r--r--npc/items/grenade.txt24
-rw-r--r--npc/items/inc_sc_bonus.txt3
-rw-r--r--npc/magic/guild.txt71
7 files changed, 116 insertions, 21 deletions
diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf
index bb3d1ec78..b706273bc 100644
--- a/db/re/skill_tree.conf
+++ b/db/re/skill_tree.conf
@@ -165,6 +165,9 @@ Human: {
GD_REGENERATION: 0
GD_RESTORE: 0
GD_EMERGENCYCALL: 0
+
+ // Guild Skills (beta)
+
/*
WZ_STORMGUST: 3
WE_BABY: 0
diff --git a/npc/042-0/arthur.txt b/npc/042-0/arthur.txt
index 984f0b28c..29480d83c 100644
--- a/npc/042-0/arthur.txt
+++ b/npc/042-0/arthur.txt
@@ -71,6 +71,7 @@ L_Quest:
next;
// Be sure the quest only starts now, and destroy any eventual artifact
$KAMELOT_QUEST[.@g]=1;
+ $KAMELOT_KEYMASK[.@g]=any(1,2,4,8);
if (!is_admin()) // FIXME: This should be unconditional
$KAMELOT_COOLDOWN[.@g] = gettimeparam(GETTIME_WEEKDAY);
mapannounce(getmap(), "##1KAMELOT CASTLE, GUILD DUNGEON: MISSION START!", bc_map);
diff --git a/npc/commands/kami.txt b/npc/commands/kami.txt
index 7ac50c7bc..4b62cfb17 100644
--- a/npc/commands/kami.txt
+++ b/npc/commands/kami.txt
@@ -73,7 +73,11 @@ OnSkry:
OnJustDoIt:
//dispbottom l("STR: %d AGI %d VIT %d", readparam2(bStr), readparam2(bAgi), readparam2(bVit));
- unitskilluseid(getcharid(3), 10010, 1, getcharid(3));
+ //unitskilluseid(getcharid(3), GD_LEADERSHIP, 1, getcharid(3));
+ // This is only for testing
+
+ // areasc(range, time, skill code, who targets, power, filter)
+ //areasc(9, 20000, SC_MAGNIFICAT, BL_PC, 1, "filter_sameguild");
end;
OnInit:
diff --git a/npc/functions/filters.txt b/npc/functions/filters.txt
index 77833d5fb..cec7a15af 100644
--- a/npc/functions/filters.txt
+++ b/npc/functions/filters.txt
@@ -26,6 +26,15 @@ function script filter_sameguild {
return (strcharinfo(2, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(2));
}
+// filter_sameguildnotyou( id )
+function script filter_sameguildnotyou {
+ if (getcharid(2) < 1)
+ return false;
+ if (getarg(0) == getcharid(3))
+ return false;
+ return (strcharinfo(2, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(2));
+}
+
// filter_sameparty( id )
function script filter_sameparty {
if (getcharid(1) < 1 && getarg(0) != getcharid(3))
@@ -33,6 +42,26 @@ function script filter_sameparty {
return (strcharinfo(1, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(1));
}
+// filter_sameguildorparty( id )
+function script filter_sameguildorparty {
+ if (getcharid(2) < 1 && getcharid(1) < 1)
+ return false;
+ .@party=(strcharinfo(1, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(1));
+ .@guild=(strcharinfo(2, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(2));
+ return ((getcharid(1) > 0 && .@party) || (getcharid(2) > 0 && .@guild));
+}
+
+// filter_sameguildorpartynotyou( id )
+function script filter_sameguildorpartynotyou {
+ if (getarg(0) == getcharid(3))
+ return false;
+ if (getcharid(2) < 1 && getcharid(1) < 1)
+ return false;
+ .@party=(strcharinfo(1, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(1));
+ .@guild=(strcharinfo(2, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(2));
+ return ((getcharid(1) > 0 && .@party) || (getcharid(2) > 0 && .@guild));
+}
+
// filter_notboss( id )
function script filter_notboss {
// 32 = MD_BOSS
diff --git a/npc/items/grenade.txt b/npc/items/grenade.txt
index f2e749ba9..0275606b4 100644
--- a/npc/items/grenade.txt
+++ b/npc/items/grenade.txt
@@ -74,6 +74,30 @@ function script areasc2 {
return;
}
+// areasc3(range, time, sc, bl, val1, val2, filter)
+// Defaults to 3x3 square, sleep mob for 500ms. Ignores you.
+// Need a player caster. Valid BL: BL_MOB | BL_PC | BL_HOM | BL_MER
+function script areasc3 {
+ .@r=getarg(0, 3);
+ .@d=getarg(1, 500);
+ .@s=getarg(2, SC_SLEEP);
+ .@b=getarg(3, BL_MOB);
+ .@v1=getarg(4, 1);
+ .@v2=getarg(5, 1);
+ .@f$=getarg(6, "filter_notme");
+
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@c=getunits(.@b, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r);
+ for (.@i = 0; .@i < .@c; .@i++) {
+ // Filtering
+ if (!callfunc(.@f$, .@mbs[.@i]))
+ continue;
+ sc_start2 .@s, .@d, .@v1, .@v2, 10000, SCFLAG_NONE, .@mbs[.@i];
+ specialeffect(FX_BUFF, AREA, .@mbs[.@i]);
+ }
+ return;
+}
+
// massprovoke(range, {map, x, y}) - player only
function script massprovoke {
getmapxy(.@m$, .@x, .@y, 0);
diff --git a/npc/items/inc_sc_bonus.txt b/npc/items/inc_sc_bonus.txt
index 98e4ca104..a26d5701e 100644
--- a/npc/items/inc_sc_bonus.txt
+++ b/npc/items/inc_sc_bonus.txt
@@ -3,10 +3,11 @@
// Jesusalva
// Description:
// Applies effects for INC_* (STR doesn't exist)
-// Valid values: INCAGI INCVIT INCINT INCDEX INCLUK INCHIT INCFLEE
+// Valid values: INCAGI INCVIT INCINT INCDEX INCLUK INCHIT INCFLEE SC_FURY
// Doesn't works: SC_STRUP
// Works if .@min == .@max: INCMHP INCMHPRATE INCMSP INCMSPRATE
/// Untested Values: WALKSPEED (reverse logic) INVINCIBLE (broken)
+// PS. SC_FURY causes crit rate to increase
//
// Variables:
// .@delay Second of buffing
diff --git a/npc/magic/guild.txt b/npc/magic/guild.txt
index 0b4a5d502..47a5df62b 100644
--- a/npc/magic/guild.txt
+++ b/npc/magic/guild.txt
@@ -27,10 +27,10 @@ Blesses a targeted location to endow the armor of all players within the area of
SC_KYRIE <sc3: hits/durability>
Creates a protective barrier on a single target that blocks every form of physical damage until its durability wears off or expires. Its durability is a portion of the target's Max HP. This skill cannot be used in conjunction with Assumptio.
-SC_MAGNIFICAT
+*SC_MAGNIFICAT
Temporarily doubles the SP Recovery rate of the user and party members. This skill cannot be used in conjunction with Offertorium . (No params)
-SC_GLORIA
+*SC_GLORIA
Temporarily boosts LUK by 30 to the user and party members.
SC_LEXAETERNA
@@ -42,24 +42,14 @@ Alters the damage variance of the equipped weapon to inflict the maximum of its
SC_ENERGYCOAT
Coats the caster with spiritual energy to buffer all incoming damage temporarily. The more remaining SP the caster has, the more damage is buffered and the more SP is drained. (no params?)
-SC_FURY
-Unleashes the inner power of the user to increase Critical Hit Rate. This skill also doubles the time between the SP Recovery ticks and allows to use specialized skills. (crit boost, float)
-
SC_ASSUMPTIO
Places a temporary buff on a single target that doubles their Hard Defense and Hard Magic Defense. This skill cannot be used in conjunction with Kyrie Eleison and Kaite.
-SC_DONTFORGETME
-Performs a dance that will drop attack and movement speed of all enemies around the performer and cancel all benefits that improve those stats. Maintaining this skill active will drain 1 SP every 10 seconds. (sc3? ASPD/MSPD drops)
-
-SC_RICHMANKIM
-Increases gained exp from mobs killed within the area of effect by (125+11*SkillLV)%. Cannot be canceled by Dispell. (% arg? No code for this?)
-
-SC_GDSKILL_BATTLEORDER
-SC_GDSKILL_REGENERATION
-SC_LEADERSHIP
-SC_GLORYWOUNDS
-SC_SOULCOLD
-SC_HAWKEYES
+// SC_GDSKILL_BATTLEORDER
+-- SC_LEADERSHIP
+-- SC_GLORYWOUNDS
+-- SC_SOULCOLD
+-- SC_HAWKEYES
SC_HUMMING
Increase HIT of players in the area of effect by +2 per SkillLV. The accuracy rate increased by this skill is affected by Dancing Lesson skill level and DEX of the caster. (integer value)
@@ -76,6 +66,16 @@ function script GD_allboost {
}
+// GD_regeneration ( lv )
+// 12x12 HP and MP recovery
+function script GD_regeneration {
+ .@lv=getarg(0, @skillLv);
+ // range, time, SC, BL, power, filter
+ areasc(12, 8000+(1000*.@lv), SC_INCALLSTATUS, BL_PC, 15+(5*.@lv), "filter_sameguild");
+ return;
+}
+
+
// GD_defboost ( lv )
// Places a temporary buff on the user and all party members in a 14x14 area around the user that increases Soft Defense. (VIT def)
function script GD_defboost {
@@ -111,7 +111,7 @@ function script GD_atkboost2 {
function script GD_critboost {
.@lv=getarg(0, @skillLv);
// range, time, SC, BL, 1, power, filter
- areasc3(.@lv, 10000*.@lv, SC_FORTUNE, BL_PC, 8*.@lv, "filter_sameguild");
+ areasc(.@lv, 10000*.@lv, SC_FORTUNE, BL_PC, 8*.@lv, "filter_sameguild");
return;
}
@@ -123,8 +123,41 @@ function script GD_critboost {
function script GD_autorevive {
.@lv=getarg(0, @skillLv);
// range, time, SC, BL, 1, power, filter
- areasc3(.@lv, 10000*.@lv, SC_KAIZEL, BL_PC, 10*.@lv, "filter_sameguildnotyou");
+ areasc(.@lv, 10000*.@lv, SC_KAIZEL, BL_PC, 10*.@lv, "filter_sameguildnotyou");
+ return;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// maximizepower ( lv )
+// Damage always at max
+function script maximizepower {
+ .@lv=getarg(0, @skillLv);
+ // range, time, SC, BL, power, filter
+ areasc(1+.@lv, 60000*.@lv, SC_MAXIMIZEPOWER, BL_PC, 1, "filter_sameguildorparty");
return;
}
+// GD_spregen ( lv )
+// Temporarily doubles the SP Recovery rate of the user.
+function script GD_spregen {
+ .@lv=getarg(0, @skillLv);
+ // range, time, SC, BL, 1, power, filter
+ areasc(.@lv, 20000*.@lv, SC_MAGNIFICAT, BL_PC, 1, "filter_sameguildorparty");
+ return;
+}
+