Convert Wood -> Gold

  • Thread starter Thread starter W1f4r3
  • Start date Start date
W

W1f4r3

Guest
Hello again. Im Back from Vacation and already i need a help :O :/
So now im making a TD (Again lol) where you must chop wood to upgrade from Town Hall to castle and u can get easier gold from goldmine(from getting caste able to build farm and more food limit will be get) :)
But i want that i can write -convert (wood amount) and it will convert the choosen wood amount to gold(gold will be half of chosen wood amount).. But it need to be pair number like 2,4,6,8,10,110,10000000000 e.t.c like when i type:
-convert 100 and it gives me 50 gold so its like wood amount / 2 :)
but if i type - convert 3 it tells only pair numbers can be converted...
SOooo0o0o0o0o0o0o0ooo how to make this ? if u dont understand what i want just say it i will explain better :)
 
Something like this?
Code:
    Events
        Player - Player 1 (Red) types a chat message containing -convert as A substring
        Player - Player 2 (Blue) types a chat message containing -convert as A substring
        Player - Player 3 (Teal) types a chat message containing -convert as A substring
        Player - Player 4 (Purple) types a chat message containing -convert as A substring
    Conditions
        (Length of (Entered chat string)) Greater than 9
    Actions
        Set tmpInteger1 = (Integer((Substring((Entered chat string), 10, (Length of (Entered chat string))))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (tmpInteger1 mod 2) Not equal to 0
            Then - Actions
                Game - Display to (Player group((Triggering player))) the text: Must be a pair numb...
            Else - Actions
                Player - Add (tmpInteger1 x -1) to (Triggering player) Current lumber
                Player - Add (tmpInteger1 / 2) to (Triggering player) Current gold


You can also have a "goold/lumber shop" where you can bye items that cost x lumber/gold. If item gold/lumber is bought for you give them x/2 gold/lumber
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top