1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Dig System

Submitted by X-OMG-X
This bundle is marked as approved. It works and satisfies the submission rules.

Dig System


Created by x-omg-x


Description
How to use:

Move your unit to a position with dirt.
Use the 'dig' abillity.
If you are lucky enought to find something, you will get an item.


About this system:

This is just an easy system i made for a request.
It do only contain 2 triggers and is very configureable and easy to read.
There are commented on most of the actions to make it easy to understand for everybody.
This system is MUI, leakless, laggless and bugless.

Copyright:

This system is made by me and all credits goes to X-OMG-X.
Do not distribute this system to any other sites.
Give credits if used.

Triggers
  • DigInit
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- --------
      • -------- X-OMG-X's --------
      • -------- --------
      • -------- Dig System --------
      • -------- --------
      • -------- --------
      • -------- Here you can set the items that have a chance to be digged up --------
      • -------- If you want more than 10 items, just increase the array --------
      • -------- --------
      • Set Dig_Item[1] = Boots of Quel'Thalas +6
      • Set Dig_Item[2] = Orb of Frost
      • Set Dig_Item[3] = Ring of Protection +5
      • Set Dig_Item[4] = Ankh of Reincarnation
      • Set Dig_Item[5] = Claws of Attack +12
      • Set Dig_Item[6] = Scourge Bone Chimes
      • Set Dig_Item[7] = Scroll of Speed
      • Set Dig_Item[8] = Wand of Lightning Shield
      • Set Dig_Item[9] = Cloak of Flames
      • Set Dig_Item[10] = Periapt of Vitality
      • -------- --------
      • -------- This is the chance to get one of the items above --------
      • -------- --------
      • Set Dig_Chance = 30.00
      • -------- --------
      • -------- If the unit have to be on a specific tile to dig, set this to true --------
      • -------- --------
      • Set Dig_UseSpecificTile = True
      • -------- --------
      • -------- If Dig_UseSpecificTile is set to true, you can set the tile here --------
      • -------- --------
      • Set Dig_Tile = Ashenvale - Rough Dirt
  • DigLoop
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dig
    • Actions
      • -------- --------
      • -------- EDITING ANYTHING BELOW THIS LINE CAN CAUSE THE SYSTEM TO NOT WORK --------
      • -------- --------
      • Set Dig_Unit = (Triggering unit)
      • Set Dig_Position = (Position of Dig_Unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dig_UseSpecificTile Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain type at Dig_Position) Equal to Dig_Tile
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random real number between 1.00 and 100.00) Less than or equal to Dig_Chance
                • Then - Actions
                  • Item - Create Dig_Item[(Random integer number between 1 and 10)] at Dig_Position
                  • Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player))) for 5.00 seconds the text: (You found: + (Name of (Last created item)))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Size of inventory for Dig_Unit) Greater than 0
                    • Then - Actions
                      • Hero - Give (Last created item) to Dig_Unit
                    • Else - Actions
                • Else - Actions
                  • Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player))) for 5.00 seconds the text: You didnt find anyt...
            • Else - Actions
              • Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player))) for 5.00 seconds the text: Only useable on Dir...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random real number between 1.00 and 100.00) Less than or equal to Dig_Chance
            • Then - Actions
              • Item - Create Dig_Item[(Random integer number between 1 and 10)] at Dig_Position
              • Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player))) for 5.00 seconds the text: (You found: + (Name of (Last created item)))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Size of inventory for Dig_Unit) Greater than 0
                • Then - Actions
                  • Hero - Give (Last created item) to Dig_Unit
                • Else - Actions
            • Else - Actions
              • Game - Display to (All players matching ((Owner of Dig_Unit) Equal to (Matching player))) for 5.00 seconds the text: You didnt find anyt...
      • Custom script: call RemoveLocation(udg_Dig_Position)
      • -------- --------
      • -------- EDITING ANYTHING ABOVE THIS LINE CAN CAUSE THE SYSTEM TO NOT WORK --------
      • -------- --------



Now i dont have anything else to say than, enjoy!

Keywords:
system, dig, hole, dirt, rought, luck, lucky, unit, abillity
Contents

Dig [System] (Map)

