Ir para conteúdo

Summ

Membro
  • Registro em

  • Última visita

Tudo que Summ postou

  1. Hospeda a imagem nesse site : http://www.imgland.net/ ai basta colocar [*img] http://1.ii.gl/wHq1KDEEl.png [*/img] sem os *
  2. Tirar a encryption do site é pedir pra ser invadido por qualquer pessoa que vê um tutorial no youtube(se bem que continua fácil mesmo encriptado, mas sem facilita mais ainda). Sobre retirar o salt requer, algumas alterações na sources.
  3. Summ postou uma resposta no tópico em Suporte Tibia OTServer
    A instalação terminou, só trocar pra 'no' no config.ini e entrar no seu site : https://localhost.com/
  4. Summ postou uma resposta no tópico em Playground (Off-topic)
    /\ muito mimimimimimi, pra quem ta postando conteúdo sem noção no playground EUHEUHEUEH
  5. Summ postou uma resposta no tópico em Suporte Tibia OTServer
    Não é questão de saber mexer e sim de ter conhecimentos medianos em cada área para trocar a versão, porque muda muita coisa de uma versão pra outra.
  6. Summ postou uma resposta no tópico em Playground (Off-topic)
    O'que é pior? ver esse tópico
  7. local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 5808, 2160}, -- Recompensas. moneyReward = {2160, 30, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 301, y = 267, z = 15, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 1061, y = 47, z = 6}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 2, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "walker zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 3, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x=1029, y=28, z=6}, -- top de fromPosition até toPosition = {x=1099, y=112, z=6} -- em baixo toPostion } function onTimer() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUE end function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Good luck in the zombie event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. config.timeBetweenSpawns .. " seconds! Good luck!") pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) else local fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doBroadcastMessage(getCreatureName(cid)..' has survived at zombie event!') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") elseif isMonster(cid) then doRemoveCreature(cid) end end end end end end function pvgaylord() local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0 for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) then p = p+1 elseif isMonster(cid) then m = m+1 end end end end if p ~= getGlobalStorageValue(config.playerCount) then setGlobalStorageValue(config.playerCount, p) end if p < 2 then return true end addEvent(pvgaylord,100,nil) end
  8. Summ postou uma resposta no tópico em Suporte Tibia OTServer
    Trocar a versão de um servidor é muito complicada pra quem não tem conhecimentos medianos em todas áreas que fazem um otserv (script, c++(sources, mapping), então cara, se eu fosse você eu baixaria um servidor já pronto, basta olhar a seções de download de otservs e verá quem tem vários, recomendo o do mitsuig e do bruno que estão na versão 10.76.
  9. Panel HorizontalSeparator height: 7 anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right margin-top: -12 VerticalScrollBar id: scrollBar step: 50 pixels-scroll: true anchors.top: parent.top anchors.right: parent.right anchors.bottom: parent.bottom margin-bottom: 30 margin-top: 60 ScrollablePanel vertical-scrollbar: scrollBar anchors.top: parent.top anchors.left: parent.left anchors.right: scrollBar.left anchors.bottom: parent.bottom margin-right: 3 margin-bottom: 30 margin-top: 60 Button1 id: 1 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/1 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 0 Button1 id: 1 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/1 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 50 Button1 id: 2 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/2 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 100 Button1 id: 2 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/2 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 150 Button1 id: 3 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/3 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 200 Button1 id: 3 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/3 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 250 Button1 id: 4 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/4 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 300 Button1 id: 4 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/4 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 350 Button1 id: 5 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/5 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 400 Button1 id: 5 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/5 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 450 Button1 id: 6 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/6 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 500 Button1 id: 6 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/6 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 550 Button1 id: 7 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/7 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 600 Button1 id: 7 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/7 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 650 Button1 id: 8 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/8 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 700 Button1 id: 8 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/8 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 750 Button1 id: 9 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan1/9 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 800 Button1 id: 9 !tooltip: tr('Arco-Íris') image-source: /images/shop/clan5/9 width: 415 height: 48 anchors.top: parent.top anchors.left: parent.left margin-top: 850
  10. Cara a única coisa que eu entendi é que a pick, está bugada de resto não entendi mais nada, detalhe o que está acontecendo... ou até mesmo use o script da pick de outro servidor.
  11. Não testei: local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say('you have already received the promotion', cid) return true end if msgcontains(msg:lower(), 'promotion') then npcHandler:say('you are sure?', cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower(), 'yes') and npcHandler.topic[cid] == 1 then if player:getPromotion() == 1 then if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say('you just received a new promotion', cid) player:setVocation(player:getVocation() + 4) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 else npcHandler:say('you no have money', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('You do not have any vip days.', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('you no have first promotion', cid) npcHandler.topic[cid] = 0 end elseif msgcontains(msg:lower(), 'no') and npcHandler.topic[cid] == 1 then npcHandler:say('Bye!!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  12. Pode retirar sim, essa função é pra printar "Alô mundo" no console/distro...
  13. Viu cara ? eu ajudei não ? se eu não tivesse postado vocês ainda estariam com a dúvida e como conheço bem essa área, alguns não daria nem ao trabalho de entrar no seu tópico ou no máximo saberia isso e nem daria ao trabalho de postar... mas tu sabe porque ? tem que pessoas nó fórum que fazem pedidos ou querem reposta pra algumas dúvidas, que se tu fala abre o config.lua e faz isso você tem que explicar pro cara desde da parte que liga o pc até a parte que abre o arquivo... e como tu percebeu eu não faço isso, eu ajudo pessoas que no mínimo tenha força de vontade para aprender e não só querer tudo na mão ... Foi difícil arrumar ? não Parabéns por ter conseguido, como eu falei era só dar ctrl + c e ctrl + v e jogar no google, e isso não é explicar pela metade e sim não querer dar tudo de mão beijada pros outros. E como eu disse se algum momento tu achar que eu te ofendi ou fui ignorante basta me reportar. abrçs
  14. /\ Ta aqui ... eu falei aquilo pra alguns não vir mandar pm pra mim falando que não sabe editar quando mesmo nem tentou, eu garanto que uma pessoa que saiba pelo menos ler consegue fazer isso lendo alguns tutoriais no google, pelo que tu disse, eu não duvido nada de que tu seria uns dos que me enviaram pm, ou até mesmo enviariam a sources aqui no tópico para alguém editar, não estou dizendo que é errado fazer isso más, quando é algo trabalhoso dificilmente alguém irá fazer uma alteração para você. Eu postei a solução, ai por apenas deixar um "ps", tu acha que isso é má vontade de não ajudar, vindo de um cara que só posta dúvidas e pedidos, não significa nada pra mim, sinceramente ... Se achou que eu faltei com respeito ou fui ignorante a qualquer momento, basta clicar no botão abaixo em relatar para a equipe, e me reportar. abrçs Ps: E garanto que pessoas que tiverem as mesma eventuais dúvidas sobre esse assunto, quando chegar no meu post, e apenas dar um ctrl + c e ctrl +v e jogar google, vai conseguir arrumar sem maiores problemas, então no fim, eu fiz o que queria que foi ajudar alguém que busca evoluir e aprender...
  15. Pra adicionar, nas sources basta inserir a biblioteca : #include <locale.h> e dps usar: setlocale(LC_ALL, "Portuguese"); que vai aceitar os caracteres com acentos... Ps: Não vou ensinar editar, jogue no google e aprende por conta própria.
  16. Summ postou uma resposta no tópico em Playground (Off-topic)
    se muito zoero em fi
  17. Já verificou se seu shop.lua tem algum problema ?
  18. Summ postou uma resposta no tópico em Suporte Tibia OTServer
    local raids = { ["Sunday"] = { ["15:00"] = { name= "Gaz'Haragoth", -- Nome do monstro a ser sumonado pos = {toPos= {x= 649, y= 1021, z= 7}, fromPos= {x= 654, y=1027, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 1, -- Quantidade a ser sumonada time = 15, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, ["Monday"] = { ["20:00"] = { name= "Zavarash", -- Nome do monstro a ser sumonado pos = {toPos= {x= 243, y= 293, z= 7}, fromPos= {x= 250, y=293, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 1, -- Quantidade a ser sumonada time = 15, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, ["Tuesday"] = { ["20:00"] = { name= "Omrafir", -- Nome do monstro a ser sumonado pos = {toPos= {x= 243, y= 293, z= 7}, fromPos= {x= 250, y=293, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 1, -- Quantidade a ser sumonada time = 2, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, ["Wednesday"] = { ["20:00"] = { name= "Horadron", -- Nome do monstro a ser sumonado pos = {toPos= {x= 243, y= 293, z= 7}, fromPos= {x= 250, y=293, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 1, -- Quantidade a ser sumonada time = 15, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, ["Thursday"] = { ["20:00"] = { name= "Prince Drazzak", -- Nome do monstro a ser sumonado pos = {toPos= {x= 243, y= 293, z= 7}, fromPos= {x= 250, y=293, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 1, -- Quantidade a ser sumonada time = 15, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, ["Friday"] = { ["14:36"] = { name= "Terofar", -- Nome do monstro a ser sumonado pos = {toPos= {x= 243, y= 293, z= 7}, fromPos= {x= 250, y=293, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 1, -- Quantidade a ser sumonada time = 15, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, ["Saturday "] = { ["15:00"] = { name= "Mawhawk", -- Nome do monstro a ser sumonado pos = {toPos= {x= 243, y= 293, z= 7}, fromPos= {x= 250, y=293, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 1, -- Quantidade a ser sumonada time = 15, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, } function doRemoveMonster(toPos, fromPos) for x = toPos.x, fromPos.x do for y = toPos.y , fromPos.y do local creature = getTopCreature({x=x, y= y, z= fromPos.z}).uid; if creature ~= 0 and isMonster(creature) then doRemoveCreature(creature) end end end return true end function onThink(interval, lastExecution) local hours = tostring(os.date("%X")):sub(1, 5) local days = raids[os.date("%A")][hours] local raids_storage = 99997 if days then if getGlobalStorageValue(raids_storage) <= os.time() then doBroadcastMessage("The invasion of " .. days.name .. " started.") pos = {x= math.random(days.pos.toPos.x, days.pos.fromPos.x), y= math.random(days.pos.toPos.y, days.pos.fromPos.y), z= days.pos.fromPos.z} monster = 0; repeat doSummonCreature(days.name, pos) monster = monster + 1 until monster == days.quantidade addEvent(function() doRemoveMonster(days.pos.toPos, days.pos.fromPos) end, days.time*1000*60) setGlobalStorageValue(raids_storage, os.time()+60) end end return true end
  19. Eu já retirei esse end ... quando eu enviei, vi ele dps editei, quando eu postar olhe se eu não editei o tópico novamente pra corrigir/mudar algo. Tenta dnv com o code acima.
  20. Olhe agora pra ver que numero aparece no console ao falar yes... sim distro é console... local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say('you have already received the promotion', cid) return true end if msgcontains(msg:lower(), 'promotion') then npcHandler:say('you are sure?', cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower(), 'yes') and npcHandler.topic[cid] == 1 then print(player:getVocation()) if player:getVocation() == 5 or player:getVocation() == 6 or player:getVocation() == 7 or player:getVocation() == 8 then if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say('you just received a new promotion', cid) player:setVocation(player:getVocation() + 4) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 else npcHandler:say('you no have money', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('You do not have any vip days.', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('you no have first promotion', cid) npcHandler.topic[cid] = 0 end elseif msgcontains(msg:lower(), 'no') and npcHandler.topic[cid] == 1 then npcHandler:say('Bye!!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  21. local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say('you have already received the promotion', cid) return true end if msgcontains(msg:lower(), 'promotion') then npcHandler:say('you are sure?', cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower(), 'yes') and npcHandler.topic[cid] == 1 then print(player:getVocation) for x = 5, 8 do if player:getVocation() == x then if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say('you just received a new promotion', cid) player:setVocation(player:getVocation() + 4) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 break else npcHandler:say('you no have money', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('You do not have any vip days.', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('you no have first promotion', cid) npcHandler.topic[cid] = 0 end end elseif msgcontains(msg:lower(), 'no') and npcHandler.topic[cid] == 1 then NpcHandler:say('Bye!!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) eu coloquei pra printar algo no console da uma olhada pra mim que numero aparece...
  22. Tente : local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say('you have already received the promotion', cid) return true end if msgcontains(msg:lower(), 'promotion') then npcHandler:say('you are sure?', cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower(), 'yes') and npcHandler.topic[cid] == 1 then for x = 5, 8 do if player:getVocation() == x then break if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say('you just received a new promotion', cid) player:setVocation(player:getVocation() + 4) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 else npcHandler:say('you no have money', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('You do not have any vip days.', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('you no have first promotion', cid) npcHandler.topic[cid] = 0 end end elseif msgcontains(msg:lower(), 'no') and npcHandler.topic[cid] == 1 then NpcHandler:say('Bye!!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) #editado
  23. local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say('you have already received the promotion', cid) return true end if msgcontains(msg:lower(), 'promotion') then npcHandler:say('you are sure?', cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower(), 'yes') and npcHandler.topic[cid] == 1 then if isInArray({5, 6, 7, 8}, player:getVocation()) then if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say('you just received a new promotion', cid) player:setVocation(player:getVocation() + 4) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 else npcHandler:say('you no have money', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('You do not have any vip days.', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('you no have first promotion', cid) npcHandler.topic[cid] = 0 end elseif msgcontains(msg:lower(), 'no') and npcHandler.topic[cid] == 1 then NpcHandler:say('Bye!!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  24. editei dnv KAOSKAPOSK, isso que dá fazer script na madrugada...

Informação Importante

Confirmação de Termo