Page 1 of 1

-Gold (Amount)

Posted: Sat Oct 02, 2010 8:48 am
by OrcSlayer101
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 :D I can't seem to figure out the strings part..... Help Me!

Re: -Gold (Amount)

Posted: Sat Oct 02, 2010 8:57 am
by 3ICE
You can grab the "Amount" from converting t_all 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.

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

Re: -Gold (Amount)

Posted: Sat Nov 06, 2010 8:24 am
by OrcSlayer101
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!

Re: -Gold (Amount)

Posted: Sat Nov 06, 2010 10:24 am
by 3ICE
No.


Use this...

Event: Player types "Gold me" (exact match)
Action: Give (triggering player) 10000 gold

...and you are done.

Re: -Gold (Amount)

Posted: Thu Nov 11, 2010 6:14 pm
by OrcSlayer101
LoL.

Fine I guess im not good enough :(