Reviews
Moderator
13:15, 23rd Dec 2009 The_Reborn_Devil: The triggers look good and there are no leaks. I do have some things I must point out: (Random real number between 1.00 and 100.00) Should be between 0 and 100, not a big deal though :D And you should make...
  1. 13:15, 23rd Dec 2009
    The_Reborn_Devil:
    The triggers look good and there are no leaks.
    I do have some things I must point out:
    • (Random real number between 1.00 and 100.00)
    Should be between 0 and 100, not a big deal though :D
    And you should make it possible to add/remove items you can get.
    One solution is just adding another variable which you can f.ex. call "Max_Dig_Items" and replace all
    • (Random integer number between 1 and 10)

    with
    • (Random integer number between 1 and Max_Dig_Items)


    Status: Approved
    Rating: Useful
     
  2. X-OMG-X

    X-OMG-X

    Joined:
    Nov 10, 2008
    Messages:
    1,942
    Resources:
    16
    Icons:
    1
    Skins:
    3
    Maps:
    2
    Spells:
    8
    Template:
    1
    Tutorials:
    1
    Resources:
    16
    Subscribing..

    Please comment and rate!
     
  3. CHA_Owner

    CHA_Owner

    Joined:
    Feb 11, 2008
    Messages:
    801
    Resources:
    2
    Spells:
    2
    Resources:
    2
    From a look at the triggers this system is leakless and is very useful so i vote for approval.

    also i have 1 question the chance to get item that you have set to 30.00 it works on a percentage scale right?
     
  4. KYTON

    KYTON

    Joined:
    Oct 28, 2007
    Messages:
    428
    Resources:
    2
    Models:
    1
    Maps:
    1
    Resources:
    2
    Add a: Dig_ArraySize variable. Currently if you want more or less than 10 items you'll have to edit the random integer max yourself, which an't a problem, but I'm sure some "less experianced people" :p will forget to change it.
     
  5. YourNameHere

    YourNameHere

    Joined:
    Apr 29, 2007
    Messages:
    745
    Resources:
    4
    Maps:
    1
    Spells:
    2
    JASS:
    1
    Resources:
    4
    • Item - Create Dig_Item[(Random integer number between 1 and 10)] at Dig_Position

    You should make the 10 a configurable, otherwise you can add like 100 items but nothing will change.

    e/ wtf.
     
    Last edited: Dec 23, 2009
  6. Tortured Souls

    Tortured Souls

    Joined:
    Oct 5, 2009
    Messages:
    110
    Resources:
    0
    Resources:
    0
  7. Dangerb0y

    Dangerb0y

    Joined:
    Oct 11, 2009
    Messages:
    41
    Resources:
    1
    Spells:
    1
    Resources:
    1
  8. CHA_Owner

    CHA_Owner

    Joined:
    Feb 11, 2008
    Messages:
    801
    Resources:
    2
    Spells:
    2
    Resources:
    2
    I have to agree the triggers are completely different just take a look yourself.
     
  9. X-OMG-X

    X-OMG-X

    Joined:
    Nov 10, 2008
    Messages:
    1,942
    Resources:
    16
    Icons:
    1
    Skins:
    3
    Maps:
    2
    Spells:
    8
    Template:
    1
    Tutorials:
    1
    Resources:
    16
    Wow thanks for the fast feedback and approval. I will change the mentoded things. Also, no i didnt copy the triggers from the map you linked. I didnt even know that map. If you check out some of my other resources, then you'll see that im not that kind of guys. Im making things by myself. Anyways, thanks for the nice comments. I'll be back with an update in a few minutes.
     
  10. BloodStorm2262

    BloodStorm2262

    Joined:
    Mar 18, 2005
    Messages:
    167
    Resources:
    1
    Skins:
    1
    Resources:
    1
    Isn't DigUnit leaking?
     
  11. YourNameHere

    YourNameHere

    Joined:
    Apr 29, 2007
    Messages:
    745
    Resources:
    4
    Maps:
    1
    Spells:
    2
    JASS:
    1
    Resources:
    4
    Why should a unit variable leak?
     
  12. The Hegemuffin

    The Hegemuffin

    Joined:
    Mar 24, 2006
    Messages:
    23
    Resources:
    5
    Maps:
    5
    Resources:
    5
    I like the tagline - somehow very appropriate for a spell of this simplicity.
     
  13. BloodStorm2262

    BloodStorm2262

    Joined:
    Mar 18, 2005
    Messages:
    167
    Resources:
    1
    Skins:
    1
    Resources:
    1
    took a break from mapping for a while, thought any set variable leaked I suppose... But if it doesnt leak then their is no point in setting it to a variable no?

    Also, a good way to improve (or change) this system could be making it use random item of category/level... ex/ a random level 1 charged item or a random level 2 permanent item etc. based on chance
     
  14. YourNameHere

    YourNameHere

    Joined:
    Apr 29, 2007
    Messages:
    745
    Resources:
    4
    Maps:
    1
    Spells:
    2
    JASS:
    1
    Resources:
    4
    It's faster to use a variable instead of Triggering Unit.
     
  15. naitsirk

    naitsirk

    Joined:
    Jan 24, 2009
    Messages:
    570
    Resources:
    0
    Resources:
    0
    A better way of Doing this could properly be that you use a Hashtable instead? I don't know... but it is easier and takes less space? I am not too sure but it's easier with Hashtable then the Variables:D
     
  16. KYTON

    KYTON

    Joined:
    Oct 28, 2007
    Messages:
    428
    Resources:
    2
    Models:
    1
    Maps:
    1
    Resources:
    2
    Add a boolean RemoveOnDig or something

    When it is true, you remove items from the array as they get digged up.
     
  17. timothyhuth

    timothyhuth

    Joined:
    Feb 20, 2011
    Messages:
    50
    Resources:
    0
    Resources:
    0