Tech_Rob
New Member
- Joined
- Oct 10, 2007
- Messages
- 100
- Reaction score
- 1
I am trying to get a key to drop from a monster. I can't seem to get a key to be looted out of the corpse, but I was given a script that will place the key directly to the killer. This is the script I am using, but it does give an error when I try to add a special description to it.
This will keep the monster alive, and constantly give the key over and over again. Until it crashes the server. Without the set special desc, it will work fine. Any possibility someone can assist with getting a working script to loot a key out of the dead corpse with a special desc?
Code:
local key = XXXX
function onKill(cid, target, lastHit)
if isMonster(target) then
doItemSetAttribute(doPlayerAddItem(cid, key, 1), "aid", 1200)
doSetItemSpecialDescription(key, 'This key once belonged to the gatekeeper.')
end
return true
end
This will keep the monster alive, and constantly give the key over and over again. Until it crashes the server. Without the set special desc, it will work fine. Any possibility someone can assist with getting a working script to loot a key out of the dead corpse with a special desc?