Tudo que Vitorelias postou
-
script npc fazer uma modificação (vodkart)
Bom dia man! deu erro no console Lua Script Error: [Npc interface] data/npc/scripts/claudiao.lua:onCreatureSay data/npc/scripts/claudiao.lua:58: attempt to call method 'withdrawMoneyFromBank' (a nil value) stack traceback: [C]: in function 'withdrawMoneyFromBank' data/npc/scripts/claudiao.lua:58: in function 'callback' data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay' data/npc/scripts/capitao batata.lua:15: in function <data/npc/scripts/claudiao.lua:14> meu modules.lua function Player.removeMoneyNpc(self, amount) local moneyCount = self:getMoney() local bankCount = self:getBankBalance() if amount > moneyCount + bankCount then return false end self:removeMoney(math.min(amount, moneyCount)) if amount > moneyCount then local newBalance = bankCount - math.max(amount - moneyCount, 0) self:setBankBalance(newBalance) if moneyCount == 0 then self:sendTextMessage(MESSAGE_INFO_DESCR, ("Você pagou %d gps da sua conta bancária. Seu saldo foi de %d para %d gps."):format(amount, bankCount, newBalance)) else self:sendTextMessage(MESSAGE_INFO_DESCR, ("You paid %d from inventory and %d gold from bank account. Your account balance went from %d to %d gps."):format(moneyCount, amount - moneyCount, bankCount, newBalance)) end end return true end eu tenho esse outro npc aqui e funciona normalmente das duas maneiras, quiser usar como base
-
script npc fazer uma modificação (vodkart)
.Qual servidor ou website você utiliza como base? tfs 1.2 10.98 Qual o motivo deste tópico? bom dia rapaze! eu tenho esse script feito pelo vodkart, funciona perfeitamente! só queria fazer uma modificação eu mudei versão do meu otserv! e ai no caso ele não esta removendo o dinheiro do banco, exemplo se o player tem dinheiro na bag, ele viaja normalmente mais se ele não tiver dinheiro na bag e tiver dinheiro no banco ele não viaja ai queria fazer essa modificação. Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: 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) function lowerTable(tabela) -- by vodkart local tab = {} for var, ret in next, tabela do tab[var:lower()] = ret end return tab end if not npcHandler:isFocused(cid) then return false end local talkUser,msg = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid, msg:lower() local viagens = { ['Dark City'] = {premium = false, level = 0, cost = 200, destination = {x=766, y=1090, z=6}}, } local magician_pos = {x=1249, y=783, z=6} local travel = lowerTable(viagens) if travel[msg] then local var = travel[msg] if var.level > 0 and getPlayerLevel(cid) < var.level then npcHandler:say("Sorry but you must be level ".. var.level .." to travel to this place.", cid) return true elseif var.premium and not isPremium(cid) then npcHandler:say("Sorry, to go to "..msg.." it is necessary to be VIP.", cid) return true elseif not doPlayerRemoveMoney(cid, var.cost) then npcHandler:say("Sorry, you don't have enough GPS. Is required ".. var.cost .."gps to go to "..msg..".", cid) return true end if var.chance ~= nil and var.chance > 0 then if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 10219 then mychance = 100 else mychance = var.chance end end npcHandler:say("Bon voyage!", cid) npcHandler:releaseFocus(cid) if var.chance ~= nil and var.chance > 0 then if mychance > math.random(1, 100) then doTeleportThing(cid, garath_pos) npcHandler:say("The boat lost its way and stopped in Magician, Careful!", cid) else doTeleportThing(cid, var.destination) end else doTeleportThing(cid, var.destination) end doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) else selfSay("I don't sail to this city...", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
-
NPC que registra um serial no item
Bom dia não deu certo o item continua sem o registro 09:58 You see a rainbow shield (Def:30). It can only be wielded properly by knights of level 100 or higher. eu uso tfs 1.4 será que precisa de algum script de look ?
-
NPC que registra um serial no item
06:30 Sempre [13]: yes 06:30 Claudio: Qual item você está interessado em colocar o serial? Lembrando que isso não garante que o item pertence a você para sempre, se você perder o item a responsabilidade será sua e não da Equipe. 06:31 Sempre [13]: demon legs 06:31 Claudio: Aqui está o seu item. Deseja registrar outro? 06:31 Sempre [13]: nao 06:31 Claudio: Pena que você não quer. Volte aqui quando estiver interessado. 06:31 Sempre [13]: bye 06:31 Sempre [13]: hi 06:31 Claudio: Até mais, Sempre! 06:31 Claudio: Olá Sempre. Eu vendo aneis mágicos e frascos. Fale oferta caso estiver interessado. 06:31 Sempre [13]: trade 06:31 Claudio: Aqui esta minha oferta, Sempre 06:31 Sempre [13]: serial 06:31 Claudio: Eu coloco um identificador em seu item. Cobro pelo serviço um valor de 1 crystal coin. Deseja colocar em algum item? 06:31 Sempre [13]: yes 06:31 Claudio: Qual item você está interessado em colocar o serial? Lembrando que isso não garante que o item pertence a você para sempre, se você perder o item a responsabilidade será sua e não da Equipe. 06:31 Sempre [13]: demon helmet 06:31 Claudio: Aqui está o seu item. Deseja registrar outro? Bom dia!, fiz o teste de novo com esse mudança do script e mesmo assim não aparece no item... eu fiz outra demon legs, ou demon helmet ou até mesmo os item que estão equipado não apareceu obs: não da erro no console ta bom ótimo dia
-
NPC que registra um serial no item
Boa noite Amigao! acabei de testar aqui bom vamos lá ele remove a crystal coin do intem porem no item ele não aparece a descrição 23:32 Claudio: Olá Sempre. Eu vendo aneis mágicos e frascos. Fale oferta caso estiver interessado. 23:32 Sempre [13]: serial 23:32 Claudio: Eu coloco um identificador em seu item. Cobro pelo serviço um valor de 1 crystal coin. Deseja colocar em algum item? 23:32 Sempre [13]: yes 23:32 Claudio: Qual item você está interessado em colocar o serial? Lembrando que isso não garante que o item pertence a você para sempre, se você perder o item a responsabilidade será sua e não da Equipe. 23:32 Sempre [13]: demon helmet 23:32 Claudio: Aqui está o seu item. Deseja registrar outro? 23:38 You see a demon helmet (Arm:10). Imbuements: (Empty Slot, Empty Slot). It weighs 29.50 oz. You hear an evil whispering from inside. 23:39 You see demon legs (Arm:9). It weighs 70.00 oz.
-
NPC que registra um serial no item
.Qual servidor ou website você utiliza como base? TFS 1.4 Qual o motivo deste tópico? Bom estou tentando fazer um npc que coloca um serial no item usando essa função Este item foi registrado pelo jogador ".. player:getName() ..". no dia " .. os.date("%d/%m/%Y - %X") .." Serial: ".. player:getGuid() ..".") precisava de uma força to perdido comecei a tentar a fazer mais é dificil demais, queria que alguem pudesse me ajuda ai conseguiria fazer outros npc obrigado coloquei as falas do npc pra auxiliar Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local itemId = 2160 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 onCreatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "serial") then selfSay("Eu coloco um identificador em seu item. Cobro pelo serviço um valor de 1 crystal coin. Deseja colocar em algum item?", cid) talkState[cid] = 0 elseif msgcontains(msg, 'yes') then selfSay("Qual item você está interessado em colocar o serial? Lembrando que isso não garante que o item pertence a você para sempre, se você perder o item a responsabilidade será sua e não da Equipe.", cid) talkState[cid] = 1 selfSay("O item com o nome super botas não exite. Diga-me outro item que você tenha.", cid) end else selfSay("Você não tem a quantidade necessária para registrar este item.", cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, onCreatureSayCallback) npcHandler:addModule(FocusModule:new()) serial \/ Eu coloco um identificador em seu item. Cobro pelo serviço um valor de 1 crystal coin. Deseja colocar em algum item? yes ou sim Qual item você está interessado em colocar o serial? Lembrando que isso não garante que o item pertence a você para sempre, se você perder o item a responsabilidade será sua e não da Equipe. \/ 'O item com o nome botas super não exite. Diga-me outro item que você tenha.' caso você fale o nome do equipamento certo exemplo; demon helmet e se o player tiver crystal coin 'Aqui está o seu item. Deseja registrar outro?' agora se ele não tiver a crystal coin ele retona a msg 'Você não tem a quantidade necessária para registrar esse item' agora se ele não tiver o item o npc retorna 'Você não possui este item' caso ele tiver a crystal coin e o item ele retorna a msg 'Aqui está o seu item. Deseja registrar outro?' caso ele fale não Pena que você não quer. Volte aqui quando estiver interessado. quando ele registrar o item o look do item tem que aparecer assim 'Este item foi registrado pelo jogador ".. player:getName() ..". no dia " .. os.date("%d/%m/%Y - %X") .." Serial: ".. player:getGuid() ..".")' não sei se esta certo essa função. Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
-
talkaction !comprar skill tfs 1.4
Bom dia Undewar, desculpa pela demora to coma esposa no hospital, bom fiz o teste ele retornou esse erro no distro. ele remove o item id 9971 e logo em seguida retorna essa msg no distro
-
talkaction !comprar skill tfs 1.4
Vou esperar precisava desse script no meu Servidor, mais obrigado pela atenção Undewar braços
-
talkaction !comprar skill tfs 1.4
então mais o Otserv em si ele já como padrão definido um limite não sei se é na src aonde que é, que o limite é travado ex; 156 para magic level e para skills 202 ou 208, se você olhar os valores de limite no script esta 350... vou dar um exemplo quando você ta jogando um otserv 9999999 chega um limite de level 717172 você não consegue mais passar esse level por que no level maximo, eu tenho esse script aqui é da versão 8.6 que a função é diferente veja if(param == "skillsword") then if getPlayerSkillLevel(cid, SKILL_SWORD) >= 350 then doPlayerSendTextMessage(cid, 6, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, 6, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 1) doRemoveCreature(cid) db.query("UPDATE `player_skills` SET `value` = " .. (sword + 1) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, 6, "Você não possui a quantidade necessária para comprar.") return TRUE end a função é por db não sei é assim que fala e funciona perfeitamente db.query("UPDATE `player_skills` SET `value` = " .. (sword + 1) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";") agora se você olha esse script em si ele usa player:addSkillTries(skillId, nextTries - curTries + curTries / nextTries * voc:getRequiredSkillTries(skillId, curSkill + 2)) é como se você tivesse pegado o skill na raça treinando
-
talkaction !comprar skill tfs 1.4
.Qual servidor ou website você utiliza como base? TFS 1.4 Qual o motivo deste tópico? O script funciona porem precisaria fazer alguns ajustes e correção o Script foi feito pelo Vodkart, precisaria ajustar algumas coisas. Bom o script você consegue utilizar o comando adiciona skill para o Player, porem o limite de compra é 350. só que usando o comando só vai até 208 ou é 202 para skill fist, club, distance, axe, e sword. já o magic level, o maximo que vai é 156 mais pelo comando teria que chegar até 200. o script talvez teria que colocar por db não sei ao certo mais o script funciona porem tem esses problema db.query("UPDATE " .. db_table .. " SET " .. db_set_column .. " = " .. (db_skill_value + db_skill_value_sum) .. " WHERE id = " .. player:getGuid() .. ";") Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: SKILL_CLUB = "skill_club" SKILL_DISTANCE = "skill_dist" SKILL_SHIELD = "skill_shielding" SKILL_MAGLEVEL = "maglevel" SKILL_SWORD = "skill_sword" SKILL_AXE = "skill_axe" local buyComprar = TalkAction("!comprar") local storage = 45611 local coinID = 9971 -- moeda para comprar skills local skills = { ["magiclevel"] = {vocations = {1, 5, 2, 6, 11, 12}, voc_msg= "Somente Sorcerers, Druids e Infernalists podem comprar magic level.", lim = 200, lim_msg = "Você não pode ter magic level acima de 200.", price= 3, incre = 1, skill = 7}, ["skillclub"] = {vocations = {9, 10}, voc_msg= "Somente Drunous podem comprar skill de club.", lim = 350, lim_msg = "Você não pode ter skill club acima de 350.", price= 1, incre = 1, skill = 1}, ["skillsword"] = {vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de sword.", lim = 350, lim_msg = "Você não pode ter skill sword acima de 350.", price= 1, incre = 1, skill = 2}, ["skillaxe"] = {vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de axe.", lim = 350,lim_msg = "Você não pode ter skill axe acima de 350.", price= 1, incre = 1, skill = 3}, ["skilldistance"] = {vocations = {3, 7}, voc_msg= "Somente Paladins podem comprar skill de distance.", lim = 350,lim_msg = "Você não pode ter skill distance acima de 350.", price= 1, incre = 1, skill = 4}, ["skillshielding"] = {vocations = {3, 7, 4, 8, 9, 10}, voc_msg= "Somente Paladins, Knights e Drunous podem comprar skill de shield.", lim = 350, lim_msg = "Você não pode ter skill shielding acima de 350.", price= 1, incre = 1, skill = 5}, ["magiclevel5"] = {vocations = {1, 5, 2, 6, 11, 12}, voc_msg= "Somente Sorcerers, Druids e Infernalists podem comprar magic level.", lim = 200, lim_msg = "Você não pode pode ter magic level acima de 200.", price= 15, incre = 5, skill = 7}, ["skillclub10"] = {vocations = {9, 10}, voc_msg= "Somente Drunous podem comprar skill de club.", lim = 350, lim_msg = "Você não pode ter skill club acima de 350.", price= 10, incre = 10, skill = 1}, ["skillsword10"] = {vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de sword.", lim = 350, lim_msg = "Você não pode ter skill sword acima de 350.", price= 10, incre = 10, skill = 2}, ["skillaxe10"] = {vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de axe.", lim = 350,lim_msg = "Você não pode ter skill axe acima de 350.", price= 10, incre = 10, skill = 3}, ["skilldistance10"] = {vocations = {3, 7}, voc_msg= "Somente Paladins podem comprar skill de distance.", lim = 350,lim_msg = "Você não pode ter skill distance acima de 350.", price= 10, incre = 10, skill = 4}, ["skillshielding10"] = {vocations = {3, 7, 4, 8, 9, 10}, voc_msg= "Somente Paladins, Knights e Drunous podem comprar skill de shield.", lim = 350, lim_msg = "Você não pode ter skill shielding acima de 350.", price= 10, incre = 10, skill = 5}, } function buyComprar.onSay(player, words, param) local player = Player(player) local pid = player:getGuid() local tile = player:getTile() local param = param:lower() if not tile:hasFlag(TILESTATE_PROTECTIONZONE) then player:sendCancelMessage("Você precisa estar em área protegida para utilizar este comando.") return true end if player:getStorageValue(storage) >= os.time() then player:sendCancelMessage("Por medidas de segurança você só pode utilizar este comando em " .. player:getStorageValue(storage)-os.time() .. " segundos.") return true end if param == "" then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nmontaria shadow draptor = montaria shadow draptor por 30 barras.\nmontaria golden lion = montaria golden lion por 30 barras.\nmontaria winter king = montaria winter king por 30 barras.\nmontaria flying divan = montaria flying divan por 30 barras.\nmontaria woodland prince = montaria woodland prince por 30 barras.\nmontaria black stag = montaria black stag por 30 barras.\nmontaria nether steed = montaria nether steed por 30 barras.\nmontaria snow pelt = montaria snow pelt por 30 barras.\nmontaria slagsnare = montaria slagsnare por 30 barras.\nmontaria sea devil = montaria sea devil por 55 barras.\nmontaria highland yak = montaria highland yak por 75 barras.\nmontaria copper fly = montaria copper fly por 60 barras.\nmontaria bloodcurl = montaria bloodcurl por 70 barras.\nmontaria poisonbane = montaria poisonbane por 65 barras.\nmontaria razorcreep = montaria razorcreep por 75 barras.\nmontaria noctungra = montaria noctungra por 70 barras.\nmontaria leafscuttler = montaria leafscuttler por 75 barras.\nmontaria jade pincer = montaria jade pincer por 60 barras.\nmontaria frostflare = montaria frostflare por 85 barras.\nroupa conjurer = roupa conjurer todos addons por 30 barras\nroupa ceremonial garb = roupa ceremonial garb todos addons por 30 barras.\nroupa puppeteer = roupa puppeteer todos addons por 30 barras.\nroupa death herald = roupa death herald todos addons por 30 barras.\nroupa winter warden = roupa winter warden todos addons por 30 barras.\nremoverfrag = remove todos frags por 100k.\nO Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponível.") return true end if skills[param] then local v = skills[param] if param == "magiclevel" and player:getBaseMagicLevel() >= v.lim or (player:getBaseMagicLevel() + v.incre ) >= v.lim then player:sendCancelMessage(v.lim_msg) return true elseif player:getSkillLevel(v.skill) + v.incre >= v.lim then player:sendCancelMessage(v.lim_msg) return true end if not isInArray(v.vocations, player:getVocation():getId()) then player:sendCancelMessage(v.voc_msg) return true end if player:getItemCount(coinID) >= v.price then player:removeItem(coinID, v.price) player:setStorageValue(storage, os.time()+1) local skillId = v.skill local amount = v.incre for i = 1, amount do local curSkill = player:getSkillLevel(skillId) local curTries = player:getSkillTries(skillId) local voc = player:getVocation() local nextTries = voc:getRequiredSkillTries(skillId, curSkill + 1) player:addSkillTries(skillId, nextTries - curTries + curTries / nextTries * voc:getRequiredSkillTries(skillId, curSkill + 2)) end else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Você não possui a quantidade necessária para comprar.") end return true end return true end buyComprar:separator(" ") buyComprar:register() Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
-
erro no console cast
.Qual servidor ou website você utiliza como base? The Forgotten Server, version 0.4_SVN Qual o motivo deste tópico? bom acabei de compliar essa src porem ta dando esse erro no distro bem provavel que esteja faltando alguma tabela de cast eu não sei qual é tabela se alguém puder me ajuda por favor. Está surgindo algum erro? Se sim coloque-o aqui.
-
(Resolvido)Adcionar tempo na alavanca
- Tempo na alavanca
1- Balões em NPCs
Ah sim agora entendi, obrigado cara vou tentar procurar saber quais são se eu souber vou postar aqui possa ser que mais pessoas esteja procurando por isso obrigado mesmo.- Balões em NPCs
cara deu certo mais no caso fico uma skull no NPC e no caso não é isso o que eu quero eu quero que apareça esse icon.- Balões em NPCs
como assim poderia me da essa força ai? <?xml version="1.0" encoding="UTF-8"?> <npc name="Addoner" script="Addon.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look type="540"/> <parameters> <parameter key="module_shop" value="1" /> </parameters> </npc>- Balões em NPCs
.Qual servidor ou website você utiliza como base? OTX Versão 12.00 Qual o motivo deste tópico? Boa noite não sei se estou na área correta mais gostaria de saber como que faz pra colocar essa balão nos NPC se for possível alguém me da uma força ai agradeço.- Skill Limite
Obrigado em man sem palavras deu certo!- Skill Limite
.Qual servidor ou website você utiliza como base? OTX 3.1 Qual o motivo deste tópico? Tenho um sistema de compra de skills porem não esta limitando o comando e o player consegue comprar skills acima do permitido. obs quando usa o comando !comprar magiclevel funciona perfeito e limita os skills agora quando usa !comprar skillaxe, sword , club etc não esta limitando. Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: SKILL_CLUB = "skill_club" SKILL_DISTANCE = "skill_dist" SKILL_SHIELD = "skill_shielding" SKILL_MAGLEVEL = "maglevel" SKILL_SWORD = "skill_sword" SKILL_AXE = "skill_axe" local coinID = 9971 -- moeda para comprar skills local tb = { ["sd"] = {t= 1, bag = 5926, item= 2268, bag_quant = 2, price= 50, msg= "Parabéns você comprou 4k de SD com sucesso."}, ["uh"] = {t= 1, bag = 2002, item= 2273, bag_quant = 3, price= 30, msg= "Parabéns você comprou 6k de UH com sucesso."}, ["explo"] = {t= 1, bag = 2001, item= 2313, bag_quant = 3, price= 10, msg= "Parabéns você comprou 6k de Explosion com sucesso."}, ["super divine axe"] = {t= 2, item = 8926, price= 60, msg= "Você comprou um super divine axe com sucesso."}, ["super divine staff"] = {t= 2, item = 8922, price= 60, msg= "Você comprou um super divine staff com sucesso."}, ["super divine club"] = {t= 2, item = 7423, price= 60, msg= "Você comprou um super divine club com sucesso."}, ["super divine sword"] = {t= 2, item = 7403, price= 60, msg= "Você comprou um super divine sword com sucesso."}, ["super divine crossbow"] = {t= 2, item = 8851, price= 60, msg= "Você comprou um super divine crossbow com sucesso."}, ["livro nivel 6"] = {t= 2, item = 8921, price= 60, msg= "Você comprou um livro nivel 6 com sucesso."}, ["vip10"] = {t= 3, days= 10, price= 5}, ["vip30"] = {t= 3, days= 30, price= 10}, ["magiclevel"] = {t= 4, vocations = {1, 5, 2, 6, 11, 12}, voc_msg= "Somente Sorcerers, Druids e Infernalists podem comprar magic level.", lim = 200, lim_msg = "Você não pode ter magic level acima de 200.", price= 3, incre = 1, skill = SKILL_MAGLEVEL}, ["skillclub"] = {t= 5, vocations = {9, 10}, voc_msg= "Somente Drunous podem comprar skill de club.", lim = 350, price= 1, incre = 1, skill = SKILL_CLUB}, ["skillsword"] = {t= 5, vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de sword.", lim = 350, price= 1, incre = 1, skill = SKILL_SWORD}, ["skillaxe"] = {t=5 , vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de axe.", lim = 350, price= 1, incre = 1, skill = SKILL_AXE}, ["skilldistance"] = {t= 5, vocations = {3, 7}, voc_msg= "Somente Paladins podem comprar skill de distance.", lim = 350, price= 1, incre = 1, skill = SKILL_DISTANCE}, ["skillshielding"] = {t= 5, vocations = {3, 7, 4, 8, 9, 10}, voc_msg= "Somente Paladins, Knights e Drunous podem comprar skill de shield.", lim = 350, lim_msg = "Você não pode ter skill shielding acima de 350.", price= 1, incre = 1, skill = SKILL_SHIELD}, ["magiclevel5"] = {t= 4, vocations = {1, 5, 2, 6, 11, 12}, voc_msg= "Somente Sorcerers, Druids e Infernalists podem comprar magic level.", lim = 200, lim_msg = "Você não pode ter magic level acima de 200.", price= 15, incre = 5, skill = SKILL_MAGLEVEL}, ["skillclub10"] = {t= 5, vocations = {9, 10}, voc_msg= "Somente Drunous podem comprar skill de club.", lim = 350, price= 10, incre = 10, skill = SKILL_CLUB}, ["skillsword10"] = {t= 5, vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de sword.", lim = 350, price= 10, incre = 10, skill = SKILL_SWORD}, ["skillaxe10"] = {t=5 , vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de axe.", lim = 350, price= 10, incre = 10, skill = SKILL_AXE}, ["skilldistance10"] = {t= 5, vocations = {3, 7}, voc_msg= "Somente Paladins podem comprar skill de distance.", lim = 350, price= 10, incre = 10, skill = SKILL_DISTANCE}, ["skillshielding10"] = {t= 5, vocations = {3, 7, 4, 8, 9, 10}, voc_msg= "Somente Paladins, Knights e Drunous podem comprar skill de shield.", lim = 341, lim_msg = "Você não pode ter skill shielding acima de 350.", price= 10, incre = 10, skill = SKILL_SHIELD}, ["removerfrag"] = {t= 6, price= 10}, } local storage = 45611 function onSay(player, words, param) local player = Player(player) local pid = player:getGuid() local tile = player:getTile() local param = param:lower() if not tile:hasFlag(TILESTATE_PROTECTIONZONE) then player:sendCancelMessage("Você precisa está em área protegida para utilizar este comando.") return true end if player:getStorageValue(storage) >= os.time() then player:sendCancelMessage("Por medidas de segurança você só pode utilizar este comando em " .. player:getStorageValue(storage)-os.time() .. " segundos.") return true end if param == "" then player:popupFYI("Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove todos frags por 100k.\nO Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.") return true end for f, v in pairs(tb) do if param == f then if v.t == 1 then if player:getItemCount(coinID) >= v.price then local item_quant = (v.bag_quant * 2000)/100 for x = 1, v.bag_quant do local bag = player:addItem(v.bag, 1) for i = 1, item_quant do bag:addItem(v.item, 100) end end player:removeItem(coinID, v.price) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, v.msg) player:setStorageValue(storage, os.time()+1) break else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end elseif v.t == 2 then if player:getItemCount(coinID) >= v.price then item = player:addItem(v.item, 1) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. player:getName() ..". Serial: ".. player:getGuid() ..".") player:removeItem(coinID, v.price) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, v.msg) player:setStorageValue(storage, os.time()+1) break else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end elseif v.t == 3 then if player:getItemCount(coinID) >= v.price then player:addPremiumDays(v.days) player:removeItem(coinID, v.price) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou " .. v.days .. " dias de vip com sucesso.") player:setStorageValue(storage, os.time()+1) break else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end elseif v.t == 4 then if player:getBaseMagicLevel() >= v.lim then player:sendCancelMessage(v.lim_msg) return true end if not isInArray(v.vocations, player:getVocation():getId()) then player:sendCancelMessage(v.voc_msg) return true end if player:getItemCount(coinID) >= v.price then player:removeItem(coinID, v.price) player:setStorageValue(storage, os.time()+1) player:remove() db.query("UPDATE `players` SET `".. v.skill .. "` = `" .. v.skill .. "` + " .. v.incre .. " WHERE `id` = ".. pid) else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end elseif v.t == 5 then if not isInArray(v.vocations, player:getVocation():getId()) then player:sendCancelMessage(v.voc_msg) return false end if player:getSkillLevel(v.skill) >= v.lim then player:sendCancelMessage("Você não pode comprar esse skill.") return false end if player:getItemCount(coinID) >= v.price then player:removeItem(coinID, v.price) player:setStorageValue(storage, os.time()+1) player:remove() db.query("UPDATE `players` SET `".. v.skill .. "` = `" .. v.skill .. "` + " .. v.incre .. " WHERE `id` = ".. pid) return true else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") return false end elseif v.t == 6 then if player:getItemCount(2160) >= v.price then player:removeItem(2160, v.price) player:setSkull(SKULL_NONE) player:setSkullTime(0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull and frags has been removed!") player:setStorageValue(storage, os.time()+1) db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName())) else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end end end end return false end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. .- vida e mana 65535
.Qual servidor ou website você utiliza como base? The OTX Server Global - Version: (3.10) Qual o motivo deste tópico? No meu servidor a vida e mana esta travada no 65535 não passa disso mesmo que o player pegue mais level. Coloquei um comando de ver a vida e fiz alguns teste e mana e vida fica assim 107005 se alguém puder me da essa força tenho as sources do servidor. Está surgindo algum erro? Se sim coloque-o aqui. protocolgame.cpp não consegui colocar por que é muito grande vou hospedar no mediafire se precisar de mais alguma informação eu adiciono. Você tem o código disponível? Se tiver publique-o aqui: https://www.mediafire.com/file/qekq15qtxyphyey/protocolgame.cpp/file Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.- COMPRAR OTX 3.10
- COMPRAR OTX 3.10
.Qual servidor ou website você utiliza como base? OTX Version 3.10 Qual o motivo deste tópico? Tenho um comando TFS 0.4 gostaria de passar ele para OTX eu consegui fazer alguns ajuste quando o Player usa o comando !comprar funciona porem quando o player usa !comprar skillclub ou qualquer comando não acontece nada. Está surgindo algum erro? Se sim coloque-o aqui. comprar.lua Você tem o código disponível? Se tiver publique-o aqui: function onSay(cid, words, param, channel) if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.") return TRUE end if(param ~= "") and (param ~= "skillclub") and (param ~= "skillsword") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel5") and (param ~= "skillclub10") and (param ~= "skillsword10") and (param ~= "skillaxe10") and (param ~= "skilldistance10") and (param ~= "skillshielding10") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.") return TRUE end if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\n.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.") return TRUE end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "magiclevel") then if getPlayerMagLevel(cid) >= 200 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.") return TRUE end if(not isSorcerer(cid) and not isDruid(cid) and not isInfernalist(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 3 then local pid = getPlayerGUID(cid) doPlayerRemoveItem(cid, 9971, 3) doRemoveCreature(cid, true) db.query("UPDATE `players` SET `maglevel` = `maglevel` + 1 WHERE `id` = "..pid) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillclub") then if getPlayerSkillLevel(cid, SKILL_CLUB) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isDrunou(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB) doPlayerRemoveItem(cid, 9971, 1) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (club + 1) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillsword") then if getPlayerSkillLevel(cid, SKILL_SWORD) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 1) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (sword + 1) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillaxe") then if getPlayerSkillLevel(cid, SKILL_AXE) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local axe = getPlayerSkillLevel(cid, SKILL_AXE) doPlayerRemoveItem(cid, 9971, 1) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (axe + 1) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skilldistance") then if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isPaladin(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (distance + 1) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillshielding") then if getPlayerSkillLevel(cid, SKILL_SHIELD) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) doPlayerRemoveItem(cid, 9971, 1) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (shield + 1) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "magiclevel5") then if getPlayerMagLevel(cid) >= 196 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.") return TRUE end if(not isSorcerer(cid) and not isDruid(cid) and not isInfernalist(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 15 then local pid = getPlayerGUID(cid) doPlayerRemoveItem(cid, 9971, 15) doRemoveCreature(cid, true) db.query("UPDATE `players` SET `maglevel` = `maglevel` + 5 WHERE `id` = "..pid) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillclub10") then if getPlayerSkillLevel(cid, SKILL_CLUB) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isDrunou(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB) doPlayerRemoveItem(cid, 9971, 10) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (club + 10) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillsword10") then if getPlayerSkillLevel(cid, SKILL_SWORD) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 10) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (sword + 10) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillaxe10") then if getPlayerSkillLevel(cid, SKILL_AXE) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local axe = getPlayerSkillLevel(cid, SKILL_AXE) doPlayerRemoveItem(cid, 9971, 10) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (axe + 10) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skilldistance10") then if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isPaladin(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) doPlayerRemoveItem(cid, 9971, 10) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (distance + 10) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillshielding10") then if getPlayerSkillLevel(cid, SKILL_SHIELD) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) doPlayerRemoveItem(cid, 9971, 10) doRemoveCreature(cid, true) db.query("UPDATE `player_skills` SET `value` = " .. (shield + 10) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") end end return TRUE end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. Quando o player usa o comando !comprar eu consegui ajustar aparece o que o player pode comprar, porem quando o player usa o !comprar e skillclub ou qualquer outro não acontece nada.- Player ao criar conta esta começando com speed 7
.Qual servidor ou website você utiliza como base? The OTX Server Global - Version: (3.10) Qual o motivo deste tópico? Olá bom dia peguei um servidor Global e no site não tinha opção de vocação o player começava sem vocação, ai eu acabei colocando as vocação no site, porem quando o player cria conta e loga, fica com speed 7 e o player fica bugado não consegue andar, se alguém conseguir me da uma luz do que eu possa fazer pra corrigir obrigado. Feliz natal! Está surgindo algum erro? Se sim coloque-o aqui.- sistema de reset otx 3.1
Pode excluir o topico já consegui resolver valeu- Wall que verificar se o Player tem storage
Deu certo será que se consegue fazer uns ajuste? no caso se mata o boss e você continua na sala teria como colocar uma mensagem "Você matou o getCreatureName você será removido da sala em 1 minuto" - Tempo na alavanca
Informação Importante
Confirmação de Termo