Eeddiitt:
Thank you chris77. I'll see if it works ...
Edit: I have edited the script but don't work normal:
quest__rookgaard_ghoul.lua
Code:function onKill(cid, target) local config = { monstername = "Undead Man", finalstorage = 026610 } if isMonster(target) == TRUE then if getCreatureName(target) == config.monstername then if getPlayerStorageValue(cid, config.finalstorage) == -1 then doCreatureSay(target, "Ahhh! do not open the boxes!!!", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, config.finalstorage, 1) end end end return TRUE end
login.lua
Code:registerCreatureEvent(cid, "RookgaardGhoul")
creaturescripts.xml
Code:<event type="kill" name="RookgaardGhoul" event="script" value="quest__rookgaard_ghoul.lua"/>
rookgaard_scarf.lua
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 026610) == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must kill the monster to open the box.") elseif getPlayerStorageValue(cid, 026610) == 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a Scarf.") doPlayerAddItem(cid, 2661, 1) setPlayerStorageValue(cid, 026610, 2) elseif getPlayerStorageValue(cid, 026610) == 2 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") end return TRUE end
actions.xml
Code:<action uniqueid="26610" event="script" value="quests/rookgaard_scarf.lua"/>
The problem: I kill the monster but appear the msg if u open the box:
Last edited: