Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Lench
Beginner


Joined: 26 Jan 2004
Posts: 21
Location: Norway

PostPosted: Mon Jan 26, 2004 1:10 pm   

TF->Zmud conversion help
 
Got a TF file i need converted, its basically a script to reduce, and alter combat output to a more easily readable spam.

If anyone is any good with the Gag command and Zmud script coding and is willing to help, could you leave a message here?

Not sure if its possible to post the file here, so i'll email it to anyone wanting to help.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jan 27, 2004 1:05 am   
 
Try copying and pasting the text of the file. In general script conversions are difficult so getting more minds to help may be better.
Reply with quote
Lench
Beginner


Joined: 26 Jan 2004
Posts: 21
Location: Norway

PostPosted: Tue Jan 27, 2004 8:53 am   
 
;;; reduce.tf triggers ( )
;;;
;;; myt_gag_nl : -ag -mregexp -p9999 -F
;;;
;;; myt_rd_gag_nextline : -ag -mglob -p10000 -n1
;;; myt_rd_gag_nextlines: -ag -mglob -p9999
;;; myt_rd_gag_end : -ag -mglob -p10000 -n1
;;;
;;; myt_rd_o_parries : -aCyellow -mglob -p1500
;;; myt_rd_o_blocks : -aCyellow -mglob -p1500
;;; myt_rd_o_blocks_wr : -aCyellow -mglob -p1499
;;; myt_rd_o_absorbs : -aCwhite -mglob -p1500
;;; myt_rd_o_absorbs_wr : -aCwhite -mglob -p1499
;;;
;;;
;;;
;;; myt_rd_y_parry : -ag -mglob -p1500
;;; myt_rd_y_block : -ag -mglob -p1500
;;; myt_rd_y_block_wr : -ag -mglob -p1499
;;; myt_rd_y_absorb : -ag -mglob -p1500
;;; myt_rd_y_absorb_wr : -ag -mglob -p1499
;;;
;;; myt_rd_y_tickle : -ag -mglob -p1500
;;; myt_rd_y_graze : -ag -mglob -p1500
;;; myt_rd_y_smash : -ag -mglob -p1500
;;; myt_rd_y_hurt : -ag -mglob -p1500
;;; myt_rd_y_massacre : -ag -mglob -p1500
;;; myt_rd_y_deal_wr : -ag -mglob -p1499
;;;
;;; myt_rd_blood1 : -aCbgyellow -mglob -p1500
;;; myt_rd_blood2 : -aCbgyellow -mglob -p1500
;;; myt_rd_blood3 : -aCbgmagenta -mglob -p1500
;;; myt_rd_blood4 : -aCbgyellow -mglob -p1500
;;;


;;;
;;; SUPPRESSION,COLOR,CUTOFF
;;; of certain wrapped lines
;;;

;;; SWALLOW EMPTY LINES (always)
/def -ag -mregexp -Fp9999
-t"^$" myt_gag_nl

;;;
;;; your attempt to deal/cause? damage evaded
;;;

;;; OPPONENT PARRIES
;You aim at goblin with your left hand, but he parries.
/def -aCyellow -mglob -p1500
-t"You aim at * with *, but * parries."
myt_rd_o_parries

;;; OPPONENT BLOCKS
;You aim at human with your left front hoof, but he blocks the attack
;with his shield.
/def -aCyellow -mglob -p1500
-t"You aim at * with *, but * blocks the attack with his shield."
myt_rd_o_blocks
/def -aCyellow -mglob -p1499
-t"You aim at * with *, but * blocks*"
myt_rd_o_blocks_wr =
/def -ag -mglob -p9999 -n1 -t"*" myt_rd_gag_nextline

