|
Shriken Newbie
Joined: 21 Dec 2004 Posts: 5 Location: Hell, Michigan
|
Posted: Sun Apr 10, 2005 4:21 am
Variable Trigger for Dice |
Ok, I'm totally new to zMUD triggers, and would like to know how to do such.
I want my status bar to display everything that happens in a game.
Here's what will be the triggers (atleast what I've tried):
You roll the (%d) die!
(From time to time) What luck! You gain (%d) quest points!
Tiny/Medium/Large loss/win! You lose/win (%d) gold to/from your pot.
Your pot contains (%d) gold coins right now.
With an occasional random event such as:
The dice dealer snarls and tosses you a Chipped (%d) from his own collection.
or
The dice dealer tosses you a chipped (%d) from the pile.
or
You reach your hand into the pot, but only grab a hand full of gold!
You dump out (%d) gold into your pocket.
and when you jackpot:
JACKPOT!!!
The dealer reaches into the box and takes out TWO Golden Tickets!
or
The dealer reaches into the box and takes out a disgusting Green Ticket!
I would like it to appear as :
@Die - Die Color
@WinnoLosso - Win or Loss + Winnings/Losings
@PotPrize - Money in your pot
@QPPrize - QPs Won
@Event - shows "Chipped (%d)"
@JpotWin - Shows Jackpot Winnings
Basically, the problem is... I don't know how to make a trigger edit a variable. I've tried to, but it doesn't seem to be working for me, and any help would be much appreciated.
-Kurt |
|
|
|
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: Mon Apr 11, 2005 4:10 pm |
%d only targets numbers, so you have to change some of the triggers
#TRIGGER {You roll the (%w) die!} {#VAR die %1}
#TRIGGER {What luck! You gain (%d) quest points!} {#VAR QPPrize %1}
#TRIGGER {{Tiny|Medium|Large} {loss|win}! You (%w) (%d) gold {to|from} your pot.} {#VAR WinnoLosso "";#ADDITEM WinnoLosso %1;#ADDITEM Winnolosso %2}
#TRIGGER {Your pot contains (%d) gold coins right now.} {#VAR PotPrize %1}
#TRIGGER {The dice dealer snarls and tosses you a Chipped (%d) from his own collection.} {#VAR Event "Chipped %1"}
#TRIGGER {The dice dealer tosses you a chipped (%d) from the pile.} {#VAR Event "Chipped %1"}
#TRIGGER {You reach your hand into the pot, but only grab a hand full of gold!$You dump out (%d) gold into your pocket.} {#VAR Event "Chipped %1"}
#TRIGGER {The dealer reaches into the box and takes out (*)} {#VAR JpotWin "%1"}
so now we have to put all this in the status line
#ST {Die:@Die, %expandlist(@WinnoLosso," ") gold, Pot is:@PotPrize, QPs Won:@QPPrize, Event:@Event, Jackpot:@JpotWin}
Ok this should display everything in the Status bar, now I didnt know if Chipped (%d) was sopoused to be a number or a word, so you might have to change that in case its a word. Another thing, If some of this events do not happen, you might get some erroneous info in the status line, Ie: If the trigger for the JpotWin doesnt happen, but the others do it will show you the last winning of the JpotWin, this could be easlily avoid by flushing the variables with an alias
#ALIAS JPFlush {#VAR die "";@VAR WinnoLosso "";#VAR potprize "";#VAR qpprize "";#VAR event ""; #VAR jackpot}
Hope that helps |
|
|
|
|
|
|
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
|
|