ID:270730
 
i need a code for attacking one that gains exp, monster respown at certain time, drops gold and sometimes items, hit higher with better weapons, and monster hits lower with better armour u got on someone plz help me out ty
Stone_Cold_Oven wrote:
i need a code for attacking one that gains exp, monster respown at certain time, drops gold and sometimes items, hit higher with better weapons, and monster hits lower with better armour u got on someone plz help me out ty

So, you pretty much need an entire battle engine? Well I highly doubt that you'll just be handed one, odds are good that the link that Mecha Destroyer JD gave you will be about as much as people are willing to just give you.

But if your willing to do a little work then you can have one in no time. First, go and look in the demo's and libraries, I know there to be at least 3 you can learn from there. Then lets take your request one step at a time.

We'll start with monster respawns. The easiest way, and the way that is sure to muck something else up later would be to use World.Repop(). Now you will need to set a delay on that, but your a smart guy I'm sure you can figure out how if you sleep()/spawn() on it.

Now as for adding exp and droping gold or an item from time to time, Zilal covers this pretty well in her First Tutorial she has 3 in all so be sure to read them all.

As for the armor and weapon bonuses, well there are about a bajillion diferent ways to handle that. Mostly it depends on your own personal style, you can add the bonuses in the equip verbs, or handle it more like zelda, or contra or anything for that matter. But it all comes down to adding a variable to another variable. The most important thing is to remember to check and see if your going to be doing negative damage, which would heal the target. It's never a good idea to give hp back to something thats trying to kill you.

Well that about covers it, good luck and get to work.