Wc3 Calculator :)

Alright. I got bored and so I tried to make a warcraft calculator...pretty much a calculator...just on warcraft, simple.
Now this is how my trigger looks right about now:
Code:
att1
????Events
????????Player - Player 1 (Red) types a chat message containing 1 + 0 as An exact match
????????Player - Player 1 (Red) types a chat message containing 1 + 1 as An exact match
????????Player - Player 1 (Red) types a chat message containing 2 + 1 as An exact match
????????Player - Player 1 (Red) types a chat message containing 3 + 1 as An exact match
????????Player - Player 1 (Red) types a chat message containing 4 + 1 as An exact match
????????Player - Player 1 (Red) types a chat message containing 5 + 1 as An exact match
????????Player - Player 1 (Red) types a chat message containing 6 + 1 as An exact match
????????Player - Player 1 (Red) types a chat message containing 7 + 1 as An exact match
????????Player - Player 1 (Red) types a chat message containing 8 + 1 as An exact match
????????Player - Player 1 (Red) types a chat message containing 9 + 1 as An exact match
????Conditions
????Actions
????????Game - Display to (All players) for 30.00 seconds the text: ((Entered chat string) +??=)
????????Game - Display to (All players) the text: (String(((Integer((Substring((Entered chat string), 1, 2)))) + (Integer((Substring((Entered chat string), 5, 7)))))))

This works, but I really am not felling like putting in every combination from 0 - 1000.
What I need is an event that, if a player, enters a string that looks like this
"# + #"
that the trigger will solve it.
I have tried, tried again but have failed.

Thank you in advance.

P.S.
No JASS!! GUI is fine!
Thank you :)
 
Werbung:

Xeridanus

New Member
change it to:
Code:
Player - Player 1 (Red) types a chat message containing + as A substring
notice the "as A substring" part. ;)

Oh, and btw, that is actually a bot, it's paying for the site.
 
Werbung:
I was joking.
And Xer many thanks to you - it already works.
You don't need variables to make it work ^^

Now I need subtraction, multiplication, and division! ^_^

Thank you all.
 
Top