darkcieran 1 Report post Posted July 26, 2010 Hey folks! I'm not sure if anyone something similar to this or not, but here goes anyway. Have you ever wanted to make an enemy drop random items after you beat them WITHOUT; A. Looking for a script? B. Requesting a script? C. Learning to script? This is how! It's so easy, you wonder why no one thought of this first! Step 1. Creating an Item Giver(IG) (monster that will be giving the random item). Go through the standard steps used to make your other enemies. Choose the battler, set the stats, etc. But don't, DO NOT, give it an item. (This will be cover later). make sure to remember the IG's ID Step 2. The Setup. Here's where things get interesting. Go to the Monster Group(Troops) tab in the editor, expand the array by one and create a new Troop containing you IG (call it whatever you want). Next, in the Battle Event editor, click the "Trigger" menu. Select where is says "turn" and leave it as is(which is 0 x 0) and set the frequency to "Battle Turn" Step 3. The System. Now the easy part. First set up a variable(we'll call it 'treasure') and set it to a random number between 0 and 3. Make four Conditional Branches, one for each number(0-3). The first one you leave blank, you get nothing. The second one is where you'll need to do a bit of light scripting. Select the Call Script function in your event editor(its the last item on the Page 3) and type in this little code snippet $data_enemies[enemy id].item_id = Where it says enemy id, put in the IG's ID and at the right of the equal sign, put in the ID number of the item you want to give(we'll make it '1' for a potion). Repeat this step for the other number branches while changing the item ID's to whatever you choose. Try it out. And VIOLA! Congratulations, you've just made yourself a monster that gives different items when you beat it. NOTE: THIS WILL ONLY WORK ONCE PER BATTLE!!! IF YOU HAVE TWO OR MORE OF THE SAME MONSTER IN THE TROOP, YOU WILL ONLY GET TWO OF THE SAME ITEM!!! The good news is, you can set another monster to give away random items as well. So you can two different monsters give in two different items. I'll see if I can come up with a way for two of the same monster to give different random items. Unless someone beats me to it. I have a link to the demo showing how it works. If used, credit would be nice. Any questions feel free to hit me up. Any critiques welcome. http://www.4shared.com/file/Wc1aBM0H/Random_Item_Drop.html TTFN Share this post Link to post Share on other sites
Noob Saibot 38 Report post Posted July 26, 2010 I say hit him really hard! Sorry couldn't help myself. Share this post Link to post Share on other sites
darkcieran 1 Report post Posted July 26, 2010 lol! if only that was were true. anyway, i wanted to state that you can make more branches for more items if you need to. Share this post Link to post Share on other sites
Dark Den 4 Report post Posted July 27, 2010 Thanks for the tutorial im sure i will need it someday :alright: Share this post Link to post Share on other sites
darkcieran 1 Report post Posted July 29, 2010 np, den if you have any quest or any suggestions please feel free to let me know Share this post Link to post Share on other sites