;;; OPPONENT ABSORBS
;You hit the left leg of the red-haired willowy female elf with your left
;hand, but the red-haired willowy female elf's armour absorbs all the damage.
;You hit the torso of the red-haired willowy female elf with your left hand,
;but the red-haired willowy female elf's armour absorbs all the damage.
;You hit the right leg of Griffin with your left hand, but Griffin's armour
;absorbs all the damage.
;You hit the torso of the wide-mouthed skinny-legged male goblin with your
;left hand, but the wide-mouthed skinny-legged male goblin's armour absorbs
;all the damage.



/def -aCwhite -mglob -p1500
-t"You hit * of * with *, but * armour absorbs all the damage."
myt_rd_o_absorbs
/def -aCwhite -mglob -p1499
-t"You hit * of * with your*"
myt_rd_o_absorbs_wr =
/def -ag -mglob -p9999 -t"*" myt_rd_gag_nextlines%;
/def -ag -mglob -p10000 -t"*." -n1
myt_rd_gag_end =
/undef myt_rd_gag_nextlines

;;;
;;; you avoided to suffer damage
;;;

;;; YOU PARRY
;The black nasty wild male chimpanzee aims at you with his left claw, but you
;parry.
;The cross eyed mean male goblin aims at you with his dagger, but you parry.
/def -ag -mglob -p1500
-t"* aims at you with *, but you parry."
myt_rd_y_parry

;;; YOU BLOCK
;The black nasty wild male chimpanzee aims at you with his right claw, but you
;block the attack with your shield.
;The cross eyed dirty male goblin aims at you with his dagger, but you block
;the attack with your shield.
;The black nasty wild male chimpanzee aims at you with his right claw, but you
;block the attack with your shield.

/def -ag -mglob -p1500
-t"* aims at you with *, but you block * the attack with your shield."
myt_rd_y_block
/def -ag -mglob -p1499
-t"* aims at you with*"
myt_rd_y_block_wr =
/def -ag -mglob -p9999 -n1 -t"*" myt_rd_gag_nextline


;;; YOU ABSORB
;The cross eyed dirty male goblin hits your left arm with his dagger, but your
;armour absorbs the damage.
;The black nasty wild male chimpanzee hits your right arm with his teeth, but
;your armour absorbs the damage.

/def -ag -mglob -p1500
-t"* hits your * with *, but your armour absorbs the damage."
myt_rd_y_absorb
/def -ag -mglob -p1499
-t"* hits your * with*"
myt_rd_y_absorb_wr =
/def -ag -mglob -p9999 -n1 -t"*" myt_rd_gag_nextline


;;;
;;; you cause damage
;;;

;;; YOU TICKLE
;You tickle the right arm of Griffin with your katana.
/def -ag -mglob -p1500
-t"You tickle * of * with your *."
myt_rd_y_tickle =
/while ({1} !~ "of")
/shift%;
/done%;
/shift%;
/let dummy=%;
/while ({1} !~ "with")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift 2%;
/test echo("You_@{Cyellow}_TICKLE_@{n}_%{dummy}($[replace(".","",{*})]).",
"",1)%;

;;; YOU GRAZE
;You graze the torso of Strat with your katana.
/def -ag -mglob -p1500
-t"You graze * of * with your *."
myt_rd_y_graze =
/while ({1} !~ "of")
/shift%;
/done%;
/shift%;
/let dummy=%;
/while ({1} !~ "with")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift 2%;
/test echo("You_@{Ccyan}_GRAZE_@{n}_%{dummy}($[replace(".","",{*})]).",
"",1)%;

;;; YOU SMASH
/def -ag -mglob -p1500
-t"You smash * of * with your *."
myt_rd_y_smash =
/while ({1} !~ "of")
/shift%;
/done%;
/shift%;
/let dummy=%;
/while ({1} !~ "with")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift 2%;
/test echo("You_@{Ccyan}_SMASH_@{n}_%{dummy}($[replace(".","",{*})]).",
"",1)%;

