Beefy Kasplant Posted July 9, 2020 Share Posted July 9, 2020 I've seen a couple of people asking about this, and since there isn't going to be an instancing system in Intersect any time soon I decided to show you guys how to lock a map when there are people in it already.  First you want to think about what the system needs to do:  1. Lock a map when a person is in it 2. Open up the map when a person leaves  We're working with global variables here because the map needs to be closed for everyone.  So the base system is simple:  In our example we have a door leading into a private dungeon and the dungeon has an exit door for the player to leave through.  Variables needed: Global Boolean Variable: RoomLocked Player Boolean Variable: IsInRoom  Event to enter: If RoomLocked = 0 Set IsInRoom = 1 Warp Player to map Else Text: There is someone in the room.  Event to leave: Set RoomLocked = 0 Set IsInRoom = 0 Warp player  Add to Player Login Event: If IsInRoom = 1 Warp Player   Yes, I can already hear you moaning and whining: What about when players log off, or die? What then huh? Your system will break. I have only one thing to say about that: Fuck you.  There's actually a super easy trickster way that requires just a little bit of 'out of the box' thinking and I'll tell you for 5m OSRS GP. So please send me after you read this:  Autorun Event in the Map: Run condition: Roomlocked = 0 Set RoomLocked = 1  The trick is that this event will only run when people are in the map. A map event won't be loaded otherwise. It will also only run if something sets RoomLocked = 0. So it won't be constantly running and putting strain on the server.  Now, we have to change our first event slightly to make use of this system:  Event to enter: Set RoomLocked = 0 Show chatbox text: Checking the Room Wait 3000ms (This will give more than enough time for players inside the room to trigger the map event and set the RoomLocked = 1.) If RoomLocked = 0 Warp Player to map Else Text: There is someone in the room.    Enjoy, and remember to give credit and OSRS GP!  NOTE: I wrote this off the top of my head, so please test or let me know about any bugs.   Push, Zoagel, Ainz Ooal Gown and 3 others 6 Link to comment Share on other sites More sharing options...
Push Posted July 9, 2020 Share Posted July 9, 2020 Nice tutorial. You would have to also set a Login trigger to warp the player out of the map. Also, does that mean this event doesn't have a timer? Can't someone just sit in the map to not allow others in? Uranochos 1 Link to comment Share on other sites More sharing options...
Beefy Kasplant Posted July 9, 2020 Author Share Posted July 9, 2020 Yeah, true, I forgot about the login trigger, let me add that since that's a pretty vital part.  The timer is an easy add but that's up to the user, this is really about the system of locking a room while people are in it. Normally you'd have a bossfight or something and people would either die or beat the boss. Link to comment Share on other sites More sharing options...
Push Posted July 9, 2020 Share Posted July 9, 2020 Depends on how rare the item is the boss drops. People will log into a alt account and just sit there to raise the price/rarity of the drop. Â I guess it's an extra feature but can be critical. Shenmue 1 Link to comment Share on other sites More sharing options...
Khaikaa Posted July 10, 2020 Share Posted July 10, 2020 10 hours ago, Beefy Kasplant said: Yes, I can already hear you moaning and whining: What about when players log off, or die? What then huh? Your system will break. I have only one thing to say about that: Fuck you.  I made a logout common event system and shared it somewhere here, but it's hard as fuck and needs a 24/7 client working as a controller. Better hire some programmer instead doing what I said before source was released. Link to comment Share on other sites More sharing options...
Beefy Kasplant Posted July 10, 2020 Author Share Posted July 10, 2020 5 hours ago, Khaikaa said:  I made a logout common event system and shared it somewhere here, but it's hard as fuck and needs a 24/7 client working as a controller. Better hire some programmer instead doing what I said before source was released.  In this case you don't need a logout common event system. Link to comment Share on other sites More sharing options...
Khaikaa Posted July 10, 2020 Share Posted July 10, 2020 4 hours ago, Beefy Kasplant said:  In this case you don't need a logout common event system. How do you unlock the dungeon then if the player inside logs out after blocking it? Link to comment Share on other sites More sharing options...
Jackson Posted July 10, 2020 Share Posted July 10, 2020 How to make a dungeon for passing through time?  Suppose a player comes in - it closes, the countdown starts 5 minutes  after 5 minutes the player throws back and the dungeon opens again Link to comment Share on other sites More sharing options...
Beefy Kasplant Posted July 10, 2020 Author Share Posted July 10, 2020 16 minutes ago, Khaikaa said: How do you unlock the dungeon then if the player inside logs out after blocking it?  Not sure if you read the whole post but:  Event to enter: Set RoomLocked = 0  4 minutes ago, Jackson said: How to make a dungeon for passing through time?  Suppose a player comes in - it closes, the countdown starts 5 minutes  after 5 minutes the player throws back and the dungeon opens again   You'd need an event that starts a timer, sets the room to unlocked state after that time and warps the players out. I'm sure you can figure it out Link to comment Share on other sites More sharing options...
Senpai402 Posted December 28, 2020 Share Posted December 28, 2020 I'm interested to see how you maked this running, i tried with many switch, and common event without success Link to comment Share on other sites More sharing options...
Beefy Kasplant Posted December 28, 2020 Author Share Posted December 28, 2020 3 hours ago, Senpai402 said: I'm interested to see how you maked this running, i tried with many switch, and common event without success  Hey man,  Show me your events and tell me your issue, maybe I can help Link to comment Share on other sites More sharing options...
Senpai402 Posted December 28, 2020 Share Posted December 28, 2020  On 7/10/2020 at 4:17 AM, Khaikaa said:  I made a logout common event system and shared it somewhere here, but it's hard as fuck and needs a 24/7 client working as a controller. Better hire some programmer instead doing what I said before source was released.  It was for Khaikaa, but thanks anyway ! Beefy Kasplant 1 Link to comment Share on other sites More sharing options...
Push Posted December 29, 2020 Share Posted December 29, 2020 This type of event system has a lot of flaws and it will break when your server restarts/crashes. I had a system that worked well for single and group instances. Though the event system will not hold up through any server restarts and you'd have to manually refresh the variables. As well the event tick timer has some odd logic to it that makes it 'random' when running too many conditional branches. I'd be happy to see a real working one. EDIT: you can see it being done here: Â Â Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now