summaryrefslogtreecommitdiff
path: root/world/map/conf/magic-misc.sex
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2014-09-07 15:44:33 -0400
committermekolat <mekolat@gmail.com>2014-10-30 14:21:17 -0400
commite5190f9ddff51a2e246a7af5538909ec212e00db (patch)
tree6f626346b5fb37d24688c0defdffba55a509cb48 /world/map/conf/magic-misc.sex
parent0bc1c20799c9b01e60035ce1c82fd8a38c110c4c (diff)
downloadserverdata-e5190f9ddff51a2e246a7af5538909ec212e00db.tar.gz
serverdata-e5190f9ddff51a2e246a7af5538909ec212e00db.tar.bz2
serverdata-e5190f9ddff51a2e246a7af5538909ec212e00db.tar.xz
serverdata-e5190f9ddff51a2e246a7af5538909ec212e00db.zip
add fight club
Diffstat (limited to 'world/map/conf/magic-misc.sex')
-rw-r--r--world/map/conf/magic-misc.sex63
1 files changed, 63 insertions, 0 deletions
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