Mirage Engine
Give Item Directly To Player - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Give Item Directly To Player (/showthread.php?tid=46)



Give Item Directly To Player (Split) - Tutorial Bot - 01-06-2006

Author: Dark Dragon
Difficulty: 1/5

:: SERVER SIDE ::
In modGameDatabase, under Sub AttackNPC, find:
Code:
' Drop the goods if they get it
        n = Int(Rnd * Npc(NpcNum).DropChance) + 1
        If n = 1 Then
              Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum, MapNpcNum).x, MapNpc(MapNum, MapNpcNum).y)
        End If
Replace with:
Code:
' Drop the goods if they get it
        n = Int(Rnd * Npc(NpcNum).DropChance) + 1
        If n = 1 Then
              'Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum, MapNpcNum).x, MapNpc(MapNum, MapNpcNum).y)
              Call GiveItem(Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue)
        End If
That's all!


- Robin - 03-07-2006

If you add this, just make sure that if your inventory is full, it drops the item instead. Or many a rare item will be lost =o