|
Jmonday Newbie
Joined: 20 Oct 2003 Posts: 1
|
Posted: Mon Oct 20, 2003 5:29 pm
A trigger, #cap and a variable |
alright Im new to Zmud..
I wanted to capture the last line that comes through Zmud on a trigger and assign it to a variable. I thought #cap would be the best option but it can only send the line to a new window (as far as I know).
So can anyone help me accomplish this?
Trigger:
You have become better
or
Learning from your mistakes
This line comes through:
You have become better at whatever skill!
Assign to variable skill: "You have become better at whatever skill!"
Just so whoever provides insight knows where Im going with this. I plan on sending that info to a preconstructed A2k database via ADO (I think I can manage this part, the tutorial is quite clear)
Hope someone can help..or point me in the right direction..
thansk!
Jmonday |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Mon Oct 20, 2003 5:46 pm |
#TR {You have become better at (*)} {#VAR dbstring %concat("You have become better at",%1)}
I'm sure Lightbulb or someone will have a more elegant solution, but this should work. *untested* |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Oct 20, 2003 11:07 pm |
This is what I use for skill tracking:
#CLASS {Character|SkillTracking}
#VAR SkillGains {}
#TRIGGER {^(*) trains you in the art of (*)$} {#ADDKEY Skills {%1} 1} "" {case|notrig}
#TRIGGER {^You have become better at (*)!$} {#NOMAP;#ADDKEY Skills {%1} {%eval(%db(@Skills,"%1")+1)};#ADDKEY SkillGains {%1} {%db(@Skills,"%1")};#NOOP %btnenable(SkillDisplay,1)} "" {case|notrig}
#TRIGGER {^You learn from your mistakes, and your (*) skill improves.$} {#NOMAP;#ADDKEY Skills {%1} {%eval(%db(@Skills,"%1")+1)};#ADDKEY SkillGains {%1} {%db(@Skills,"%1")};#NOOP %btnenable(SkillDisplay,1)} "" {case|notrig}
#BUTTON 40 "%if(@SkillGains,Skill Gains: %expanddb(@SkillGains,",",":"))" {SkillGains="";#NOOP %btnenable(SkillDisplay,0);save} {} {} {} {} {} {Size} {400} {15} {Pos} {1} {1} {} {} {} {} "" {Explore} {} {SkillDisplay} {2}
#CLASS 0
Since my mud provides that multiple characters can be accessed through a single connection the Skills variable is contained elsewhere. There is also another trigger that detects saving that clears the button display(not included since it connects to 6 aliases and 10 triggers). I have that button panel (2) set to bottom so it works like a second status line for me. This leaves everything in a record variable within zMud. With the exception of character creation all skill gains are captured by this method on my mud. |
|
|
|
|
|
|
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
|
|