|
Zener Wanderer
Joined: 31 May 2004 Posts: 54 Location: USA
|
Posted: Tue Jun 08, 2004 11:25 pm
Problem with a COMMA!! |
zMUD 7.05
Ok, here is my trigger thingy. I get a Syntax Error using it though.
-----------------------------------------------------------------
| Pattern:^(%w) gives you &Gold coins.
-----------------------------------------------------------------
-----------------------------------------------------------------
| Value:
|----------------------------------------------------------------
| #VAR person0 %1
| #VAR Bet %2
| #T- GreetPC
| #T- ^(%w) gives you &Gold coins.
| #T- DiceRoll
| #T- RandomRanges
| gold
| #SHOW StatusCheck... Current Gold: @GoldBeforeBet - Player: @person0 - Bet: @Bet
| #if ((%2>=1,000) AND (%2<=50,000)) {
| title @person0 @Bet
| sayto %1 You have placed a bet of @Bet gold.
| #WAIT 1000
| sayto %1 Something or Other...
| #T+ RandomRanges
| } {
| sayto @person0 I am sorry, your bet is either above or below the min or max bet.
| give @person0 @Bet
| title *CENSORED*
| }
| #WAIT 1000
| #T+ GreetPC
|==================================================
| #if ((%2>=1,000) AND (%2<=50,000)) {
|__________^ syntax error (It dont show the 50,000 one unless I delete the comma in 1,000)
-----------------------------------------------------------------
How can I fix this?
~Zener |
|
|
|
Zener Wanderer
Joined: 31 May 2004 Posts: 54 Location: USA
|
Posted: Tue Jun 08, 2004 11:31 pm |
Also, since I run my mini-casino when I am AFK, I cannot be sure that people are not using EMOTES to exploit my game. How can I prevent this, so far I just have a serparate window that logs everything and I can review it when I come back.
The fewer amount of changes to make this happen the better.
~Zener |
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Wed Jun 09, 2004 7:46 pm |
You want to compare %2 as a number against a number so don't use the commas at all.
#IF ((%2 >= 1000) AND (%2 <= 50000)) ...
That should work but if it doesn't you might want to write your trigger like this
^(%w) gives you &%n{Gold} coins.
As far as stopping emotes.
1) If they can't exactly produce the giving money line with an emote you could just write a more specific trigger.
2) If they can't reproduce the color with an emote you can write your trigger as an ansi one to make sure the color is correct.(On my mud you can only emote in bold green but actually giving money is shown in white.)
3) And finally if neither of those are possible you can keep track of your money and have your script check and make sure they gave you money.
Cheers |
|
|
|
Zener Wanderer
Joined: 31 May 2004 Posts: 54 Location: USA
|
Posted: Wed Jun 09, 2004 7:53 pm |
quote: Originally posted by jessew
You want to compare %2 as a number against a number so don't use the commas at all.
#IF ((%2 >= 1000) AND (%2 <= 50000)) ...
That should work but if it doesn't you might want to write your trigger like this
^(%w) gives you &%n{Gold} coins.
As far as stopping emotes.
1) If they can't exactly produce the giving money line with an emote you could just right a more specific trigger.
2) If they can't reproduce the color with an emote you can right your trigger as an ansi one to make sure the color is correct.
3) And finally if neither of those are possible you can keep track of your money and have your script check and make sure they gave you money.
Cheers
Awesome, could you by chance tell me how to make the following as an ansi trigger, yellow colored. I have yet to understand how to do it even after reading the help files...
^(%w) gives you &%n{Gold} coins.
People can emote giving gold exactly. (I use it to test triggers, along with #SHOW/#ECHO/#SAY)
People cannot reproduce the color of giving gold which is yellow. |
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Wed Jun 09, 2004 8:09 pm |
The best way to find the color codes is to copy the message of someone giving you gold. Go to the settings make a new trigger set it to ansi. Then paste in your copied text, it should could come up with the color codes added for you which you can use to make your trigger.
Joe gives you 100,000 gold.
After Pasting you would get. %e[1;53mJoe gives you 100,000 gold.
Trigger would like something like this..
#TRIGGER {%e[1;53m(%w) gives you &gold gold.} {...} "" {color}
Cheers |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Wed Jun 09, 2004 8:20 pm |
Have someone give you gold higlight that line then in your settings editor click on the options tab for your gold trigger select ansi trigger and shift-insert or whatever the other keyboard paste method is into your trigger pattern and it will paste something like this *EX only color may not be correct* %e[1,36mJeff gives you etc
Then Before the %e put your ^ and change the stuff after the ##m to (%w) gives you &%n{Gold} coins. |
|
|
|
|
|