 |
Duindain Novice
Joined: 14 Feb 2003 Posts: 31 Location: Perth, Australia
|
Posted: Sun Nov 07, 2004 9:49 am
given gold trigger problem |
hey ive got this trigger to check gold has been given and not emoted and that it is within right amount then store the name of person and amount in a list if several ppl give gold at once and i dont excute the trigger till the after from lag or watever it comes up as bad amount need a way to wait for the you have so many gold coins line before running the rest of the trigger or some better way of doing this code
pattern:(%w) gives you (%d) gold coins.
value:
#if ((%2>=9999)&(%2<=50000000)) {
tempCurrGold=0
tempCurrGold=%eval( %2+ @currGold)
gold
scan
#WA
#WA
#WA
#if (@tempCurrGold>=@currGold) {
#VAR betting %additem( %1, @betting)
#VAR betting %additem( %2, @betting)
#say adding %1 %2
say thanks for donation
#say %1 %2
#add payin %2
} {say eh somethings not adding up right here}
} {
sa hmm ok to rich for my blood sorry
give %2 coins %1
gold
}
pattern:You have %1,%2,%3 gold coins.
value:
currGold=%1%2%3 |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Nov 07, 2004 1:12 pm |
Simply move all the script after the "gold" command into the second trigger, and eliminate the #WAITs. They are doing nothing for you. You will have to use variables to record the player name and amount for use in the second trigger. A quick version of what I am saying.
pattern:(%w) gives you (%d) gold coins.
value:
#if ((%2>=9999)&(%2<=50000000)) {
tempCurrGold=%eval( %2+ @currGold)
gold
scan
Bettor="%1|%2"
pattern:You have (%n) gold coins.
value:
currGold=%1
#if (@Bettor) {
#if (@tempCurrGold>=@currGold) {
#VAR betting %concat(@betting,"|",@Bettor)
#say adding @Bettor
say thanks for donation
#say @Bettor
#add payin %item(@Bettor,2)
} {say eh somethings not adding up right here}
} {
sa hmm ok to rich for my blood sorry
give %item(@Bettor,2) coins %item(@Bettor,1)
gold
}
Bettor=""
} |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
|
|
|
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
|
|