nneader Posted June 27, 2012 Author Share Posted June 27, 2012 I want to be able to place an item on the map as an admin and NOT be able to be picked up by anyone else except another admin.I thought maybe a check box on the item editor named, "no pick up" or "admin only" for that specific item.I know this could be possible, however, I am not sure how to do this. Can anyone point me in the right direction or maybe something like this exists? I searched for awhile, however, came up short.I thought it would be cool to place something (for example a fire) and not have anyone else be able to pick it up…Thanks in advance.NN Link to comment Share on other sites More sharing options...
omerg7 Posted June 27, 2012 Share Posted June 27, 2012 i have to ideas for you.1\. give the admin's an item called "admin" or something else and make before the item you want only admin to pick key and then when an admin comes he will have to double click on the "admin" item to enter and pick up the item.2\. if it's equipment or spell, the put the access req to 5 and then only admin can use them.enjoy,omerg7 :star: :rstar: :bstar: Link to comment Share on other sites More sharing options...
nneader Posted June 27, 2012 Author Share Posted June 27, 2012 Thanks for the suggestion, however, I want an item that CANNOT be picked up by any one, except for admins. In your case, anyone can pick up the item, but only admin can use it. Link to comment Share on other sites More sharing options...
Exception Posted June 27, 2012 Share Posted June 27, 2012 I haven't tested this for myself, but I'd imagine this would work.Server-side, there's a sub called "PlayerMapGetItem". I imagine, with all the other checks, that checks for whether there's actually an item there, whether the player has a free inv. slot, etc, you can add something like:``` If Item(MapItem(mapNum, i)).AdminPickupOnly = True Then If Player(Index).Access < ADMIN_MAPPER Then ' They're not a member of staff, tell them they can't pick it up. Exit Sub Else ' They are, so carry on as normal. End If Else ' It's not an admin-only pickup, so, just carry on as normal. End If```In order to help you learn, I won't tell you what goes in between the commented sections, but having a quick read at the original sub should tell you what goes where, and it should be easy enough to follow. Link to comment Share on other sites More sharing options...
nneader Posted June 27, 2012 Author Share Posted June 27, 2012 Thanks for the response.Just so I am clear….I am assuming the AdminPickupOnly is a variable I am going to declare.Also ADMIN_MAPPER is an established variable (probably global since it's in all caps)??Thanks! Link to comment Share on other sites More sharing options...
abhi2011 Posted June 28, 2012 Share Posted June 28, 2012 Yes to the AdminPickupOnly. And it has to be saved to the item file. And yes it is established variable and global to check whether a player's access level. Link to comment Share on other sites More sharing options...
nneader Posted June 28, 2012 Author Share Posted June 28, 2012 Thanks for clearing that up. :cheesy:Searching the forums, I found this little gem of a tutorial: [http://www.touchofdeathforums.com/smf/index.php?topic=35449.0](http://www.touchofdeathforums.com/smf/index.php?topic=35449.0)It is pretty much what I want to do….add another property to the item editor, in my case "Admin pickup".The question I have.Does this tutorial (listed above) still work with EO 2.0?Thanks! Link to comment Share on other sites More sharing options...
Exception Posted June 28, 2012 Share Posted June 28, 2012 That tutorial itself is intended for EE/ES. It's the same principle, in that you add the new structure to the ItemRec, save/load it, and send it from the client to the server when using the item editor. Link to comment Share on other sites More sharing options...
abhi2011 Posted June 28, 2012 Share Posted June 28, 2012 It is intended for EE. But can be used as a base for EO. Just post any more questions here and we will help. Link to comment Share on other sites More sharing options...
nneader Posted June 29, 2012 Author Share Posted June 29, 2012 Hello,I have been trying to get this working, however, I am running into a bit of snags.My player can drop things (admin or not), however, my player cannot pick it up, even as admin.Can you tell me the existing code (EO2.0) that I need to place in the …" **They are, so carry on as normal.**" and " **It's not an admin-only pickup, so, just carry on as normal**" (from previous reply) Side note:> If Item(MapItem(mapNum, i)).AdminPickupOnly = True ThenIn the above, I noticed that it should be **If Item(MapItem(mapNum, i).NUM).AdminPickupOnly = True Then** < Thanks. I am still learning :cheesy: Link to comment Share on other sites More sharing options...
Exception Posted June 29, 2012 Share Posted June 29, 2012 At the side-note, yes, that'd be correct, I missed it out by mistake.Another little tip: The code is EXACTLY the same as it would be, you just add another "If Player(Index).Access >= ADMIN_MAPPER (Or whatever access level you want)" to make sure that the access level you want is the only one that can pick it up. Link to comment Share on other sites More sharing options...
Likestodraw Posted June 29, 2012 Share Posted June 29, 2012 It sounds like you need some sort of map-animation system. Link to comment Share on other sites More sharing options...
Exception Posted June 30, 2012 Share Posted June 30, 2012 @Likestodraw:> It sounds like you need some sort of map-animation system.…what the hell are you on about?Did you even bother reading this thread? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted June 30, 2012 Share Posted June 30, 2012 @Lenn:> …what the hell are you on about?> Did you even bother reading this thread?I believe he mentioned, in another thread, that the purpose of this modification was so he could drop an animated item without letting players pick it up. Link to comment Share on other sites More sharing options...
Exception Posted June 30, 2012 Share Posted June 30, 2012 Items animate, anyway…being server side, this has no influence over the client bltting animation routine. Link to comment Share on other sites More sharing options...
nneader Posted June 30, 2012 Author Share Posted June 30, 2012 @Likestodraw:> It sounds like you need some sort of map-animation system.That is exactly what I am doing AND it seems to be working like a charm. I am using the existing item animation that is already in play. I have 32 x 32 "tiles" that sit on top of the ground and on top of the fringe…so my animation can play at any level. May not be the greatest system, however, it is a system :cheesy:The only downer is that to build a 64 x 64 animated tile, I need 4 items. Oh well, small price to pay.Peace,NN Link to comment Share on other sites More sharing options...
Exception Posted June 30, 2012 Share Posted June 30, 2012 Rather than do that…why not make an actual tile animation system, or add a new tile-type in the editor that allows you to place animations on the map? Link to comment Share on other sites More sharing options...
Joost Posted June 30, 2012 Share Posted June 30, 2012 I would do it this way. It doesn't require adding new variables. It checks the access level required on the item, and if the user cant use it the user cant pick up the item.``` If Item(MapItem(mapnum, i)).AccessReq <= Player(index).Access Then 'can pick up the item, since the access req on the item is lower than player's access. Else 'can't pick up the item since the accessreq on the item is too high, so item is unusable. can insert some error msg here if you want End If``` Link to comment Share on other sites More sharing options...
nneader Posted June 30, 2012 Author Share Posted June 30, 2012 @Lenn:> Rather than do that…why not make an actual tile animation system, or add a new tile-type in the editor that allows you to place animations on the map?I 100% agree, however, I thought the item way may be perfect for me at my programming lvl.I want to eventually get a tile system going…... Link to comment Share on other sites More sharing options...
Likestodraw Posted June 30, 2012 Share Posted June 30, 2012 If you're looking for an animation system, this one [[url=http://www.touchofdeathforums.com/smf2/index.php/topic,79806.msg855308.html#msg855308]http://www.touchofdeathforums.com/smf2/index.php/topic,79806.msg855308.html#msg855308] allows you to place animations (from the animation editor) down on your map as an attribute. 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