Postado Fevereiro 10, 2015 10 anos Autor Irei testar, jaja edito Ediit: ele ainda continua levando players free pras cidades vips ;x Ediit2: eu falo com o npc, hi, yalahar, yes, (yalahar eh free), eele vai pra yalahar normal, ai eu falo hi, alfon, yes (alfon eh vip), ai ele vai pra yalahar :S trokei certinho as posx yalahar eh a 1 e alfon eh a 8 Citar local position = { pos1 = {x=1555, y=2576, z=6}, -- posição da 1° cidade e assim sucessivamente.... pos2 = {x = 160, y = 54, z = 7}, pos3 = {x = 160, y = 54, z = 7}, pos4 = {x = 160, y = 54, z = 7}, pos5 = {x = 160, y = 54, z = 7}, pos6 = {x = 160, y = 54, z = 7}, pos7 = {x = 160, y = 54, z = 7}, pos8 = {x=114, y=282, z=6}, pos9 = {x = 160, y = 54, z = 7}, pos10 = {x = 160, y = 54, z = 7}, Editado Fevereiro 10, 2015 10 anos por subhe (veja o histórico de edições)
Postado Fevereiro 10, 2015 10 anos Vou reler tudo aqui, devo ter me passado em algo... Vou instalar o sistema de VIP assim, posso usar em futuros scripts também. Breve edito aqui com o resultado. Te ajudei? Se você achar que eu mereço, me dê uma "rep+" e selecione meu post como "melhor resposta" Skype: JoadsonAion
Postado Fevereiro 10, 2015 10 anos Autor Arrumeei o script do Fywell, está funcionando perfeitamente @Fywell Reputado @Joadson obrigado por tentar ajudar Reputado segue o script arrumado Citar local free = { ["yalahar"] = {x=1555, y=2576, z=6}, ["edron"] = {x=1555, y=2576, z=6}, ["goroma"] = {x=0, y=0, z=0}, ["smallville"] = {x=0, y=0, z=0}, ["top"] = {x=0, y=0, z=0}, ["lv"] = {x=0, y=0, z=0}, ["go"] = {x=0, y=0, z=0} } local vip = { ["alfon"] = {x=114 ,y=282 ,z=6}, ["everwood"] = {x=0 ,y=0 ,z=0}, ["nunca"] = {x=0 ,y=0 ,z=0} } local cost = 100 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) npcHandler.topic = {} 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 for city, tp in pairs(free) do if msgcontains(msg, city) then npcHandler:say('you are sure?', cid) npcHandler.topic[cid] = 1 elseif msgcontains(msg, 'yes') and npcHandler.topic[cid] == 1 then if doPlayerRemoveMoney(cid, cost) then doTeleportThing(cid, tp) npcHandler:say('Let\'s GO', cid) npcHandler.topic[cid] = 0 else npcHandler:say('Sorry, you don\'t have enough money', cid) npcHandler.topic[cid] = 0 end end end for citys, tps in pairs(vip) do if msgcontains(msg, citys) then npcHandler:say('you are sure?', cid) npcHandler.topic[cid] = 2 elseif msgcontains(msg, 'yes') and npcHandler.topic[cid] == 2 then if(getPlayerVipDays(cid) > 0) then if doPlayerRemoveMoney(cid, cost) then doTeleportThing(cid, tps) npcHandler:say('Let\'s GO', cid) npcHandler.topic[cid] = 0 else npcHandler:say('Sorry, you don\'t have enough money', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('Você não tem VIP!', cid) npcHandler.topic[cid] = 0 end end end if msgcontains(msg, 'no') then npcHandler:say('Bye!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Só fiz mudar isso Citar ["town1"] = {x= ,y= ,z= }, por isso Citar ["town1"] = {x=, y=, z= }, e isso Citar if getPlayerPremiumDays(cid) > 0 then por isso Citar if(getPlayerVipDays(cid) > 0) then Editado Fevereiro 10, 2015 10 anos por subhe (veja o histórico de edições)
Postado Fevereiro 10, 2015 10 anos No script dele é só trocar isso if getPlayerPremiumDays(cid) > 0 then por isso if getPlayerVipDays(cid) > 0 then Te ajudei? Se você achar que eu mereço, me dê uma "rep+" e selecione meu post como "melhor resposta" Skype: JoadsonAion
Postado Fevereiro 10, 2015 10 anos Autor e as virgulas no começo estavam errado, por isso estava ocorrendo o erro mais está funcionando agora os 2 foram Reputados Editado Fevereiro 10, 2015 10 anos por subhe (veja o histórico de edições)
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.