Eu fiz isso, para adicionar,
doSendMagicEffect(getPlayerPosition(cid), 12) para reparar soft boots
e
doSendMagicEffect(getPlayerPosition(cid), 13) para reparar Firewalker boots
mas eu tenho esse problema
[Error - LuaScriptInterface::loadFile] data/npc/scripts/softst.lua:59: '<eof>' expected near 'end' [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/softst.lua data/npc/scripts/softst.lua:59: '<eof>' expected near 'end'
este é o script
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'soft') or msgcontains(msg, 'soft boots')) then selfSay('¿Quieres reparar tus soft boots por 20000 gold coins?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(getPlayerItemCount(cid, 10021) >= 1) then if(doPlayerRemoveMoney(cid, 20000) == TRUE) then doPlayerRemoveItem(cid, 10021, 1) doPlayerAddItem(cid, 2640) doSendMagicEffect(getPlayerPosition(cid), 12) selfSay('Aqui tienes.', cid) else selfSay('¡No mames wey!, ¡no te alcanza el dinero!, ¡¡regresate a cazar mounstruos para juntar, jodido!!.', cid) end else selfSay('Disculpa, no tienes Worn sofs Boots.', cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then talkState[talkUser] = 0 selfSay('Ok pues.', cid) end if(msgcontains(msg, 'firewalker') or msgcontains(msg, 'firewalker boots')) then selfSay('¿Quieres reparar tus firewalker boots por 20000 gold coins?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(getPlayerItemCount(cid, 10022) >= 1) then if(doPlayerRemoveMoney(cid, 20000) == TRUE) then doPlayerRemoveItem(cid, 10022, 1) doPlayerAddItem(cid, 9933) doSendMagicEffect(getPlayerPosition(cid), 13) selfSay('Aqui tienes.', cid) else selfSay('¡No mames wey!, ¡no te alcanza el dinero!, ¡¡regresate a cazar mounstruos para juntar, jodido!!.', cid) end else selfSay('¿¡Seras pendejo!?, ¿donde estan tus Worn of Firewalker Boots?. Si las olvidaste vete y cuando las tengas ven conmigo.', cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then talkState[talkUser] = 0 selfSay('Ok pues.', cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())