lucastiond
New Member
- Joined
- Jul 14, 2013
- Messages
- 35
- Reaction score
- 0
I'm trying to make the creature Renegade Orc give me a StorageValue when I kill him, but to do that, i need to have a StorageValue. But when i kill it, nothing happens. Not even an error on console.
This is the script in creaturescripts
I already registered the storage Value in quests.xml and I also registered the event name "Renegade Orc" in login.lua, as I did in creaturescripts.xml
I really have no idea of what to do now. I've already searched on OTland but I can't find anything useful. I highly appreciate it if somebody has any idea how I can solve this.
Thanks
This is the script in creaturescripts
Code:
function onKill(creature, target)
local targetMonster = target:getMonster()
if not targetMonster then
return true
end
if(string.lower(getCreatureName(target)) == "renegade orc") then
return true
end
local player = creature:getPlayer()
if (player:getStorageValue(46120) == 1) then
player:setStorageValue(46120, 2)
end
return true
end
I already registered the storage Value in quests.xml and I also registered the event name "Renegade Orc" in login.lua, as I did in creaturescripts.xml
I really have no idea of what to do now. I've already searched on OTland but I can't find anything useful. I highly appreciate it if somebody has any idea how I can solve this.
Thanks
Last edited: