• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Dungeon Reset/Loot System

Status
Not open for further replies.
Level 3
Joined
Jan 26, 2008
Messages
38
Hey everyone. This is my second or third help request, but this is the proper section, finally.

I'm looking for what the title suggests. And yes, I've done quite a bit of searching. But the only working systems I've found either have leaks, or not exactly what I want.

I want a mutli-player system here. Meaning, up to 8 players run a mini-dungeon together, and when they kill the boss they're all teleported to their respective loot rooms and loot is generated based on the hero that the person is playing.

This is, exactly, like Defi4nc3's ORPG. It's my favorite one, which is why I'd like it.

I'm not asking for the person that takes on this task to make a system for all 8 players. But setting it up for me so that I can actually add the other 7 would be really nice.

I'd like to give a little background info for your benefit.

The hero of the player is bought from a tavern, not pre-placed on the map.
The items for loot should be related to the hero that is in the loot room. I can make the actual items, so you can use premade WC3 items for the work.
I want the dungeon to reset the units once it's been cleared.

I'll give credit of course, and I'd really appreciate the help. Thank you, in advance.
 
Level 3
Joined
Jan 26, 2008
Messages
38
I have no problem waiting. I feel bad having somebody do this for me as it is. I mean, if it's gonna take a month I may have to ask someone else. I've got time. As long as it works, and it works the way I describe, I'm totally okay with that.
 
Level 3
Joined
Jan 26, 2008
Messages
38
One hero per player. There's a hero selection system though. So it won't be the same hero every time. But yes, ONE hero per player.
 
Level 3
Joined
Jan 26, 2008
Messages
38
This is a bump as well as a note to you Venom;
There will also only be one hero of any type ever at the same time.

Example: If a player picks a Paladin, there will only ever be ONE paladin until he repicks. Not sure if that helps at all.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
the Dungeon Reset System is done, now what i'm trying to make is different matching loot for each hero. it's a bit difficult.

I'd use a hashtable with the hero unittype in integer form as one of the axes.

  • Set TempUnitType = Unit type of hero
  • Custom script: Set udg_TempInteger = udg_TempUnitType
This code converts the unit type variable into an integer.

Along the other axis, you put every item that the hero is able to get.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
i had done something like this.

  • Loot Room Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- Create a hashtable to save the item (doesn't needed if you already have a hashtable) --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Hashtable - Create a hashtable
      • Set hash = (Last created hashtable)
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- Configure the LootRooms for each player --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set LootRoom[1] = (Center of Player 1 Loot Room <gen>)
      • Set LootRoom[2] = (Center of Player 2 Loot Room <gen>)
      • Set LootRoom[3] = (Center of Player 3 Loot Room <gen>)
      • Set LootRoom[4] = (Center of Player 4 Loot Room <gen>)
      • Set LootRoom[5] = (Center of Player 5 Loot Room <gen>)
      • Set LootRoom[6] = (Center of Player 6 Loot Room <gen>)
      • Set LootRoom[7] = (Center of Player 7 Loot Room <gen>)
      • Set LootRoom[8] = (Center of Player 8 Loot Room <gen>)
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- Configure Loots for each hero --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set tempPoint = (Center of (Playable map area)
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- The Hero --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- 1st Hero --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set HeroCount = (HeroCount + 1)
      • Set Hero[HeroCount] = Paladin
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- The Loots --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- 1st Loot --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set ItemCount = (ItemCount + 1)
      • Set ItemType[ItemCount] = Claws of Attack +15
      • Item - Create ItemType[ItemCount] at tempPoint
      • Hashtable - Save Handle Of(Last created item) as ItemCount of HeroCount in hash
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- 2nd Loot --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set ItemCount = (ItemCount + 1)
      • Set ItemType[ItemCount] = Crown of Kings +5
      • Item - Create ItemType[ItemCount] at tempPoint
      • Hashtable - Save Handle Of(Last created item) as ItemCount of HeroCount in hash
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- 3rd Loot --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set ItemCount = (ItemCount + 1)
      • Set ItemType[ItemCount] = Kelen's Dagger of Escape
      • Item - Create ItemType[ItemCount] at tempPoint
      • Hashtable - Save Handle Of(Last created item) as ItemCount of HeroCount in hash
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- Xth Loot --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- AFTER YOU FINISHED WITH 1 HERO --------
      • -------- REMEMBER TO RESET THE ITEMCOUNT TO 0 --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set ItemCount = 0
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- 2nd Hero --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set HeroCount = (HeroCount + 1)
      • Set Hero[HeroCount] = Archmage
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- 1st Loot --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set ItemCount = (ItemCount + 1)
      • Set ItemType[ItemCount] = Heart of Aszune
      • Item - Create ItemType[ItemCount] at tempPoint
      • Hashtable - Save Handle Of(Last created item) as ItemCount of HeroCount in hash
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- 2nd Loot --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set ItemCount = (ItemCount + 1)
      • Set ItemType[ItemCount] = Glyph of Purification
      • Item - Create ItemType[ItemCount] at tempPoint
      • Hashtable - Save Handle Of(Last created item) as ItemCount of HeroCount in hash
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- 3rd Loot --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set ItemCount = (ItemCount + 1)
      • Set ItemType[ItemCount] = Ghost Key
      • Item - Create ItemType[ItemCount] at tempPoint
      • Hashtable - Save Handle Of(Last created item) as ItemCount of HeroCount in hash
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- Xth Loot --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- AFTER YOU FINISHED WITH 1 HERO --------
      • -------- REMEMBER TO RESET THE ITEMCOUNT TO 0 --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • Set ItemCount = 0
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- Xth Hero --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------ --------
EDIT : Dungeon Reset / Loot System finished and attached.

Important to read =
- you MUST set "all the monsters available in all dungeon" 's food costs to 1.
- all the pre-placed monster should be owned by Neutral Hostile.
- the Player 12 Brown should not be used as a player/computer/neutral.
 

Attachments

  • (8) Dungeon Reset and Loot System.w3x
    41.7 KB · Views: 111
Last edited:
Level 3
Joined
Jan 26, 2008
Messages
38
So there's no possible way to set it to a computer player, rather than neutral hostile?
Either way, thanks for this. I'll get to working on implementing it right away.

EDIT: Ahhh, okay I see how this works. It's perfect, thank you very much. I'll check it all over and see if I need help with anything.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
So there's no possible way to set it to a computer player, rather than neutral hostile?
Either way, thanks for this. I'll get to working on implementing it right away.

EDIT: Ahhh, okay I see how this works. It's perfect, thank you very much. I'll check it all over and see if I need help with anything.

oh, i've tested to set the Player 12 Brown to a computer player, it didn't change anything. so, you could change them to a computer player. i doubt that neutral hostile have food used though.

i just change the owner of the monsters in a dungeon from Neutral Hostile to Player 12 Brown once a dungeon is stepped. so, i could count the monsters remaining in a dungeon with supply used by Player 12 Brown, that's why i told you that you should set all monster's food cost to 1.
 
Level 3
Joined
Jan 26, 2008
Messages
38
Yeah, I figured that out haha. It actually works out very well.
My one issue is that when the dungeon resets, it resets the monsters in the spots that they died rather than where they were placed before they died.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Yeah, I figured that out haha. It actually works out very well.
My one issue is that when the dungeon resets, it resets the monsters in the spots that they died rather than where they were placed before they died.

well, you could control their behavior with triggers. maybe order them to move to random point every x seconds. or you can save their position before died and revive them later but i think it's complicated.
 
Status
Not open for further replies.
Top