summaryrefslogtreecommitdiff
path: root/world/map/conf
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/conf')
-rw-r--r--world/map/conf/magic-config.sex1
-rw-r--r--world/map/conf/magic-level1.sex87
-rw-r--r--world/map/conf/magic-level2.sex41
-rw-r--r--world/map/conf/magic-level3.sex1
-rw-r--r--world/map/conf/magic-misc.sex63
-rw-r--r--world/map/conf/magic-procedures.sex39
6 files changed, 177 insertions, 55 deletions
diff --git a/world/map/conf/magic-config.sex b/world/map/conf/magic-config.sex
index 5b20a19b..a130becf 100644
--- a/world/map/conf/magic-config.sex
+++ b/world/map/conf/magic-config.sex
@@ -32,6 +32,7 @@
(CONST SC_MBARRIER 197)
(CONST SC_HASTE 198)
(CONST SC_PHYS_SHIELD 199)
+(CONST SO_GMHIDE 64)
(CONST SO_GMINVISIBLE 4096)
"Special effects"
diff --git a/world/map/conf/magic-level1.sex b/world/map/conf/magic-level1.sex
index 3e673170..01864666 100644
--- a/world/map/conf/magic-level1.sex
+++ b/world/map/conf/magic-level1.sex
@@ -7,7 +7,8 @@
(GUARD
(CASTTIME 500))
(EFFECT
- (SCRIPT "{callfunc \"CheckWand\";}")
+ (CALL fightclub_check)
+ (SCRIPT "{callfunc \"CheckWand\";}")
(IF (==
(script_int caster "@Wand")
0)
@@ -23,7 +24,7 @@
(CALL gain_xp 1 3)
(ATTRIGGER
(CALL attack_check target)
- (SCRIPT "{callfunc \"WandMana\";}")
+ (SCRIPT "{callfunc \"WandMana\";}")
(IF (==
(script_int caster "@WandAttack")
0)
@@ -199,6 +200,25 @@
(pc target)))
(+ 2
(/ spellpower 100)))))
+ (REQUIRE
+ (not
+ (||
+ (&&
+ (is_in (location (pc target))
+ (@+
+ (@ "009-7.gat" (script_int caster "$@fightclub_x1") (script_int caster "$@fightclub_y1"))
+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1"))
+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1"))))
+ (!= (pc target) caster))
+ (&&
+ (&&
+ (is_in (location (pc target))
+ (@+
+ (@ "009-7.gat" (script_int caster "$@fightclub_x1") (script_int caster "$@fightclub_y1"))
+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1"))
+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1"))))
+ (== (pc target) caster))
+ (== (script_int caster "$@Duel_NoMagic") 1)))))
(GUARD
(COMPONENTS "Lifestone")))
(EFFECT
@@ -262,6 +282,7 @@
2))
(COMPONENTS "SulphurPowder"))))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(SET damage
@@ -298,6 +319,7 @@
(=>
(COMPONENTS "SharpKnife")
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower WAR)
(CALL default_effect)
(CALL install_melee_spell
@@ -313,6 +335,7 @@
(=>
(COMPONENTS "Knife")
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower WAR)
(CALL default_effect)
(CALL install_melee_spell
@@ -365,20 +388,22 @@
level))
(COMPONENTS "MauveHerb" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 1 6)
- (spawn
- (rbox location 2)
- caster
- 1029
- 1
+ (CALL summon_spell 1029
(+
(/
(skill caster school)
2)
1)
- 10000))))
+ (- 4000
+ (* spellpower 9))
+ (+ 10000
+ (* spellpower 50))
+ 999999
+ school))))
(SPELL () grow-alizarin "#modriphoo" ()
(LET level 0)
@@ -393,20 +418,22 @@
level))
(COMPONENTS "AlizarinHerb" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 1 7)
- (spawn
- (rbox location 2)
- caster
- 1032
- 1
+ (CALL summon_spell 1032
(+
(/
(skill caster school)
2)
1)
- 10000))))
+ (- 4000
+ (* spellpower 9))
+ (+ 10000
+ (* spellpower 50))
+ 999999
+ school))))
(SPELL () grow-gamboge "#modriyikam" ()
(LET level 0)
@@ -421,20 +448,22 @@
level))
(COMPONENTS "GambogeHerb" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 1 8)
- (spawn
- (rbox location 2)
- caster
- 1031
- 1
+ (CALL summon_spell 1031
(+
(/
(skill caster school)
2)
1)
- 10000))))
+ (- 4000
+ (* spellpower 9))
+ (+ 10000
+ (* spellpower 50))
+ 999999
+ school))))
(SPELL () grow-cobalt "#modrisump" ()
(LET level 0)
@@ -449,20 +478,22 @@
level))
(COMPONENTS "CobaltHerb" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 1 9)
- (spawn
- (rbox location 2)
- caster
- 1030
- 1
+ (CALL summon_spell 1030
(+
(/
(skill caster school)
2)
1)
- 10000))))
+ (- 4000
+ (* spellpower 9))
+ (+ 10000
+ (* spellpower 50))
+ 999999
+ school))))
(SPELL (LOCAL) summon-maggots "#kalmurk" ()
(LET level 0)
@@ -477,6 +508,7 @@
level))
(COMPONENTS "MaggotSlime" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL gain_xp 1 10)
(CALL summon_spell 1002
@@ -490,7 +522,8 @@
(* spellpower 5))
(+ 10000
(* spellpower 50))
- 1))))
+ 1
+ school))))
(SPELL () detect-magic "#miteyo" ()
(LET level 0)
diff --git a/world/map/conf/magic-level2.sex b/world/map/conf/magic-level2.sex
index af805160..0f1f32b1 100644
--- a/world/map/conf/magic-level2.sex
+++ b/world/map/conf/magic-level2.sex
@@ -221,6 +221,13 @@
(skill caster school)
level))
(REQUIRE
+ (not
+ (is_in (location (pc target))
+ (@+
+ (@ "009-7.gat" (script_int caster "$@fightclub_x1") (script_int caster "$@fightclub_y1"))
+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1"))
+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1"))))))
+ (REQUIRE
(if_then_else
(failed
(pc target))
@@ -354,6 +361,7 @@
3))
(COMPONENTS "IronPowder"))))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(SET damage spellpower)
(SET damage_bonus
@@ -556,6 +564,7 @@
3))
(COMPONENTS "Beer"))))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower WAR)
(SET str
(str caster))
@@ -590,16 +599,18 @@
40))
(COMPONENTS "DarkCrystal" "SnakeEgg"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 3 31)
- (CALL summon_dark_spell 1010
+ (CALL summon_spell 1010
(+ 1
(/ spellpower 300))
(- 4000
(* spellpower 9))
(* spellpower 80)
- 2))))
+ 2
+ school))))
(SPELL () toxic-dart "#phlex" ()
(LET level 1)
@@ -625,6 +636,7 @@
(COMPONENTS
(2 "Root")))))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(SET damage
@@ -679,16 +691,18 @@
level))
(COMPONENTS "SmallMushroom" "DarkCrystal"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 3 36)
- (CALL summon_dark_spell 1106
+ (CALL summon_spell 1106
(+ 1
(/ spellpower 250))
(- 4000
(* spellpower 9))
(* spellpower 80)
- 2))))
+ 2
+ school))))
(SPELL () flying-backpack "#plugh" (PC target)
(LET level 1)
@@ -720,6 +734,7 @@
(+ 2
(/ spellpower 30)))))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(IF (!= caster target)
@@ -768,6 +783,7 @@
(+ 2
(/ spellpower 30)))))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(sfx target 11 0)
(IF (!= caster target)
@@ -1059,6 +1075,7 @@
(+ 2
(/ spellpower 30)))))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(sfx target SFX_BARRIER 0)
(IF (!= caster target)
@@ -1095,6 +1112,7 @@
level))
(COMPONENTS "HardSpike" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 1 26)
@@ -1104,7 +1122,8 @@
(- 5000
(* spellpower 9))
(* spellpower 400)
- 2))))
+ 2
+ school))))
(SPELL (LOCAL) summon-fluffies "#kalakarenk" ()
(LET level 1)
@@ -1123,6 +1142,7 @@
level))
(COMPONENTS "WhiteFur" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 1 27)
@@ -1134,7 +1154,8 @@
(- 5000
(* spellpower 8))
(* spellpower 350)
- 2))))
+ 2
+ school))))
(SPELL (LOCAL) summon-mouboo "#kalboo" ()
(LET level 1)
@@ -1153,6 +1174,7 @@
level))
(COMPONENTS "MoubooFigurine" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 2 37)
@@ -1162,7 +1184,8 @@
(- 4000
(* spellpower 9))
(* spellpower 100)
- 2))))
+ 2
+ school))))
(SPELL (LOCAL) summon-pinkie "#kalgina" ()
(LET level 1)
@@ -1181,6 +1204,7 @@
level))
(COMPONENTS "PinkAntenna" "Root"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(CALL default_effect)
(CALL gain_xp 2 38)
@@ -1190,7 +1214,8 @@
(- 5000
(* spellpower 9))
(* spellpower 150)
- 2))))
+ 2
+ school))))
(SPELL () detect-players "#inwilt" ()
(LET level 1)
diff --git a/world/map/conf/magic-level3.sex b/world/map/conf/magic-level3.sex
index 2550da3e..b4b3e030 100644
--- a/world/map/conf/magic-level3.sex
+++ b/world/map/conf/magic-level3.sex
@@ -53,6 +53,7 @@
level))
(COMPONENTS "PileOfAsh"))
(EFFECT
+ (CALL fightclub_check)
(CALL adjust_spellpower school)
(SET damage
(min
diff --git a/world/map/conf/magic-misc.sex b/world/map/conf/magic-misc.sex
index 97263a03..4a08f118 100644
--- a/world/map/conf/magic-misc.sex
+++ b/world/map/conf/magic-misc.sex
@@ -1,6 +1,69 @@
"--------------------------------------------------------------------------------"
"Special-purpose quasispells"
"--------------------------------------------------------------------------------"
+(SPELL (NONMAGIC) dueloff "#dueloff" ()
+ (=>
+ (GUARD
+ (REQUIRE
+ (== (substr (location caster) 2 5) "009-7")))
+ (EFFECT
+ (IF (== (script_int caster "@Duels_Off") 1)
+ (BLOCK
+ (SCRIPT "{set @Duels_Off, 0;}")
+ (message caster "Now accepting incoming duel requests.")
+ (ABORT)))
+ (SCRIPT "{set @Duels_Off, 1;}")
+ (message caster "Now blocking incoming duel requests."))))
+
+(SPELL (NONMAGIC) duel "#duel" (PC target)
+ (=>
+ (GUARD
+ (REQUIRE
+ (== (% (script_int target "$fightclub_enabled") 5) 3)))
+ (EFFECT
+ (IF (== target caster)
+ (BLOCK
+ (message caster "You can not fight against yourself.")
+ (ABORT)))
+ (IF (is_dead target)
+ (BLOCK
+ (message caster "You can not fight against a corpse.")
+ (ABORT)))
+ (IF (status_option caster SO_GMINVISIBLE)
+ (BLOCK
+ (message caster "You can not fight while being invisible.")
+ (ABORT)))
+ (IF (status_option target SO_GMHIDE)
+ (BLOCK
+ (message caster "This player have @hide enabled.")
+ (ABORT)))
+ (IF (status_option target SO_GMINVISIBLE)
+ (ABORT))
+ (IF (status_option caster SO_GMHIDE)
+ (ABORT))
+ (IF (!= (substr (location caster) 2 5) "009-7")
+ (BLOCK
+ (message caster "You need to be in the fight club to challenge someone to a duel.")
+ (ABORT)))
+ (IF (!= (substr (location target) 2 5) "009-7")
+ (BLOCK
+ (message caster "This player is not in the fight club at the moment.")
+ (ABORT)))
+ (IF (> (script_int target "@Duels_Off") 0)
+ (BLOCK
+ (message caster "This player is automatically ignoring incoming duel requests.")
+ (ABORT)))
+ (IF (> (script_int caster "$@Duel_Queue_ID[($@Duel_QueueLimit)]") 0)
+ (BLOCK
+ (message caster (+ (+ "There is already " (script_int caster "$@Duel_QueueLimit")) " duel(s) in the queue, which is the maximum."))
+ (ABORT)))
+ (IF (> (script_int target "@Duel_Queue[($@Duel_PlayerQueueLimit)]") 0)
+ (BLOCK
+ (message caster (+ (+ "There is already " (script_int caster "$@Duel_PlayerQueueLimit")) " duel request(s) in the queue of this player, which is the maximum."))
+ (ABORT)))
+ (SET script_target target)
+ (SCRIPT "{callfunc \"fightclub_sendrequest\";}"))))
+
(SPELL (NONMAGIC SILENT) marriage "marry" (PC target)
(=>
(GUARD
diff --git a/world/map/conf/magic-procedures.sex b/world/map/conf/magic-procedures.sex
index 6f9c3246..bce579fc 100644
--- a/world/map/conf/magic-procedures.sex
+++ b/world/map/conf/magic-procedures.sex
@@ -280,36 +280,35 @@
(PROCEDURE install_melee_spell (charges base_delay attack_animation)
(CALL install_attack_spell charges base_delay 1 attack_animation))
-(PROCEDURE summon_spell (mob_id count delay lifetime control_level)
- (CALL default_effect)
- (sfx location SFX_SUMMON_START 0)
- (WAIT delay)
- (sfx location SFX_SUMMON_FIRE 0)
- (spawn
- (rbox location 2)
- caster
- mob_id
- (if_then_else
- (>=
- (skill caster ASTRAL)
- control_level)
- 2
- 1)
- count
- lifetime)) "pets when level is high enough"
+(PROCEDURE fightclub_check ()
+ (IF (&&
+ (is_in (location caster)
+ (@+
+ (@ "009-7.gat" (script_int caster "$@fightclub_x1") (script_int caster "$@fightclub_y1"))
+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1"))
+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1"))))
+ (||
+ (== (script_int caster "$@Duel_NoMagic") 1)
+ (!= (script_int caster "@Duel_Fighter") 1)))
+ (ABORT)))
-(PROCEDURE summon_dark_spell (mob_id count delay lifetime control_level)
+(PROCEDURE summon_spell (mob_id count delay lifetime control_level school)
(CALL default_effect)
(sfx location SFX_SUMMON_START 0)
(WAIT delay)
(sfx location SFX_SUMMON_FIRE 0)
(spawn
- (rbox location 2)
+ (rbox location (if_then_else
+ (is_in (location caster)
+ (@+
+ (@ "009-7.gat" (- (script_int caster "$@fightclub_x1") 2) (- (script_int caster "$@fightclub_y1") 2))
+ (+ (- (script_int caster "$@fightclub_x2") (script_int caster "$@fightclub_x1")) 2)
+ (+ (- (script_int caster "$@fightclub_y2") (script_int caster "$@fightclub_y1")) 2))) 1 2))
caster
mob_id
(if_then_else
(>=
- (skill caster DARK)
+ (skill caster school)
control_level)
2
1)