Hello, Thanks for reading my thread.
Question One :
BOT : <Welcomes Me>
ME : Soft Boots
BOT : Do you want to refill your soft boots for 10k?
ME : Yes
BOT : Sorry, You dont have that Item.
ME : Hi
BOT : Welcomes Me.
ME : Soft Boots.
BOT Im specialist in soft boots, what do you bring me?
ME : Soft Boots
Nothing Happens.
Question One :
Question TwoI Followed "100% Rl Tibia Soft Boots" Link.
http://******.net/showthread.php?t=66883&highlight=soft+boots
But when he came to Movements.xml it says search for 6530 and you will find
<item id="6530" name="worn leather boots">
<attribute key="weight" value="900"></attribute>
But i cant find that.
Where in Movements.xml should i put this?
ME : HiI have two soft boots scripts incase the other one doesnt work.
BOT : <Welcomes Me>
ME : Soft Boots
BOT : Do you want to refill your soft boots for 10k?
ME : Yes
BOT : Sorry, You dont have that Item.
Second Soft boots Refiller.local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
if(npcHandler.focus ~= cid) then
return false
end
if msgcontains(msg, 'soft boots') or msgcontains(msg, 'worn soft boots') then
selfSay('Would you like your worn soft boots to be fixed? It will cost 10k.')
talk_state = 1
elseif msgcontains(msg, 'yes') and talk_state == 1 then
if getPlayerItemCount(cid,6530) >= 1 then
if doPlayerTakeItem(cid,6530,1) and pay(cid,10000) then
selfSay('Here you are.')
doPlayerAddItem(cid,6132,1)
end
else
selfSay('Sorry, you don\'t have the item.')
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Oh? Maybe another time...')
talk_state = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModu
ME : Hi
BOT : Welcomes Me.
ME : Soft Boots.
BOT Im specialist in soft boots, what do you bring me?
ME : Soft Boots
Nothing Happens.
Could someone fix one of these scripts? Thanks.local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end
if msgcontains(msg, 'specialised') or msgcontains(msg, 'boot') then
selfSay('Yes, my fathers was a great one blacksmith, it was a wise person , but when he decided to teach me he dies and i just learn about the lovely boots. So, did you bring me some boots? which one?')
elseif msgcontains(msg, 'soft boots') or msgcontains(msg, 'worn soft boots') or msgcontains(msg, 'soft boot') or msgcontains(msg, 'worn soft boot') then
selfSay('Did u like that i fix ur worn soft boots? it will cost 100 platinum coins')
talk_state = 1
elseif msgcontains(msg, 'yes') and talk_state == 1 then
if getPlayerItemCount(cid,6530) >= 1 and getPlayerItemCount(cid,2152) >= 100 then
if doPlayerTakeItem(cid,6530,1) and doPlayerTakeItem(cid,2152,100) == 0 then
selfSay('Here you are.')
doPlayerAddItem(cid,2640,1)
end
else
selfSay('Sorry, you don\'t have the item.')
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok than.')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Last edited by a moderator: