Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How can I make an event know how many items a player has? [EO2.3]


mmorpgmaster
 Share

Recommended Posts

So I noticed a problem, I need to know how many of an item a player has,not just if they have the item at all.
I have an item that is treated as a potion, but in one part you need to turn in a certain amount.
setting the "take away" number for "change item"(event editor) to a number a player doesn't have will NOT fail. it simply takes what the player does have,but lets them continue.

if this type of multi-item is used cheating is easy. and that isn't good.
any help?
Link to comment
Share on other sites

I am at work at the moment so I can't give you a direct example but if I remember correctly within the server code is a function which is called 'hasitem' and returns either 1 or false, if you can copy this function to recreatete search for the item within a loop which checks if an item is found in an inventory slot then continues to add up if it finds one within that slot then return the final value you should be set. Then create a loop function depending on the returned number to take the item.

Dam mobiles are hard to type on!
Link to comment
Share on other sites

so…VB6?
I don't have VB6 and there is no longer a legal way to get it.
(there is a "custom script" function in the vent widow but that's probably where this code goes if i could compile it.)
if I had a way of compiling vb6 I would definitely make this function myself since I pretty much know how to code in VB6 and VB.NET

Edit:
I'm upgrading. idk if this would ok inside my vb2010\. lol. gotta know  ;)
Link to comment
Share on other sites

@mmorpgmaster:

> so…VB6?
> I don't have VB6 and there is no longer a legal way to get it.

Ebay or MSDN or Dreamspark…. Ebay will be the most expensive. If your a student, try and sign up for dreamspark. I know a few people on the forums say that its on there.
Link to comment
Share on other sites

@mmorpgmaster:

> not out of the box. but correctly, this could take a long time to convert enough to compile. I'm definitely not able to to make everything work perfectly ;)

Well best of luck, many have tried that before, but I haven't seen a final, working version out of any of them.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...