Kramer infernal
I work alone =/
- Joined
- Jun 18, 2008
- Messages
- 225
- Reaction score
- 0
Well, not too long ago, like 2 weeks, this script used to realize the function perfectly, but later, when I opened in test mode my server, I realize that the script won't trigger... Any suggestion?
In creaturescripts/scripts/Unique.lua
IN creaturescripts.xml
In creaturescripts/scripts/login.lua
In creaturescripts/scripts/Unique.lua
Code:
function onKill(cid, target)
if(getCreatureName(target) == "Troll Lord") then
broadcastMessage(getCreatureName(cid).. ' has killed ' .. getCreatureName(target) .. ' From ashalay\'s underground.', 20)
local reward = doPlayerAddItem(cid,5805,1)
doSetItemSpecialDescription(reward,'Congratulations to ' .. getCreatureName(cid) .. ' by killing the ' .. getCreatureName(target) ..'.')
doPlayerAddExp(cid,10000)
if getPlayerLevel(cid) <= 50 then
local random = math.random(1,9)
if random == 1 then
doPlayerAddItem(cid,9140,2)
elseif random == 2 then
doPlayerAddItem(cid,9121,1)
elseif random == 3 then
doPlayerAddItem(cid,9114,1)
elseif random == 4 then
doPlayerAddItem(cid,9074,1)
elseif random == 5 then
doPlayerAddItem(cid,9075,1)
elseif random == 6 then
doPlayerAddItem(cid,9081,1)
elseif random == 7 then
doPlayerAddItem(cid,9099,1)
elseif random == 8 then
doPlayerAddItem(cid,9108,1)
elseif random == 9 then
doPlayerAddItem(cid,2152,50)
end
end
end
if(getCreatureName(target) == "undead lord") then
broadcastMessage(getCreatureName(cid).. ' has killed ' .. getCreatureName(target) .. ' From Duhville.', 20)
reward = doPlayerAddItem(cid,5805,1)
doSetItemSpecialDescription(reward,'Congratulations to ' .. getCreatureName(cid) .. ' by killing the ' .. getCreatureName(target) ..'.')
doPlayerAddExp(cid,20000)
if getPlayerLevel(cid) <= 50 then
local random = math.random(1,9)
if random == 1 then
doPlayerAddItem(cid,9176,2)
elseif random == 2 then
doPlayerAddItem(cid,9127,1)
elseif random == 3 then
doPlayerAddItem(cid,9129,1)
elseif random == 4 then
doPlayerAddItem(cid,9110,1)
elseif random == 5 then
doPlayerAddItem(cid,9122,1)
elseif random == 6 then
doPlayerAddItem(cid,9115,1)
elseif random == 7 then
doPlayerAddItem(cid,9134,1)
elseif random == 8 then
doPlayerAddItem(cid,9138,1)
elseif random == 9 then
doPlayerAddItem(cid,2152,100)
end
end
end
return TRUE
end
IN creaturescripts.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<event type="login" name="PlayerLogin" script="login.lua"/>
<event type="kill" name="Davy" script="Davy.lua"/>
<event type="death" name="PlayerDeath" script="playerdeath.lua"/>
<event type="kill" name="Unique" script="Unique.lua"/>
</creaturescripts>
In creaturescripts/scripts/login.lua
Code:
function onLogin(cid)
registerCreatureEvent(cid, "Unique")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "Davy")
return TRUE
end
Last edited: