DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • August 16, 2017, 04:38:30 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: monsters dropping items?  (Read 2901 times)
0 Members and 1 Guest are viewing this topic.
Spider
Guest
« on: July 17, 2004, 11:50:04 AM »

I would quite like to be able to make a specific monster from the forest drop an item, say for example make the whale occasionally drop a whale's tooth when you defeat it.

I don't really have a clue how to go about doing this though, I'll probably have a trawl through the battle code later on and see if I can figure it out, but if anyone is more enlightened than me I would be very grateful if you could point me in the right direction :-)
Logged
lonnyl
Guest
« Reply #1 on: July 17, 2004, 11:54:54 AM »

You will need to get into the battle code.... propably into the creature editor code... add and item field for creatures.... then depending on what you want the item to be/do create a system for carrying/holding the item..... or you will have to create buff code in a table for each item if you want buffs to be given.... or if you want the items carryable like chow and potions you will need to create pages with returns for using the items.....
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #2 on: July 17, 2004, 04:07:15 PM »

in the battle code, just say something like

if(creature name="whale"){
$chance=e_rand(1,20);
if ($chance<20)
$session[user][whaletooth]++;
}

no need to edit the creature code.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
24 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search