HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help..

09-22-2006, 09:24 PM#1
Coreybowen999
I need to know to make a trigger where if somebody types a number to pay somebody and it gives the player they are paying what ever number they type
ex. -pay orange 136
it can pay orange 136 gold.
09-22-2006, 11:05 PM#2
The)TideHunter(
Firstly, I highly suggest you dont use colours, as they are all different lengths and is practically impossible without Jass.

So im using numbers, 2 digits, 01 = Player 1, 08 = Player 8, 11 = Player 11.

Heres a working example i made:

Trigger:
Give Money
Collapse Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Player - Player 2 (Blue) types a chat message containing <Empty String> as A substring
Player - Player 3 (Teal) types a chat message containing <Empty String> as A substring
Player - Player 4 (Purple) types a chat message containing <Empty String> as A substring
Player - Player 5 (Yellow) types a chat message containing <Empty String> as A substring
Player - Player 6 (Orange) types a chat message containing <Empty String> as A substring
Player - Player 7 (Green) types a chat message containing <Empty String> as A substring
Player - Player 8 (Pink) types a chat message containing <Empty String> as A substring
Player - Player 9 (Gray) types a chat message containing <Empty String> as A substring
Player - Player 10 (Light Blue) types a chat message containing <Empty String> as A substring
Player - Player 11 (Dark Green) types a chat message containing <Empty String> as A substring
Player - Player 12 (Brown) types a chat message containing <Empty String> as A substring
Collapse Conditions
(Substring((Entered chat string), 1, 4)) Equal to -pay
Collapse Actions
Set GivingPlayer = (Triggering player)
Set RecievingPlayer = (Player((Integer((Substring((Entered chat string), 9, 10))))))
Set Amount = (Integer((Substring((Entered chat string), 9, (Length of (Entered chat string))))))
Player - Add Amount to RecievingPlayer Current gold
Player - Add (0 - Amount) to RecievingPlayer Current gold
09-22-2006, 11:20 PM#3
Coreybowen999
lemme try it thx