I haven't tested this yet, but I think this should do the trickCode: [Select]RegisterOutputEvent("FxDTSbrick", "BotDropItem", "DataBlock ItemData", false);RegisterOutputEvent("Player", "BotDropItem", "DataBlock ItemData", false);function FxDTSbrick::BotDropItem(%brick, %item){ if(isObject(%bot = %brick.vehicle) && getClassName(%bot) $= "AIplayer") { %drop = new item() { datablock = %item; }; %drop.position = getPosition(%bot); }}function Player::BotDropItem(%bot, %item){ if(isObject(%bot) && getClassName(%bot) $= "AIplayer") { %drop = new item() { datablock = %item; }; %drop.position = getPosition(%bot); }}edit: What the heck, it says getClassName() isn't a function! I'm going to try to do %bot.getClassName() instead.double edit: Ok, it works now, but if you pick up the item while you are in a minigame, it will say "item is not in minigame."Is this acceptable or should I fix this?
RegisterOutputEvent("FxDTSbrick", "BotDropItem", "DataBlock ItemData", false);RegisterOutputEvent("Player", "BotDropItem", "DataBlock ItemData", false);function FxDTSbrick::BotDropItem(%brick, %item){ if(isObject(%bot = %brick.vehicle) && getClassName(%bot) $= "AIplayer") { %drop = new item() { datablock = %item; }; %drop.position = getPosition(%bot); }}function Player::BotDropItem(%bot, %item){ if(isObject(%bot) && getClassName(%bot) $= "AIplayer") { %drop = new item() { datablock = %item; }; %drop.position = getPosition(%bot); }}
FIX IT
OK, I made it. Let me test it.EDIT: http://dl.dropbox.com/u/551734/add-ons/Event_PrizeDrops.zipUse Bot -> addPrizeDrop [Item] [Percent Chance] to add a prize drop, prize drops are automatically dropped when the bot or player dies.Use Bot -> dropPrizeDrops to drop all of the player's prize drops.
Find out how the minigame checks if the item is in the minigame.
%obj.client = new AIconnection() { bot = %obj; minigame = %client.minigame; brickGroup = %client.brickGroup; //So the client can still ride horses and whatnot };
Your version works great. Its just that the items still cannot be picked up in a minigame making it mostly useless.Other than that, this is perfect! Thank you.
Got an idea for you.OnBotKilled > Droprandomitem (name all the items to be dropped) - percentage for each