changeset 1353:2f925800296b

New event hooks for stopped spells and skills, separate from interrupted ones.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 10 Mar 2011 07:27:07 +0200
parents 8a92095e520f
children f409f65dfbad
files ggrtf.tf gm-magical.tf
diffstat 2 files changed, 32 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ggrtf.tf	Sat Mar 05 03:20:26 2011 +0200
+++ b/ggrtf.tf	Thu Mar 10 07:27:07 2011 +0200
@@ -89,9 +89,11 @@
 /set event_skill_start=
 /set event_skill_done=
 /set event_skill_intr=
+/set event_skill_stop=
 /set event_spell_start=
 /set event_spell_done=
 /set event_spell_intr=
+/set event_spell_stop=
 /set event_quit_login=
 /set event_login=
 
@@ -1867,13 +1869,25 @@
 		/prexecfuncs %{event_skill_intr}%;\
 	/endif
 
-
-/def -i -p9999 -ag -mregexp -t"^(Your movement prevents you from doing the skill|You break your skill attempt|You lose your concentration and cannot do the skill)\.$" gskill_interrupt1 =\
+;; Skill stopped
+/def -i gskill_stopped =\
+	/if (skill_st=~"on")\
+		/msq @{Cbgred} ---- SKILL STOPPED ---- @{n}%;\
+		/set cnt_iskills=$[cnt_iskills+1]%;\
+		/set skill_st=off%;\
+		/set cast_info=%;\
+		/gstatus_update%;\
+		/prexecfuncs %{event_skill_stopped}%;\
+	/endif
+
+/def -i -p9999 -ag -mregexp -t"^(Your movement prevents you from doing the skill|You lose your concentration and cannot do the skill)\.$" gskill_interrupt1 =\
 	/set skill_st2=on%;/gskill_interrupt
 
-/def -i -p9999 -ag -mregexp -t"^You decide to change the skill to (a )?new one\.$" gskill_interrupt2 =\
-	/set skill_st2=off%;/gskill_interrupt
-
+/def -i -p9999 -ag -mregexp -t"^You decide to change the skill to (a )?new one\.$" gskill_stopped1 =\
+	/set skill_st2=off%;/gskill_stopped
+
+/def -i -p9999 -ag -mregexp -t"^You break your skill attempt\.$" gskill_interrupt1 =\
+	/set skill_st2=on%;/gskill_stopped
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Ceremony
--- a/gm-magical.tf	Sat Mar 05 03:20:26 2011 +0200
+++ b/gm-magical.tf	Thu Mar 10 07:27:07 2011 +0200
@@ -192,7 +192,17 @@
 		/prexecfuncs %{event_spell_intr}%;\
 	/endif
 
-/def -i -F -p9999 -ag -mregexp -t"^You( interrupt|r movement prevents you from casting| have insufficient strength to cast| lose your concentration and cannot cast) the spell.$" gspell_interrupt1 =\
+/def -i gspell_stopped =\
+	/if (spell_st=~"on")\
+		/msq @{Cbgred} ---- SPELL STOPPED ---- @{n}%;\
+		/set cnt_icasts=$[cnt_icasts+1]%;\
+		/set spell_st=off%;\
+		/set cast_info=%;\
+		/gstatus_update%;\
+		/prexecfuncs %{event_spell_stopped}%;\
+	/endif
+
+/def -i -F -p9999 -ag -mregexp -t"^You(r movement prevents you from casting| have insufficient strength to cast| lose your concentration and cannot cast) the spell.$" gspell_interrupt1 =\
 	/gspell_interrupt
 
 /def -i -F -p9999 -ag -mregexp -t"^You (get hit SO HARD that you have to stop your spell|lose your concentration and stop your spell casting|massage your wounds and forget your spell).$" gspell_interrupt2 =\
@@ -201,8 +211,8 @@
 /def -i -F -p9999 -ag -msimple -t"The ground shakes violently! EARTHQUAKE!" gspell_interrupt3 =\
 	/gspell_interrupt
 
-/def -i -F -p9999 -ag -msimple -t"You interrupt the chant in order to start a new chant." gspell_interrupt4 =\
-	/gspell_interrupt
+/def -i -F -p9999 -ag -mregexp -t"^You interrupt the (spell|chant in order to start a new chant)\.$" gspell_stopped1 =\
+	/gspell_stopped
 
 
 ;; Spell rounds