Postado Julho 31, 2018 6 anos Galera baixei um servidor de dragon ball 8.60 e tem muitos bugs, to arrumando aos poucos, mas tem um que ta incomodando, que é o do NPC Dragon Shenlong, voce junta as 7 esferas do dragao, e quando clica o NPC nasce e fala contigo, voce ganha uma storage, e na hora que voce faz o pedido, ele entrega seu "pedido" item, e não SOME, aparece esse erro aqui [23:55:13.822] [Error - NpcScript Interface] [23:55:13.822] data/npc/scripts/shenlong.lua:onCreatureSay [23:55:13.823] Description: [23:55:13.823] data/npc/scripts/shenlong.lua:55: attempt to call global 'executeCommand' (a nil value) [23:55:13.824] stack traceback: [23:55:13.824] data/npc/scripts/shenlong.lua:55: in function <data/npc/scripts/shenlong.lua:33> Aqui esta o script do NPC. Mostrar conteúdo oculto local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false 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') and getPlayerStorageValue(cid, 6010) == 1 and focus == 0) and getDistanceToCreature(cid) < 4 then selfSay('Hello, '..getCreatureName(cid)..'! Tell me your "wish".') focus = cid talk_start = os.clock() elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'wish') then selfSay('What do you need "senzu", 200 "magic senzu" , "skills" or "1000k zeni" ?') elseif msgcontains(msg, 'senzu') and getPlayerStorageValue(cid, 6000) == -1 then doPlayerAddItem(cid, 640,100) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) setPlayerStorageValue(cid, 6000, 1) elseif msgcontains(msg, 'senzu') and getPlayerStorageValue(cid, 6000) == 1 then selfSay("I can't do this wish for you.") elseif msgcontains(msg, 'magic senzu') and getPlayerStorageValue(cid, 6002) == -1 then doPlayerAddItem(cid,639,100) doPlayerAddItem(cid,639,100) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) setPlayerStorageValue(cid, 6002, 1) elseif msgcontains(msg, 'magic senzu') and getPlayerStorageValue(cid, 6002) == 1 then selfSay("I can't do this wish for you.") elseif msgcontains(msg, 'skills') then selfSay('I can give for you "5 speed", "5 waepon fighting", "5 sword" , "5 defense" , "5 strenght" and "5 ki blasting".') elseif msgcontains(msg, 'speed') and getPlayerStorageValue(cid, 6004) == -1 then doPlayerAddSkillTry(cid,0,5000000) doPlayerAddSkillTry(cid,0,5000000) doPlayerAddSkillTry(cid,0,5000000) doPlayerAddSkillTry(cid,0,5000000) doPlayerAddSkillTry(cid,0,5000000) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) setPlayerStorageValue(cid, 6004, 1) elseif msgcontains(msg, 'speed') and getPlayerStorageValue(cid, 6004) == 1 then selfSay("I can't do this wish for you.") elseif msgcontains(msg, 'weapon fighting') and getPlayerStorageValue(cid, 6005) == -1 then doPlayerAddSkillTry(cid,1,5000000) doPlayerAddSkillTry(cid,1,5000000) doPlayerAddSkillTry(cid,1,5000000) doPlayerAddSkillTry(cid,1,5000000) doPlayerAddSkillTry(cid,1,5000000) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) setPlayerStorageValue(cid, 6005, 1) elseif msgcontains(msg, 'weapon fighting') and getPlayerStorageValue(cid, 6005) == 1 then selfSay("I can't do this wish for you.") elseif msgcontains(msg, 'defense') and getPlayerStorageValue(cid, 6006) == -1 then doPlayerAddSkillTry(cid,5,5000000) doPlayerAddSkillTry(cid,5,5000000) doPlayerAddSkillTry(cid,5,5000000) doPlayerAddSkillTry(cid,5,5000000) doPlayerAddSkillTry(cid,5,5000000) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) setPlayerStorageValue(cid, 6006, 1) elseif msgcontains(msg, 'defense') and getPlayerStorageValue(cid, 6006) == 1 then selfSay("I can't do this wish for you.") elseif msgcontains(msg, 'sword') and getPlayerStorageValue(cid, 6007) == -1 then doPlayerAddSkillTry(cid,2,5000000) doPlayerAddSkillTry(cid,2,5000000) doPlayerAddSkillTry(cid,2,5000000) doPlayerAddSkillTry(cid,2,5000000) doPlayerAddSkillTry(cid,2,5000000) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) setPlayerStorageValue(cid, 6007, 1) elseif msgcontains(msg, 'sword') and getPlayerStorageValue(cid, 6007) == 1 then selfSay("I can't do this wish for you.") elseif msgcontains(msg, 'ki blasting') and getPlayerStorageValue(cid, 6008) == -1 then doPlayerAddSkillTry(cid,4,5000000) doPlayerAddSkillTry(cid,4,5000000) doPlayerAddSkillTry(cid,4,5000000) doPlayerAddSkillTry(cid,4,5000000) doPlayerAddSkillTry(cid,4,5000000) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) setPlayerStorageValue(cid, 6008, 1) elseif msgcontains(msg, 'ki blasting') and getPlayerStorageValue(cid, 6008) == 1 then selfSay("I can't do this wish for you.") elseif msgcontains(msg, 'strenght') and getPlayerStorageValue(cid, 6009) == -1 then doPlayerAddSkillTry(cid,3,5000000) doPlayerAddSkillTry(cid,3,5000000) doPlayerAddSkillTry(cid,3,5000000) doPlayerAddSkillTry(cid,3,5000000) doPlayerAddSkillTry(cid,3,5000000) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) setPlayerStorageValue(cid, 6009, 1) elseif msgcontains(msg, 'strenght') and getPlayerStorageValue(cid, 6009) == 1 then selfSay("I can't do this wish for you.") elseif msgcontains(msg, 'zeni') then doPlayerAddItem(cid,2160,100) selfSay('Thanks for you wish.') executeCommand(cid, "/remove", "dragon shenron") setGlobalStorageValue(6010, -1) setGlobalStorageValue(1999, -1) elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. getCreatureName(cid) .. '!') focus = 0 talk_start = 0 end end end function onCreatureChangeOutfit(creature) end if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end Editado Julho 31, 2018 6 anos por Zzyzx (veja o histórico de edições)
Postado Julho 31, 2018 6 anos Autor Em 31/07/2018 em 03:36, Lyu disse: Não está encontrando a função executeCommand. consegui resolver, o @Rusherzin mudou algumas coisas e deixou assim doRemoveCreature(getNpcId())
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.