
Solutions
-
Wakon's post in (Resolvido)[AJUDA] Problemas com Pots was marked as the answerTroca pelo seu script de potions: Geralmente fica em "Data/actions/scripts/liquids/potions.lua".
local config = { removeOnUse = "yes", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", range = -1, realAnimation = "no", -- make text effect visible only for players in range 1x1 multiplier = { health = 1.0, mana = 1.0 } } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [8704] = {empty = 7636, splash = 42, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 42, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 42, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 42, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 42, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 47, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 47, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 47, mana = {250, 350}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 43, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPosition(item.uid) end doDecayItem(doCreateItem(POOL, potion.splash, toPosition)) doRemoveItem(item.uid, 1) if(not potion.empty or config.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end if(hasCondition(cid, CONDITION_EXHAUST)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end if(config.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > config.range) then return false end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.multiplier.health))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.multiplier.mana))) then return false end doSendMagicEffect(getThingPosition(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not config.realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getThingPosition(itemEx.uid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) doRemoveItem(item.uid, 1) if(not potion.empty or config.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end Não esqueça de configurar ao seu gosto os heals.
-
Wakon's post in (Resolvido)spell book script was marked as the answerAlguns items em "Data/items/items.xml", alguns em "data/movements/movements.xml" e "data/weapons/weapons.xml".
-
Wakon's post in (Resolvido)NPC vip was marked as the answerModifiquei pra você, testa ai:
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 item = 2159 -- ID Do item a ser cobrado. local price = 10 -- Quantidade a ser cobrada. local vocations = {5,6,7,8} if(msgcontains(msg, 'promotion') or msgcontains(msg, 'vip promotion')) then selfSay('Você quer ser promovido vip por '..price..' moedas? {yes} ', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if isInArray(vocations, getPlayerVocation(cid)) then if getPlayerItemCount(cid, item) >= price then if getPlayerVocation(cid) == 5 then doPlayerSetVocation(cid, 9) doPlayerRemoveItem(cid, item, price) end if getPlayerVocation(cid) == 6 then doPlayerSetVocation(cid, 10) doPlayerRemoveItem(cid, item, price) end if getPlayerVocation(cid) == 7 then doPlayerSetVocation(cid, 11) doPlayerRemoveItem(cid, item, price) end if getPlayerVocation(cid) == 8 then doPlayerSetVocation(cid, 12) doPlayerRemoveItem(cid, item, price) end selfSay('Parabens! Você foi promovido vip! ', cid) talkState[talkUser] = 0 else selfSay('Você não tem ' .. price .. ' moedas para ser promovido a vip...', cid) talkState[talkUser] = 0 end else selfSay('Desculpe, você precisa ter a member promotion para ser promovido vip.', cid) talkState[talkUser] = 0 end elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) EDIT:
Esqueci de colocar pra cobrar o item, mals.
-
Wakon's post in (Resolvido)(Pedido) Remover Chest após pegar recompensa. was marked as the answerTesta ai:
local config = { storage = 27364, exhauststorage = 20932, destino = {x = 1010, y = 1020, z = 7}, days = { ["Monday"] = {itemid = 2160, count = 15, storagevalue = 8}, ["Tuesday"] = {itemid = 2160, count = 20, storagevalue = 9}, ["Wednesday"] = {itemid = 6570, count = 1, storagevalue = 10}, ["Thursday"] = {itemid = 6570, count = 1, storagevalue = 11}, ["Friday"] = {itemid = 6570, count = 1, storagevalue = 12}, ["Saturday"] = {itemid = 6570, count = 1, storagevalue = 13}, ["Sunday"] = {itemid = 2160, count = 10, storagevalue = 14} } } function onUse(cid, item, fromPosition, itemEx, toPosition) local x = config.days[os.date("%A",os.time())] if(getPlayerStorageValue(cid, config.storage) == x.storagevalue and exhaustion.check(cid, config.exhauststorage)) then return doPlayerSendCancel(cid, "The chest is empty, come back tomorrow for a new reward.") end local info = getItemInfo(x.itemid) if(x.count > 1) then text = x.count .. " " .. info.plural else text = info.article .. " " .. info.name end local itm = doCreateItemEx(x.itemid, x.count) if(doPlayerAddItemEx(cid, itm, false) ~= RETURNVALUE_NOERROR) then doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) text = "You have found a reward weighing " .. getItemWeight(itm) .. " oz. It is too heavy or you have not enough space." else text = "You have received " .. text .. "." setPlayerStorageValue(cid, config.storage, x.storagevalue) exhaustion.set(cid, config.exhauststorage, 24*60*60) doTeleportThing(cid, config.destino) doRemoveItem(item.uid, 1) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, text) return true end -
Wakon's post in (Resolvido){Pedido} Promotion automática. was marked as the answerTenta assim, tira o que eu te passei do login.lua e coloca isso no lugar:
if getPlayerStorageValue(cid, 55885) <= 0 and getPlayerPremiumDays(cid) >= 1 then setPlayerStorageValue(cid, 55885, 1) doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) return true end local vocstatus = getPlayerStorageValue(cid, 55885) if vocstatus == 1 and getPlayerPremiumDays(cid) >= 1 then doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) end -
Wakon's post in (Resolvido)Client 10.76 ? was marked as the answerUsa MageBot, pode ser o Demo Version mesmo, só IPChanger funciona, se for windows 8+ recomendo executar como administrador:
O Bruno comentou um negocio em outro post para resolver, se quiser tentar também:
Amigo, utilizo o da OTLand normalmente aqui. Tenta assim: Seleciona a versão 10.76 e clica em Apply sem estar com o Tibia aberto, assim ele vai abrir o Tibia com o IP alterado. -
Wakon's post in Bots para 10.76? was marked as the answerNeutral Bot, Xeno Bot, WindBot (Recomendo).
-
Wakon's post in (Resolvido)Wand/Rod com quatro atks was marked as the answerTem esse aqui, testei e tá funcionando:
http://www.tibiaking.com/forum/topic/16187-wand-muda-de-efeito/
-
Wakon's post in (Resolvido)Consertando Erros e Novos Pedidos! was marked as the answerO xWhiteWolf arrumou esse bug ai, testa o script dele:
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 coins = {[2148] = 1, [2152] = 100, [2160] = 10000} function countMoneyOnPos(pos) local money = 0 for stack = 1, 255 do pos.stackpos = stack local item = getThingFromPos(pos) if item and item.uid > 0 then if coins[item.itemid] then money = money + coins[item.itemid] * item.type end end end return money end local posCoal = {x = 145, y = 49, z = 7} -- POSIÇÃO DO COAL, ONDE O GOLD DEVE ESTAR local posNpc = {x = 145, y = 48, z = 7} -- POSIÇÃO DO NPC local pos = getPosByDir(getThingPos(cid), getCreatureLookDirection(cid), 1) -- NÃO ALTERAR if msgcontains(msg, 'l') or msgcontains(msg, 'L') or msgcontains(msg, 'low') or msgcontains(msg, 'Low') then if countMoneyOnPos(pos) > 0 then if math.random(1, 6) <= 3 then doPlayerAddMoney(cid, countMoneyOnPos(pos)*2) doSendMagicEffect(posNpc, 26) doSendMagicEffect(posNpc, 28) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(1, 3)..', parabéns!', TALKTYPE_ORANGE_1) else doSendMagicEffect(posNpc, 2) doSendMagicEffect(posNpc, 26) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(4, 6)..', tente novamente!', TALKTYPE_ORANGE_1) end for stack = 1, 255 do pos.stackpos = stack local item = getThingFromPos(pos) if item and item.uid > 0 then if coins[item.itemid] then doRemoveItem(item.uid) end end end else doCreatureSay(getNpcId(), getCreatureName(cid)..', coloque uma quantia de gold no recipiente para começar a apostar!', TALKTYPE_ORANGE_1) end elseif msgcontains(msg, 'h') or msgcontains(msg, 'H') or msgcontains(msg, 'high') or msgcontains(msg, 'High') then if countMoneyOnPos(pos) > 0 then if math.random(1, 6) <= 3 then doPlayerAddMoney(cid, countMoneyOnPos(pos)*2) doSendMagicEffect(posNpc, 26) doSendMagicEffect(posNpc, 28) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(4, 6)..', parabéns!', TALKTYPE_ORANGE_1) else doSendMagicEffect(posNpc, 2) doSendMagicEffect(posNpc, 26) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(1, 3)..', tente novamente!', TALKTYPE_ORANGE_1) end for stack = 1, 255 do pos.stackpos = stack local item = getThingFromPos(pos) if item and item.uid > 0 then if coins[item.itemid] then doRemoveItem(item.uid) end end end else doCreatureSay(getNpcId(), getCreatureName(cid)..', coloque uma quantia de gold no recipiente para começar a apostar!', TALKTYPE_ORANGE_1) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
Wakon's post in (Resolvido)Global Save trocando vocation was marked as the answerTenta colocar globalSaveEnabled = false no config.lua, mais pode ser por globalevent também.
Vá em "Data/globalevents/scripts" e procure algo relacionado ao global save, ai você pode retirar ou se quiser posta aqui pra ver o que tem de errado.
-
Wakon's post in (Resolvido)como mudar o spr do client de versão was marked as the answerTenta abrir ela com o Object Builder e compilar na versão desejada!
-
Wakon's post in (Resolvido)Por favor, ajuda com itens iniciais de pally was marked as the answerTroca pelo seu:
local firstItems_storage = 30001 local allvoc = { -- Items para todas as vocações. {itemid=2554, inContainer = TRUE}, -- Shovel. {itemid=2120, inContainer = TRUE}, -- Rope. {itemid=7618, count=10, inContainer = TRUE}, -- Health Potions. {itemid=7620, count=10, inContainer = TRUE}, -- Mana Potions. {itemid=2152, count=20, inContainer = TRUE}, -- 10 Platinum Coins. {itemid=2643} -- Leather Boots. } local firstItems = { { -- Sorcerer {itemid=5949, container = TRUE}, -- Beach Backpack --> {itemid=2525}, -- Shield --> {itemid=2457}, -- Helmet --> {itemid=2647}, -- Legs --> {itemid=2463}, -- Armor --> {itemid=2190} -- Weapon --> }, { -- Druid {itemid=5949, container = TRUE}, -- Beach Backpack --> {itemid=2525}, -- Shield --> {itemid=2457}, -- Helmet --> {itemid=2647}, -- Legs --> {itemid=2463}, -- Armor --> {itemid=2182} -- Weapon --> }, { -- Paladin {itemid=5949, container = TRUE}, -- Beach Backpack --> {itemid=2525}, -- Shield --> {itemid=2399, count = 5}, -- Weapon --> {itemid=2457}, -- Helmet --> {itemid=2647}, -- Legs --> {itemid=2463} -- Armor --> }, { -- Knight {itemid=5949, container = TRUE}, -- Beach Backpack --> {itemid=2525}, -- Shield --> {itemid=2457}, -- Helmet --> {itemid=2647}, -- Legs --> {itemid=2463}, -- Armor --> {itemid=2409} -- Weapon --> } } for _, items in ipairs(firstItems) do for _, item in ipairs(allvoc) do table.insert(items, item) end end function onLogin(cid) if getPlayerGroupId(cid) < 2 and getPlayerStorageValue(cid, firstItems_storage) <= 0 then local currvoc = getPlayerVocation(cid) local vocation = 5 > currvoc and currvoc or currvoc - 4 local giveItems = firstItems[vocation] if giveItems then for _, v in ipairs(giveItems) do if v.container == TRUE then backpack = doPlayerAddItem(cid, v.itemid, 1) elseif v.inContainer == TRUE then doAddContainerItem(backpack, v.itemid, v.count or 1) else doPlayerAddItem(cid, v.itemid, v.count or 1) end end end setPlayerStorageValue(cid, firstItems_storage, 1) end return TRUE end Ai é só editar ali na count do paladin.
-
Wakon's post in (Resolvido)Ajuda com script de personagem inicial was marked as the answerVá em "Data/creaturescripts/scripts", abra o firstitems.lua, lá tem cada vocação e seus items iniciais.
É bem fácil de configurar por ele, creio que você não terá dificuldade, mais caso encontre alguma dificuldade é só avisar
-
Wakon's post in (Resolvido)[PEDIDO] Script de piso. was marked as the answerEm "Data/movements/scripts" copie e cole um arquivo .lua e renomeie para tilestor.lua, apague tudo e cole isso:
local config = { storage = 2765, efeito = 12 } function onStepIn(cid, item, pos) if not isPlayer(cid) then return true end if getPlayerStorageValue(cid, config.storage) < 1 then doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, 1) end end Em "Data/movements" abra o movements.xml e adicione a tag:
<movevent type="StepIn" actionid="2498" event="script" value="tilestor.lua"/> Ai tu coloca a actionid no piso que você quer que ganhe a storage.
-
Wakon's post in (Resolvido)Ajuda com script premium was marked as the answerlocal config = { days = 30, maxDays = 360, removeItem = true -- Remover ao usar. [ True para remover / False para não remover!] } function onUse(cid, item, fromPosition) if(getPlayerPremiumDays(cid) > config.maxDays) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not buy more than " .. config.days + config.maxDays .. " days of Premium Account.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end if config.removeItem then doRemoveItem(item.uid) end doPlayerAddPremiumDays(cid, config.days) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You won " .. config.days .. " days of premium account.") doSendMagicEffect(getPlayerPosition(cid), 12) return true end
-
Wakon's post in (Resolvido)Ajuda com Bike - Como mudar outfit was marked as the answerVocê pode baixar o Object Builder e pegar a sprite do próprio OTPokémon, baixe o cliente deles, abra com o Object Builder, procure a sprite e export ela.
Ai você abre o seu Client no Object Builder e importa a sprite no lugar da bike.
Object Builder:
http://www.tibiaking.com/forum/topic/30624-object-builder/
Para exportar é simples, após abrir o .dat e o .spr do OTPokémon no Object Builder, procure a Bike deles, clique com o botão direito, depois exporte como obd.
Para importar você abre o seu .dat e o seu .spr e procura a sua Bike, depois é só clicar com o direito e dar replace usando o arquivo .obd que você exportou do OTPokemon.
-
Wakon's post in (Resolvido)Comando para troca de sexo do player was marked as the answerEm "Data/talkactions/scripts" adicione o script changesex.lua:
function onSay(cid, words, param) local b = string.explode(param, ",") if param == "" then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Command param is required.") end if b[2] == null then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Missing sex.") end -- Para usar /sex nomedoplayer,0 [0 = Female, 1 = Male] local god = getPlayerName(cid) local i = getPlayerByName(b[1]) if isPlayer(i) == TRUE then doPlayerSetSex(i, b[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"O sexo do jogador foi alterado.") doPlayerSendTextMessage(i, 25, "Seu sexo foi alterado pelo adminstrador, "..god..".") doSendMagicEffect(getPlayerPosition(i), 13) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"O jogador nao esta online ou nao existe.") end return true end Em "Data/talkactions" abra o talkactions.xml e adicione:
<talkaction log="yes" words="/sex" access="5" event="script" value="changesex.lua"/> Para usar é só dizer /sex Wakon, 0 (Sendo 0 = Female e 1 = Male)
-
Wakon's post in (Resolvido)Passar no piso so se tiver x x x Storagens, Poder colocar +de 1 Storage was marked as the answerTentei fazer por array mais tava complicado, ai fiz assim:
Em "Data/movements/scripts" copie e cole 1 arquivo .lua e renomeie para tilestor.lua, apague e coloque isso:
local config = { storage1 = 25091, storage2 = 25092, storage3 = 25093, } function onStepIn(cid, item, position, fromPosition) if getPlayerStorageValue(cid, config.storage1) <= 0 then doPlayerSendCancel(cid, "You have not completed the first mission.") doTeleportThing(cid, fromPosition) doSendMagicEffect(position, 12) elseif getPlayerStorageValue(cid, config.storage2) <= 0 then doPlayerSendCancel(cid, "You have not completed the second mission.") doTeleportThing(cid, fromPosition) doSendMagicEffect(position, 12) elseif getPlayerStorageValue(cid, config.storage3) <= 0 then doPlayerSendCancel(cid, "You have not completed the third mission.") doTeleportThing(cid, fromPosition) doSendMagicEffect(position, 12) -- Fim da ultima missão. else doPlayerSendCancel(cid, "You accessed the prohibited area.") doSendMagicEffect(position, 13) end return true end Em "Data/movements" abra o movements.xml e adicione essa tag:
<movevent type="StepIn" actionid="1242" event="script" value="tilestor.lua"/> Ai você coloca a Action ID nos locais desejados!
Então ele só pode passar se a storage 1, 2 e 3 for maior que 1, no caso tem que completar 3 missões.
Pra você adicionar mais é o seguinte:
Coloque a storage no config, só copiar e mudar o nome para storage4 ou storage5 e assim vai.
Para adicionar a função você coloca depois do -- Fim da ultima missão. e antes do else.
elseif getPlayerStorageValue(cid, config.storage3) <= 0 then
doPlayerSendCancel(cid, "You have not completed the third mission.")
doTeleportThing(cid, fromPosition)
doSendMagicEffect(position, 12)
Ai é só mudar o nome que você colocou lá em cima em storage e mudar o texto para o nome da missão.
Espero que ajude, vou tentar facilitar mais pra você e se conseguir edito aqui.
-
Wakon's post in (Resolvido)Stamina Potion was marked as the answerTenta assim:
local config = { stamina = 2520, -- Stamina do player ao usar o item, 2520 = Full stamina! ti = 12*3600, -- Tempo para usar em horas. temp = 5 -- Tempo para kikar após usar o item. } function onUse(cid, item, fromPos, itemEx, toPos) local st = 25090 if getTilePzInfo(getPlayerPosition(cid)) == false then return doPlayerSendTextMessage(cid, 25, "You need to be in protection zone.") end if getPlayerStamina(cid) >= config.stamina then return doPlayerSendTextMessage(cid, 25, "Your stamina is already full.") end if getPlayerStorageValue(cid, st) > os.time() then doPlayerSendTextMessage(cid, 25, "You need wait " .. getPlayerStorageValue(cid, st) - os.time() .. ' second' .. (getPlayerStorageValue(cid, st) - os.time() == 1 and "" or "s") .. " to use this item again.") return true else doPlayerSendTextMessage(cid, 25, "His stamina was renewed, you will be kicked in "..config.temp.." seconds to update the character.") doPlayerSetStamina(cid, config.stamina) doRemoveItem(item.uid, 1) setPlayerStorageValue(cid, st, os.time() + config.ti) addEvent(doRemoveCreature, config.temp*1000, cid, true) return true end return true end Quanto ao ultimo pedido, não sei como fazer x.x
-
Wakon's post in (Resolvido)Otc Otpokemon was marked as the answerVocê pode pegar o OTClient e editar ao seu gosto, é meio complicado mais é só pesquisar/estudar que você consegue
http://www.tibiaking.com/forum/topic/34344-otclient-067-1071/
-
Wakon's post in (Resolvido)Addons para free acc was marked as the answerVá no config.lua e procure por addonsOnlyPremium, e coloque o value como false.
Caso não ache o addonsOnlyPremium, adicione essa linha no config.lua:
addonsOnlyPremium = false
Se essa opção não funcionar, creio que seja apenas na source, a não ser que tenha outra função que eu desconheço.
-
Wakon's post in (Resolvido)Comando was marked as the answerModifiquei aquele que fiz pra você, só colocar no lugar dele, as funções são as mesmas só adicionei 1 nova:
function onSay(cid, words, param) if param == "" then return doPlayerPopupFYI(cid,"Está com problemas?\nAprenda os comandos!\n---------------\nAdicionar premium:\n/pa add days player\n/pa add 30 Wakon\n---------------\nRemover premium:\n/pa remove player\n/pa remove Wakon\n---------------\nVer Premium:\n/pa days player\n/pa days Wakon\n---------------") end if param:lower():find('add') == 1 and 3 then local _,_,id,name = param:lower():find('add (%d+) (.+)') name = name or "" id = tonumber(id or 1) or 1 if tonumber(id) == nil or getPlayerByName(name) == false then return doPlayerSendTextMessage(cid,25,"Adicionar premium:\n/pa add days player\n/pa add 30 Wakon\n [Player: "..name.."]") end if isPlayer(getPlayerByName(name)) == TRUE then doPlayerAddPremiumDays(getPlayerByName(name), id) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Foram adicionados "..tonumber(id).." dias de premium ao jogador "..name..".") doPlayerSendTextMessage(getPlayerByName(name),25,"Você recebeu "..tonumber(id).." dias de premium, relogue para atualizar.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name.." não esta online ou não existe.") end elseif param:lower():find('remove') == 1 and 3 then local _,_,id2,name2 = param:lower():find('remove (%d+) (.+)') name2 = name2 or "" id2 = tonumber(id2 or 1) or 1 if tonumber(id2) == nil or getPlayerByName(name2) == false then return doPlayerSendTextMessage(cid,25,"Remover premium:\n/pa remove days player\n/pa remove 30 Wakon\n [Player: "..name2.."]") end if isPlayer(getPlayerByName(name2)) == TRUE then doPlayerRemovePremiumDays(getPlayerByName(name2), id2) return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Foram retirados "..tonumber(id2).." dias de premium do jogador "..name2..".") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name2.." não esta online ou não existe.") end if param:lower():find('days') == 1 and 3 then local _,_,name3 = param:lower():find('days (.+)') name3 = name3 or "" prem = getPlayerPremiumDays(getPlayerByName(name3)) if isPlayer(getPlayerByName(name3)) == false then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name3.." não esta online ou não existe.") end if prem >= 1 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "O jogador "..name3.." tem "..prem.." dias de premium.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name3.." é free account.") end end return TRUE end Para ver os dias é só digitar: /pa days player
-
Wakon's post in (Resolvido)Pedido de Script que teleporta para casa was marked as the answerScript casa:
Vá em "Data/talkactions/scripts" copie e cole 1 arquivo .lua e renomeie para gohouse.lua, apague tudo e cole isso:
Agora em "Data/talkactions" abra o arquivo talkactions.xml e adicione essa tag:
<talkaction words="!gohouse;/gohouse" script="gohouse.lua"/> Agora o teleport para o templo:
Vá em "Data/talkactions/scripts" copie e cole 1 arquivo .lua e renomeie para templo.lua, apague tudo e cole isso:
Agora em "Data/talkactions" abra o arquivo talkactions.xml e adicione essa tag:
<talkaction words="!templo;/templo" script="templo.lua"/> -
Wakon's post in (Resolvido)Problema com comando !buypremium was marked as the answer"Pastadoseuserver/mods", deleta o buypremium_command.xml, pode ser outro nome mais ta nessa pasta ai!
-
Wakon's post in (Resolvido)error rme abrindo map poketibia was marked as the answerAcho que não é bug não amigo é as opções do RME, faz assim clica em view e deixa apenas essas opções marcadas: