|
kosh Beginner
Joined: 24 Oct 2002 Posts: 14 Location: Canada
|
Posted: Thu Oct 24, 2002 1:46 pm
a simnple trigger question |
ok Im trying to set up a script that will spell up ppl that pay me x gold
basically it starts by them saying spell me up
I tell them the price of the spell up
what I want to do is basically
(*) says 'spell me up'
tell %1 you need to pay the small price of @spellupprice
now what I want to do is have it so that it will only spell the person up if they pay the price
and Im still new at getting triggers to work from within triggers
any thoughts or suggestions? |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Thu Oct 24, 2002 6:45 pm |
The simplest approach would be a single trigger. If your money transactions look like this:
Bob gives 5 coins to you.
Then
#TR {(%w) gives (%d) coins to you.} {#IF (%2 >= @spellupprice) {#VAR customer %1; spellup @customer}}
where spellup is an alias with all the appropriate spells.
Notice the use of the %w and %d matching patterns. %w matches a single word, %d matches a whole number.
Later you might want to add checks to ensure the customer isn't emoting the gold transfer. If so, you'll need to track your gold on hand in a variable and make comparisons before and after the transaction.
Troubadour
(Win 98, Pentium III, 550 MHz) |
|
|
|
Lalaynya Wanderer
Joined: 23 Aug 2002 Posts: 96
|
Posted: Thu Oct 24, 2002 8:13 pm |
quote:
Later you might want to add checks to ensure the customer isn't emoting the gold transfer. If so, you'll need to track your gold on hand in a variable and make comparisons before and after the transaction.
Troubadour
(Win 98, Pentium III, 550 MHz)
Bad Troubadour. Spoil all our fun.
*snicker* |
|
|
|
kosh Beginner
Joined: 24 Oct 2002 Posts: 14 Location: Canada
|
Posted: Fri Oct 25, 2002 2:29 am |
[quote]
Later you might want to add checks to ensure the customer isn't emoting the gold transfer. If so, you'll need to track your gold on hand in a variable and make comparisons before and after the transaction.
I actually already have that in place I was just wondering about triggers from with-in triggers and I found out the answer shortly after I posted.... I totally forgot about the #temp command lol |
|
|
|
|
|