ScorpiOOn93
etherno.net
Hello, I have a little request. I'm using this NPC:
and I need someone who can edit this NPC to working in 100% on TFS 0.3.4, because now it have a bug. NPC is taking the item (id 1969) but he is saying "Sorry, you dont have the item" and he is not giving any reward even when player have everything.
I don't have realy a lot of time so I'll realy appreciate it and give you rep++
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi')) then
selfSay('Hello ' .. getCreatureName(cid) .. '!.',cid)
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.',cid)
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'help') then
selfSay('i can set you a mission.',cid)
talk_state = 0
elseif msgcontains(msg, 'quest') then
if getPlayerStorageValue(cid,2500) == 1 then
selfSay('You have already started this quest.',cid)
talk_state = 0
else
selfSay('I need help with something if you could do that for me?',cid)
talk_state = 2
end
elseif msgcontains(msg, 'bounty') or msgcontains(msg, 'report') then
if getPlayerStorageValue(cid,2505) == -1 then
selfSay('Go and kill the five bountys first!',cid)
talk_state = 0
elseif getPlayerStorageValue(cid,2505) == 1 then
selfSay('Ok all i need now is your list back.',cid)
talk_state = 0
else
selfSay('Ok all i need now is your list back.',cid)
setPlayerStorageValue(cid,2505,1)
end
elseif msgcontains(msg, 'list') then
if getPlayerStorageValue(cid,2505) == -1 then
selfSay('Sorry, you need to kill the five bountys first.',cid)
talk_state = 0
elseif getPlayerItemCount(cid, 1969) == 0 then
selfSay('Sorry, you dont have the item.')
talk_state = 0
else
selfSay('Really have you killed the five bountys and come back with my list?',cid)
talk_state = 1
end
elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,1969) >= 1 then
if doPlayerTakeItem(cid,1969,1) == 0 then
selfSay('Thank you and here is your reward.',cid)
doPlayerAddItem(cid,2160,100) -- 100 Crystal Coins.
setPlayerStorageValue(cid,2506,1)
else
selfSay('Sorry, you dont have the item.',cid)
talk_state = 0
end
else
selfSay('Sorry, you dont have the item.',cid)
talk_state = 0
end
end
elseif talk_state == 2 then
if msgcontains(msg, 'yes') then
if getPlayerLevel(cid) >= 50 then -- Level 50
selfSay('Ok good, now go and kill the five bountys and come back with your report',cid)
doPlayerAddItem(cid, 1969, 1)
setPlayerStorageValue(cid,2500,1)
else
selfSay('Sorry, you need level 50 or more to start this quest.',cid)
talk_state = 0
end
end
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good Bye ' .. getCreatureName(cid) .. '',cid)
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...',cid)
end
focus = 0
talk_start = 0
end
end
and I need someone who can edit this NPC to working in 100% on TFS 0.3.4, because now it have a bug. NPC is taking the item (id 1969) but he is saying "Sorry, you dont have the item" and he is not giving any reward even when player have everything.
I don't have realy a lot of time so I'll realy appreciate it and give you rep++