Kramer infernal
I work alone =/
- Joined
- Jun 18, 2008
- Messages
- 225
- Reaction score
- 0
Well, in my server, there's a quest who give you a shovel with an action id... taht shovel you must bring back to the Npc Boula and then he will give you gold and experience... but I have an error... I don't know what I need to put for npc retire the shovel with the action id... Can you help me?
Code:
function onCreatureSay(cid, type, msg, item)
quest = getPlayerStorageValue(cid,8002)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello young ' .. getCreatureName(cid) .. '. Please if you dont wanna say me nothing important then don\'t\ talk me, am busy finding my shovel.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Get lost ' .. getCreatureName(cid) .. '.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'shovel') then
selfSay('Well, its a very important shovel to me, was maded by the ancient cyclops, I toss it while checking a tomb in the Imbalay town, you will find that for me?.')
talk_state = 1
elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
selfSay('Thank you so much... beware of assassins in that dangerous town, when you return call me by my name please. Boula')
setPlayerStorageValue(cid,8002,1)
end
if msgcontains(msg, 'boula') then
if quest == 2 then
[COLOR="Red"][B]if getPlayerItemCount(cid,5710) == 1 and getPlayerItemCount(cid, 5710).actionid == 8002 then[/B][/COLOR]
if doPlayerTakeItem(cid,5710,1) == 0 then
selfSay('Oh thanks for bring me back my shovel! Take the wisdom of the worker and an additional fee!')
doPlayerAddItem(cid,2152,70)
doPlayerAddExp(cid,8000)
setPlayerStorageValue(cid,8002,3)
else
selfSay('You must find me my shovel brother!')
end
[COLOR="Red"] else
selfSay('You don\'t have my shovel already...')
end[/COLOR] <--- ERROR
else
selfSay('You must search my shovel.')
end
end
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Get Lost ' .. getCreatureName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end