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

NPC Drop Random Currency


Ariel
 Share

Recommended Posts

This will simply make a random between 10% less and 10% high of the value you put in the editor.

**Server- Side**

find:
```
Sub PlayerAttackNpc
```
in the sub search for:
```
npcdrops = Npc(npcNum).DropItemValue(n)
```
just under add:
```
If Item(n).Type = ITEM_TYPE_CURRENCY Then
                npcdrops = RAND(npcdrops - (npcdrops / 100 * 10), npcdrops + (npcdrops / 100 * 10))
                End If
```
You can edit the % on changing the "10"

Small but useful ;)
Link to comment
Share on other sites

  • 2 weeks later...
@Soul:

> It looks like [this topic (link)](http://www.touchofdeathforums.com/smf/index.php/topic,75169.0.html) is a prerequisite.

Doesn't seem to work. still can't find "npcdrops"…. When I try to compile it Errors: Variable not define
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...