• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Who can make me this script?

Deisherooo

Server Creator
Joined
Jul 8, 2009
Messages
24
Reaction score
0
Location
USA
Today i need a script to work like this


Say i make a command to say !lootpickup (lootname)


and i need a script for this to pick up the loot u type in say i put !lootpickup Boots Of Haste when i kill the monster that loots it instead of opening the monster for the loot, it just puts it in my backpack! I dont kno if this is possible, but could somone make this for me?


I will need to know what files to put the scripts in thanks!


I WILL REP++
 
It would be possible to do it with the "corpse" variable of onKill or smth. But the variable never worked for me..
 
scripting...
LUA:
function onSay(cid, words, param, channel)
    if isCorpse(getThingFromPos()uid)
return true
end
 
PHP:
function onDeath(cid, corpse, deathList)
	--corpse = uid of the corpse
	local items = you_need_a_function_to_get_container_items(corpse)
	-- the function needs to save id and uid of the items
	if isInArray(items,ID_OF_ITEM_TO_LOOT) then
		doRemoveItem(UID_OF_ITEM) --remove it from corpse
		doPlayerAddItem(deathList[1],ID_OF_ITEM_TO_LOOT,ITEM.TYPE)
	end
	return true
end

I won't give you my function to check all container items ;o
 
Back
Top