-Gold (Amount)
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.
Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.
Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.
Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.
Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.
Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.
Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
- OrcSlayer101
- Posts: 82
- Joined: Thu Mar 25, 2010 6:09 pm
- Realm: US East
- Account: ShadowBlades
- Clan: TvN
-Gold (Amount)
I waas wondering how to make a trigger that when you type ex. -gold 1000, it gives you that money. I want this for a creator cheat that I'm hoping i will only use in emergencies I can't seem to figure out the strings part..... Help Me!
The Of Orcs...
- 3ICE
- Admin
- Posts: 2630
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: -Gold (Amount)
You can grab the "Amount" from converting Substring(Entered Chat String, 7, 13) to an integer.
7 because the string "-gold " is 6 characters long, so we start our "Amount" from the 7th char
And 13, because the most gold you can have is 7 digits (1000000 - from the 7th character to the 13th character you get exactly 7 digits)
The rest is easy.
7 because the string "-gold " is 6 characters long, so we start our "Amount" from the 7th char
And 13, because the most gold you can have is 7 digits (1000000 - from the 7th character to the 13th character you get exactly 7 digits)
The rest is easy.
Code: Select all
if(String2Integer(Substring("-gold 1000000", 7, 13)) != 1000000)then
In case my maths is off, just play around with the numbers until it works. :)
endif
- OrcSlayer101
- Posts: 82
- Joined: Thu Mar 25, 2010 6:09 pm
- Realm: US East
- Account: ShadowBlades
- Clan: TvN
Re: -Gold (Amount)
Alrighty after a long time not playing wc im back but what you said here... could you please show me the whole thing in gui im kinda sucky when it comes to triggers
Please and Thank you!
Please and Thank you!
The Of Orcs...
- 3ICE
- Admin
- Posts: 2630
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: -Gold (Amount)
No.
Use this...
Event: Player types "Gold me" (exact match)
Action: Give (triggering player) 10000 gold
...and you are done.
Use this...
Event: Player types "Gold me" (exact match)
Action: Give (triggering player) 10000 gold
...and you are done.
- OrcSlayer101
- Posts: 82
- Joined: Thu Mar 25, 2010 6:09 pm
- Realm: US East
- Account: ShadowBlades
- Clan: TvN
Who is online
Users browsing this forum: No registered users and 385 guests