Marcinek Paladinek~ made a Monster killing quest, as radonia has.
Whats wrong with this code?
Creaturescripts.xml
Login.lua:
Trollquest.lua
Sincerely,
Furstwin.
Whats wrong with this code?
Creaturescripts.xml
Code:
<event type="death" name="TrollQuest" script="trollquest.lua"/>
Code:
registerCreatureEvent(cid, "TrollQuest")
Code:
function onPrepareDeath(cid, killer)
TROLL_QUEST = getPlayerStorageValue(cid, 9876)
if getCreatureName(cid) == "Troll" then
if TROLL_QUEST ~= 0 and TROLL_QUEST < 5 then
setPlayerStorageValue(cid, 9876, TROLL_QUEST + 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have killed: "..TROLL_QUEST.."/5.")
elseif TROLL_QUEST == 5 then
doPlayerSendTextMessage(cid, 22, "Congratulations, you are done!")
setPlayerStorageValue(cid, 9875, 1)
end
end
return TRUE
end
Sincerely,
Furstwin.
Last edited: