• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Integer Trigger problem !!

Status
Not open for further replies.
Level 9
Joined
Mar 9, 2010
Messages
272
Hi i am creating a loap and i wish to have a mayor that sets tax. For example fantasy life, when the king types -set tax 500 the tax will be set to 500 and the same tax will be shown to all players through a dialog.
Please may anyone give me the answers of how to do the triggers of the tax setting and how to have the dialog tax players the amount they need to pay. THX it will meen a lot.:spell_breaker:
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
  • TaxSet
    • Events
      • Player - Player 1 (Red) types a chat message containing -set tax as A substring
    • Conditions
    • Actions
      • Set TaxInteger = (Integer((Substring((Entered chat string), 10, 14))))
      • Dialog - Change the title of TaxDialog to (Tax rate: + (String(TaxInteger)))
      • Dialog - Create a dialog button for TaxDialog labelled OK
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Dialog - Show TaxDialog for (Player((Integer A)))
Supports up to 4 characters as a number (from 1 to 9999)

  • DialogClicked
    • Events
      • Dialog - A dialog button is clicked for TaxDialog
    • Conditions
    • Actions
      • Dialog - Hide TaxDialog for (Triggering player)
This will simply hide the dialog when the button "OK" is clicked.

I don't know how the tax-system works in 'Fantasy Life', so I can't help you with the payment thingie.
 
Status
Not open for further replies.
Top