DrEvil
FCRI Associate!
- Reaction score
- 111
Well i heard alot of people saying "-gold (playercolour) (amount) " wasnt possible...
I made a system to sort that problem out .
It requires you to do "-g <playercolour> <amount>" without quotes
Its in GUI , i will make it JASS soon .
Dont know if it has been done before but o'well here is my codes =
Hope you all enjoy my first system at TheHelper .
Pic :
Heres the map
I made a system to sort that problem out .
It requires you to do "-g <playercolour> <amount>" without quotes
Its in GUI , i will make it JASS soon .
Dont know if it has been done before but o'well here is my codes =
Code:
GG
Events
Player - Player 1 (Red) types a chat message containing -g as A substring
Conditions
(Substring((Entered chat string), 1, 3)) Equal to -g
Actions
Set StartCount = 1
Set EndCount = 1
For each (Integer A) from 4 to (Length of (Entered chat string)), do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), (Integer A), (Integer A))) Equal to <
Then - Actions
Set StartV[StartCount] = ((Integer A) + 1)
Set StartCount = (StartCount + 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), (Integer A), (Integer A))) Equal to >
Then - Actions
Set EndV[EndCount] = ((Integer A) - 1)
Set EndCount = (EndCount + 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
EndCount Greater than or equal to 2
StartCount Greater than or equal to 2
Then - Actions
Set S = (Substring((Entered chat string), StartV[1], EndV[1]))
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
S Equal to Names[(Integer A)]
Then - Actions
Set TargetPlayer = (Player((Integer A)))
Set S = (Substring((Entered chat string), StartV[2], EndV[2]))
Set GoldGiven = (Integer(S))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) Current gold) Greater than or equal to GoldGiven
Then - Actions
Player - Set TargetPlayer Current gold to ((TargetPlayer Current gold) + GoldGiven)
Player - Set (Triggering player) Current gold to (((Triggering player) Current gold) - GoldGiven)
Game - Display to (Player group((Triggering player))) the text: (You just gave + ((Name of TargetPlayer) + ( + ((String(GoldGiven)) + gold.))))
Game - Display to (Player group(TargetPlayer)) the text: ((Name of (Triggering player)) + ( just gave you + ((String(GoldGiven)) + gold.)))
Else - Actions
Else - Actions
Else - Actions
Code:
Setup
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Set Names[1] = red
Set Names[2] = blue
Set Names[3] = teal
Set Names[4] = purple
Game - Display to (All players) the text: Type "-g <player...
Game - Display to (All players) the text: To give "PlayerColo...
Hope you all enjoy my first system at TheHelper .
Pic :
Heres the map