;;; YOU HURT
;You hurt the torso of the red-haired willowy female elf with your katana.
/def -ag -mglob -p1500
-t"You hurt * of * with your *."
myt_rd_y_hurt =
/while ({1} !~ "of")
/shift%;
/done%;
/shift%;
/let dummy=%;
/while ({1} !~ "with")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift 2%;
/test echo("You_@{Cred}_HURT_@{n}_%{dummy}($[replace(".","",{*})]).",
"",1)%;

;;; YOU MASSACRE
/def -ag -mglob -p1500
-t"You massacre * of * with your *."
myt_rd_y_massacre =
/while ({1} !~ "of")
/shift%;
/done%;
/shift%;
/let dummy=%;
/while ({1} !~ "with")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift 2%;
/test echo("You_@{Cmagenta}_MASSACRE_@{n}_%{dummy}($[replace(".","",{*})]).",
"",1)%;

;You hit the left arm of the brown-skinned stinking male goblin with
;your left
;hand, but the brown-skinned stinking male goblin's armour absorbs all
;the
;damage.



;;; concatenate lines that are wrapped like the following examples and
;;; pass them to the respective triggers for unwrapped lines.
;You hurt the left leg of the dark-eyed dark-haired male centaur with your
;katana.
;You tickle the right leg of the dark-eyed dark-haired male centaur with your
;left hand.

/def -ag -mglob -p1499
-t"You {tickle|graze|hurt|smash|massacre} the * of * with*"
myt_rd_y_deal_wr =
/set myst_rd_y_deal_dummy=%*%;
/set myst_rd_y_deal_dummy2=%2%;
/def -ag -mglob -p10000 -n1
-t"*."
myt_rd_gag_nextline =
/set myst_rd_y_deal_dummy=$$[strcat(myst_rd_y_deal_dummy," ",{*})]%%;
/myt_rd_y_%%{myst_rd_y_deal_dummy2} %%{myst_rd_y_deal_dummy}

;;;
;;; you suffer damage
;;;

