View Single Post
  #4  
Old 05-07-2005, 05:49 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Post whole systems is not allowed, but I can give you an advice; An item drop systems is not complicated, if you think a little bit before start scripting.
Let's see how it would work first:

1st) You need check if you have items, if yes, introduce them into a string list;
2nd) If you have selected wich item you want to drop, you will have to use a putnpc2(), this command will create a new npc on level, so you will need to set some attributes for it. (like it's name, the image of the weapon)

After dropping, use 'with()'; That will act directly where you tell it to act, in this case, on last npc created.

NPC Code:

with(npcs[npcscount-1]){
setstring this.itemname,ITEM_NAME;
setstring this.itemimage,ITEM_IMAGE;
}



You told 'with()' to act on npcs, and specified wich npc, that is why I used 'npcscount-1', 'npcscount' will get the quantity of npcs that exist on level and '-1' will be yours, the last one dropped.

You can find more information about strings,putnpc2 using, with(), by doing a forum search.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /

Last edited by osrs; 05-07-2005 at 07:15 PM..
Reply With Quote