;;; OPPONENT TICKLES YOU
;The cross eyed dirty male goblin tickles your right arm with his dagger.
/def -ag -mglob -p1500
-t"* tickles your * with *."
myt_rd_o_tickles =
/let dummy=%;
/while ({1} !~ "tickles")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift%;
/while ({1} !~ "with")
/shift%;
/done%;
/shift 2%;
/test echo("@{Cbgwhite}%{dummy}@{Cbgyellow}_TICKLES_@{Cbgwhite}_you
($[replace(".","",{*})]).@{n}","",1)

;;; OPPONENT GRAZES YOU
/def -ag -mglob -p1500
-t"* grazes your * with *."
myt_rd_o_grazes =
/let dummy=%;
/while ({1} !~ "grazes")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift%;
/while ({1} !~ "with")
/shift%;
/done%;
/shift 2%;
/test echo("@{Cbgwhite}%{dummy}@{Cbgcyan}_GRAZES_@{Cbgwhite}_you
($[replace(".","",{*})]).@{n}","",1)

;;; OPPONENT SMASHS YOU
/def -ag -mglob -p1500
-t"* smashs your * with *."
myt_rd_o_smashs =
/let dummy=%;
/while ({1} !~ "smashs")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift%;
/while ({1} !~ "with")
/shift%;
/done%;
/shift 2%;
/test echo("@{Cbgwhite}%{dummy}@{Cbgcyan}_SMASHES_@{Cbgwhite}_you
($[replace(".","",{*})]).@{n}","",1)

;;; OPPONENT HURTS YOU
/def -ag -mglob -p1500
-t"* hurts your * with *."
myt_rd_o_hurts =
/let dummy=%;
/while ({1} !~ "hurts")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift%;
/while ({1} !~ "with")
/shift%;
/done%;
/shift 2%;
/test echo("@{Cbgwhite}%{dummy}@{Cbgred}_HURTS_@{Cbgwhite}_you
($[replace(".","",{*})]).@{n}","",1)

;;; OPPONENT MASSACRES YOU
/def -ag -mglob -p1500
-t"* massacres your * with *."
myt_rd_o_massacres =
/let dummy=%;
/while ({1} !~ "massacres")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift%;
/while ({1} !~ "with")
/shift%;
/done%;
/shift 2%;
/test echo("@{Cbgwhite}%{dummy}@{Cbgmagenta}_MASSACRES_@{Cbgwhite}_you
($[replace(".","",{*})]).@{n}","",1)


;;; WRAP OPPONENT HITS
/def -ag -mglob -p1499
-t"* {tickles|grazes|hurts|smashs|massacres} your *"
myt_rd_o_hits_wr =
/set myst_rd_o_hits_dummy=%*%;
/shift%;
/while ({1} !~ "your")
/set myst_rd_o_hits_dummy2=%1%;
/shift%;
/done%;
/def -ag -mglob -p10000 -n1
-t"*."
myt_rd_gag_nextline =
/set myst_rd_o_hits_dummy=$$[strcat(myst_rd_o_hits_dummy," ",{*})]%%;
; /echo fulltext :"%%myst_rd_o_hits_dummy"%%;
; /echo macro :"%%myst_rd_o_hits_dummy2"%%;
/myt_rd_o_%%myst_rd_o_hits_dummy2 %%myst_rd_o_hits_dummy


;Your wounds start to bleed.
;You are bleeding!
;Your wounds bleed very heavily, don't ignore this!

/def -aCbgyellow -mglob -p1500
-t"Your wounds start to bleed.*"
myt_rd_blood1

/def -aCbgyellow -mglob -p1500
-t"You are bleeding!"
myt_rd_blood2

/def -aCbgmagenta -mglob -p1500
-t"Your wounds bleed very heavily, don't ignore this!"
myt_rd_blood3

/def -aCbgyellow -mglob -p1500
-t"Your wounds stopped bleeding."
myt_rd_blood4

;As Straton approaches Nanaki you try to guard him, but stumble.
;As the shadowy dark neuter creature approaches Nanaki you try to guard him,
;but stumble.




;;;
;;; MISCELLEANEOUS
;;;

; exa Travin ;
;You look at Travin.
;Travin is an ageless thin male human, presenting himself as:
;Travin, male human.
;He stands at average height. His well trained muscles ripple as he moves.
;His sandy-blonde hair hangs down about his face and shoulders, crystal-
;blue eyes sparkle with a hint of sadness beneath his bangs.
;A long thin braid falls down his right cheek. You notice three
;distinct scars one across his neck and one on each palm.
;(He is ...)
;You notice scars on his nose, right hand, forehead, left cheek and right
;cheek.
;He has an ivory set of front teeth.
;A large black male raven sits on his shoulder.
;"He is" normal and lean "for" a human. *** looks ***
;"He looks" like the image of perfection. *** looks ***
;"He is" in good shape. *** shape ***
;"He is" extremely alert. *** fatigue ***
;"He is missing" his right leg. *** missing ***
;"He is wielding" a black katana. *** weapons ***
;"He is fighting" Flar. *** fighting ***
;"He is bleeding". *** bleeding ***
;"He is wearing" an axe belt (with a winged axe sheathed inside), two
;dark-black bracers, two golden rings, a lyre shaped silver earring, a night
;black earring with a gem, an official judge badge, a pair of black boots, a
;pair of crossed scabbards (with a black katana and a black wakizashi
;sheathed inside), a sash, a shadowy-black cloak and a wooden decorated
;shield"." *** armours ***
;"You guess" he is wearing a banded-collared black shirt, a black chainmail
;shirt, a large backpack, a linnen green belt, a pair of black metal-plated
;bracers, a pair of plated leathern leg plates, a plain black trousers, a
;snake suit and a thin golden necklace of deathflowers "additionally."
; *** additional ***


;;;; triggers to format output for 'exa opponent' during combat (user-level, descriptive)
;;;; myt_opponent_desc ; -Fp100
;;;; myt_grab_lines ; -p100
;;;; myt_grab_std ; -p101 -n2 -E(myf_passed==1)
;;;; myt_grab_looks ; -p102 -n1
;;;; myt_grab_looks2 ; -p102 -n1
;;;; myt_grab_fighting ; -p102 -n1
;;;; myt_grab_bloodloss ; -p102 -n1
;;;; myt_grab_weapons ; -p102 -n1
;;;; myt_grab_armours ; -p105 -n1
;;;; myt_grab_armours2 ; -p103 -n1
;;;; myt_grab_armours2_lines ; -p103
;;;; myt_grab_armours2_end ; -p105 -n1
;;;; myt_grab_additional ; -p105 -n1
;;;; myt_grab_additional2 ; -p103 -n1
;;;; myt_grab_additional2_lines ; -p103
;;;; myt_grab_aadditional2_end ; -p105 -n1

/def myh_grab_echo =
/if (myf_echoed==0)
/test echo(" %myst_opponent ","hCbgwhite")%;
/test pad("# ",1,myst_shape,-30, myst_fatigue,-20,myst_bloodloss,-20,"#",1)%;
/test echo("%?","hCbgcyan")%;
/if (myst_weapons!~"")
/test echo(pad("# ",1,myst_weapons,-70,"#",1),"hCbgcyan")%;
/endif %;
/if (myst_fighting!~"")
/test echo(pad("# ",1,myst_fighting,-70,"#",1),"hCbgwhite")%;
/endif %;
; ;;;; set echo flag and reset strings
/set myf_echoed=1%;
/set myst_shape=%;/set myst_fatigue=%;/set myst_fighting=%;
/set myst_bloodloss=%;/set myst_weapons=%;
;; /echo %%% FINISHED %;
/endif

/def myp_purge_grabbers =
;; /echo TEST : mypid_purge=%mypid_purge%;
/set mypid_purge=0%;
/set myst_opponent=%;
/PURGE myt_grab*%;

/def myp_grab_echo =
;; /echo TEST2 : mypid_echo=%mypid_echo%;
/set mypid_echo=0%;
/myh_grab_echo%;

/def -ag -mglob -p100 -F -E(combat!=-1)
-t"You look {up|at} *"
myt_opponent_desc =
;; /echo 1. %myst_opponent%;
; ;;;; echo previous results if string values are still set
/if (myst_opponent!~"")
;; /echo %mypid_purge/%mypid_echo%;
/if (mypid_purge!=0) /test kill(mypid_purge)%; /endif %;
/if (mypid_echo!=0) /test kill(mypid_echo)%; /endif %;
/myh_grab_echo%;
/endif%;
; ;;;; initialise
/set myf_passed=0%;/set myf_echoed=0%;
/set mypid_echo=0%;/set mypid_purge=0%;
/set myct_lines=0%;
/set myst_opponent=%-3%;
/set myst_opponent=$[replace(".","",myst_opponent)]%;
;; /echo 2. %myst_opponent%;
; ;;;; grab and gag all incoming lines
/def -ag -mglob -p100
-t"*"
myt_grab_lines = %;
; ;;;; finish all grabbing after one second in case the end hook
; ;;;; fails for some reason
/test repeat("-2 1 /myp_purge_grabbers")%;
/set mypid_purge=%?%;
;; /echo PID_PURGE = %mypid_purge%;
;; /ps%;
; ;;;; grab std informations that are always given in case the
; ;;;; irrelevant descriptive part have passed already
/def -ag -mglob -p101 -n2 -E(myf_passed==1)
-t"{He|She|It} is *"
myt_grab_std =
/test ++myct_lines%%;
;; /echo LINES acepted %%myct_lines : %%*, %%myf_passed, %%myf_echoed%%;
; ; SHAPE ;
/if (myct_lines==1) /set myst_shape=%%-2%%; /endif%%;
; ; FATIGUE ;
; ;;;; force output if this is the endof information so that
; ;;;; the end hook can't be triggered
/if (myct_lines==2)
/set myst_fatigue=%%-2%%;
/test repeat("-1 1 /myp_grab_echo")%%;
/set mypid_echo=%%?%%;
;; /echo PID_ECHO = %%mypid_echo%%;
/endif%;
; ;;;; grab non-std informations that could be given and
; ;;;; avoid evaluation of these as std information
; ; LOOKS ;
/def -ag -mglob -p102 -n1
-t"{He|She|It} is * for *"
myt_grab_looks = /set myf_passed=1%;
/def -ag -mglob -p102 -n1
-t"{He|She|It} looks *."
myt_grab_looks2 = /set myf_passed=1%;
; ; FIGHTING ;
/def -ag -mglob -p102 -n1
-t"{He|She|It} is fighting *"
myt_grab_fighting =
/set myst_fighting=%%-3%;
; ; BLOODLOSS ;
/def -ag -mglob -p102 -n1
-t"{He|She|It} is bleeding *"
myt_grab_bloodloss =
/set myst_bloodloss=%%-2%;
; ; WEAPONS ;
/def -ag -mglob -p102 -n1
-t"{He|She|It} is wielding *"
myt_grab_weapons =
/set myst_weapons=%%-3%;
; ; CLOTHES,ARMOURS ;
; ;;;; this information works as the end hook for the whole grabbing procedure,
; ;;;; therefore purge grabbers and echo information once triggered
; ;;;; in case this information is not given, the echoing will be forced
; ;;;; either by the resp. repeat job above or by a possible subsequent
; ;;;; triggering of the myt_opponent_desc macro
; ;;;; simple case of only one line of information
/def -ag -mglob -p105 -n1
-t"{He|She|It} is wearing *."
myt_grab_armours=
/PURGE myt_grab_* %%;
/myh_grab_echo%;
; ;;;; complex case of multiple subsequent wrapped lines
; ;;;; one-shot begin hook, multi-shot gag hook (low), one-shot end hook (high)
/def -ag -mglob -p103 -n1
-t"{He|She|It} is wearing *"
myt_grab_armours2 =
/PURGE myt_grab_* %%;
/myh_grab_echo%%;
/def -ag -mglob -p103
-t"*"
myt_grab_armours2_lines = %%;
/def -ag -mglob -p105 -n1
-t"*."
myt_grab_armours2_end = /undef myt_grab_armours2_lines %;
; ; ADDITIONAL ARMOURS ;
; ;;;; simple case of only one line of information
/def -ag -mglob -p105 -n1
-t"You guess * additionally."
myt_grab2_additional =
/set myst_additional=%%*%%;
; /echo ### (simple) %%*%%;
/PURGE myt_grab* %;
; ;;;; complex case of multiple subsequent wrapped lines
; ;;;; one-shot begin hook, multi-shot gag hook (low), one-shot end hook (high)
/def -ag -mglob -p103 -n1
-t"You guess *"
myt_grab2_additional2 =
/set myst_additional=%%*%%;
; /test echo(pad("# ",1,{*},-76,"#",1),"hCbgcyan")%%;
; /echo ### (start) %%myst_additional %%;
/def -ag -mglob -p103
-t"*"
myt_grab2_additional2_lines =
; /test echo(pad("# ",1,{*},-76,"#",1),"hCbgcyan")%%%;
; /echo ### (multiple) %%%* %%%;
/set myst_additional=$$$[strcat(myst_additional, {*})] %%;
/def -ag -mglob -p105 -n1
-t"*additionally."
myt_grab2_additional2_end =
/set myst_additional=$$$[strcat(myst_additional, {*})] %%%;
; /test echo(pad("# ",1,{*},-76,"#",1),"hCbgcyan")%%%;
; /echo ### (end) %%%*%%%;
; /echo %%%myst_additional%%%;
/PURGE myt_grab* %%;
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jan 27, 2004 12:06 pm   
 
That is going to take a while. I will have more time to work with it in the evening.
Reply with quote
Lench
Beginner


Joined: 26 Jan 2004
Posts: 21
Location: Norway

PostPosted: Wed Jan 28, 2004 1:57 am   
 
thanks mate, really appreciate it. Just bought Zmud a few months ago so not to good at the coding part yet. TF has been a great companion but Zmud interface is quite alot better, just have to figure out all the codes and tools.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jan 29, 2004 12:23 am   
 
Sorry for the long delay in replying. I had unexpected company last night and it looks like I will have other issues tonight.

Somethings to get you started. If I have understood the script you posted correctly...
/def -ag -mregexp -Fp9999
-t"^$" myt_gag_nl
Would become:
#TRIGGER "myt_gag_nl" {^$} {#GAG}

/def -aCyellow -mglob -p1500
-t"You aim at * with *, but * parries."
myt_rd_o_parries
Would become:
#TRIGGER "myt_rd_o_parries" {You aim at * with *, but * parries.} {#COLOR yellow}

/def -ag -mglob -p1500
-t"You tickle * of * with your *."
myt_rd_y_tickle =
/while ({1} !~ "of")
/shift%;
/done%;
/shift%;
/let dummy=%;
/while ({1} !~ "with")
/let dummy=$[strcat(dummy,{1},"_")]%;
/shift%;
/done%;
/shift 2%;
/test echo("You_@{Cyellow}_TICKLE_@{n}_%{dummy}($[replace(".","",{*})]).",
"",1)%;
This might be something like:
#TRIGGER "myt_rd_y_tickle" {You (tickle) * of * with your *.} {#PSUB "<COLOR yellow>TICKLE,</COLOR>" %x1}
I didn't replace all spaces with underscores it seems pointless. Also this is using the MXP coloring system to allow color to return to what it was without the hard coding the return color into the trigger, the alternate would be '%ansi(yellow)TICKLE%ansi(something)'.

In any case that is all I have time for, all the thing I posted can simply be copied and pasted to the command line, hit enter and they are created. I suggest reading the help on each command and function used, and also looking over the created setting in the Settings Editor. If it appears to be the correct tanslations then try a few yourself and post back on the ones that you can't handle.
Reply with quote
Lench
Beginner


Joined: 26 Jan 2004
Posts: 21
Location: Norway

PostPosted: Thu Jan 29, 2004 1:10 pm   
 
Psub was the key indeed, but translations are a bit off. But got a few working now.

Just need to know a few things: Psub dont seem to do newline after its changed a line. So i often get the linewrapped lines from the mud ontop of eachother.

This however would get fixed if i knew how to gag the next line after a psub like:

X hits you with his sword,
on left leg.

i do a trigger on X hits you with his sword,
and psub it to X_HITS_You
then i get
X_HITS_Youon left leg
id kinda like if i could remove the nextline somehow.

Lench
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jan 29, 2004 11:03 pm   
 
If you are substituting the entire line you should use #SUB. #PSUB is designed for substituting portions of a line. I know this really isn't abundantly clear in the help file.

As for #GAGging the next line you can use a multistate trigger for this. Look up the #CONDITION command in the help and prowl around all the links to get a feel for how it works. To handle the exact example you requested I would do:
#TRIGGER {^X hits you with his sword,$} {#SUB {X_HITS_You}}
#CONDITION {on left leg.} {#GAG} {within|param=1}

Obviously the exact phrase is not borad enough to handle all necessary cases so take a look at Pattern Matching in the help.
Reply with quote
Lench
Beginner


Joined: 26 Jan 2004
Posts: 21
Location: Norway

PostPosted: Fri Jan 30, 2004 10:35 pm   
 
Yeah the entire script is about substituting the entire combat output from the mud as its really spammy in large player vs player combats. So will look into conditions, looks really powerful.

Thanks for all the help man :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net