Tudo que Gantz postou
-
(Resolvido)[AJUDA] Configurar quantidade alavanca.
coloquei no script para você definir a quantidade, deixei tudo 1 item. local coin = 2157 -- sua moeda vip local lever = { [6001] = {10,7424,1}, [6002] = {10,2138,1}, [6003] = {10,2165,1}, [6004] = {10,5949,1}, [6005] = {10,8903,1}, [6006] = {10,7902,1}, [6007] = {10,7897,1}, [6008] = {10,7896,1}, [6009] = {10,7892,1}, [6010] = {10,2410,1}, [6011] = {10,7857,1}, [6012] = {10,7887,1}, [6013] = {10,6300,1}, [6014] = {10,3940,1}, [6015] = {10,2518,1}, [6016] = {10,7903,1}, [6017] = {10,7884,1}, [6018] = {10,7885,1}, [6019] = {10,7886,1}, } local arrows = {5907,7432,7735,7959,10943} -- coloque o ID das arrows function onUse(cid,item,fromPosition,itemEx,toPosition) if doPlayerRemoveItem(cid,coin,lever[item.actionid][1]) == FALSE then return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "você precisa de "..lever[item.actionid][1].." " ..getItemNameById(coin)) end doPlayerAddItem(cid, lever[item.actionid][2], lever[item.actionid][3]) doPlayerSendTextMessage(cid,22,"você comprou um " .. getItemNameById(lever[item.actionid][2])) doSendMagicEffect(getCreaturePosition(cid), math.random(28,30)) doTransformItem(item.uid, item.itemid == 9825 and 9826 or 9825) return true end caso um dia você for editar lembre de colocar a quantidade: [6001] = {10,7424,1}, sendo o ultimo 1 a quantidade
-
Summon System
ta dando erro por que além dos players que estão atravessando com os pet, tem os que estão atravessando sem os pets que dai da a mensagem, tem que fazer uma verificação antes para ver se o player tem ou não o pet: local posi = {x=1099, y=1135, z=7} -- Posicao pra onde vai o player local volta = {x=1095, y=1061, z=8} -- Posicao pra onde o player vai se teleportado caso nao tenha lvl ou seja maior function onStepIn(cid, item, position, lastPosition, fromPosition) if getPlayerLevel(cid) < 141 then doTeleportThing(cid, posi) if #getCreatureSummons(cid) > 0 then doTeleportThing(getCreatureSummons(cid)[1], posi) end doSendMagicEffect(getThingPos(cid), 10) doPlayerSendTextMessage(cid, 19, "Você entrou na zona 120~140!") else doPlayerSendTextMessage(cid, 19, "Você não pode entrar nessa zona! (Nível 120~140).") doTeleportThing(cid, volta) doSendMagicEffect(getThingPos(cid), 10) end end
-
(Resolvido)Pedido EXIT SIMPLES
movement kick_time = 60 -- tempo que precisa ficar no tile para ser deslogado function kick_time_by_pos(cid, ml, kicktime, postile) if not isCreature(cid) then return true end if ml == kicktime then return doRemoveCreature(cid) end if getThingPos(cid).x ~= postile.x or getThingPos(cid).y ~= postile.y or getThingPos(cid).z ~= postile.z then return true end addEvent(kick_time_by_pos, 1, cid, ml+1, kicktime, postile) end function function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) return kick_time_by_pos(cid, 0, kick_time * 10000, position) end <movevent type="StepIn" actionid="" event="script" value=".lua"/>
-
Summon System
bom eu não sei por que ele não vai junto no teleporte, mais no script do teleporte voce poderia por para teleportar o summon junto só colocar: doTeleportThing(getCreatureSummons(cid)[1], nome_variavel_pos_teleport)
-
Summon System
faz por creaturescript, creaturescripts/scripts/summonDistance.lua function onThink(cid, interval) if #getCreatureSummons(cid) > 0 then return getThingPos(cid).z ~= getThingPos(getCreatureSummons(cid)[1]).z and doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid)) or true end end login.lua (antes do return true) registerCreatureEvent(cid, "summonDistance") creaturescripts.xml <event type="think" name="summonDistance" event="script" value="summonDistance.lua"/>
-
(Resolvido)[Pedido] Exiva Normal & Exiva Aguçado
testa ae amigo: bool InstantSpell::SearchPlayer(const InstantSpell* spell, Creature* creature, const std::string& param) { Player* player = creature->getPlayer(); if(!player || player->isRemoved()) return false; Player* targetPlayer = NULL; ReturnValue ret = g_game.getPlayerByNameWildcard(param, targetPlayer); if(ret != RET_NOERROR || !targetPlayer || targetPlayer->isRemoved()) { player->sendCancelMessage(ret); g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); return false; } if(targetPlayer->hasCustomFlag(PlayerCustomFlag_NotSearchable) && !player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)) { player->sendCancelMessage(RET_PLAYERWITHTHISNAMEISNOTONLINE); g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); return false; } std::stringstream ss; const Position& pos = player->getPosition(); const Position& targetPos = targetPlayer->getPosition(); uint32_t distance = std::max(std::abs(pos.x - targetPos.x), std::abs(pos.y - targetPos.y)); if(pos.z != targetPos.z) distance = distance + 9 + 6; ss << targetPlayer->getName() << " " << g_game.getSearchString(player->getPosition(), targetPlayer->getPosition(), true, true) << " [" << distance << " sqm]"; player->sendTextMessage(MSG_INFO_DESCR, ss.str().c_str()); g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_WRAPS_BLUE); return true; }
- [AJUDA] Item de Montaria
-
[TFS 1.0] addCooldown(spellid, time) - getCooldown(spellid)
Bom eu criei essas duas funções para usar no meu OT, elas forçam o uso do cooldown do sistema do tibia, você pode usa lo mesmo que não tenha executado nenhuma spell. por exemplo: player:addCooldown(87, 10000) sendo 87 o código da spell, ou seja a imagem que ira aparecer no cooldown, lembrando que estas imagens podem ser editadas no tibia.pic. E 10000 o tempo do cooldown, lembrando a cada 1000 equivale a 1 segundo. resultado: e a função get ele retorna true ou false, para caso o cooldown estiver sendo executado: player:getCooldown(87) Vamos la. em luascript.cpp procure por: registerMethod("Player", "getMoney", LuaScriptInterface::luaPlayerGetMoney); registerMethod("Player", "addMoney", LuaScriptInterface::luaPlayerAddMoney); registerMethod("Player", "removeMoney", LuaScriptInterface::luaPlayerRemoveMoney); e logo depois dessas linhas de códigos adicione: registerMethod("Player", "addCooldown", LuaScriptInterface::luaPlayerAddCooldown); registerMethod("Player", "getCooldown", LuaScriptInterface::luaPlayerGetCooldown); ainda em luascript.cpp procure por: int32_t LuaScriptInterface::luaPlayerRemoveMoney(lua_State* L) e após a ultima linha desta função adicione: int32_t LuaScriptInterface::luaPlayerAddCooldown(lua_State* L) { // player:addCooldown(spellid, cooldown) Player* player = getUserdata<Player>(L, 1); if (player) { uint8_t spellId = getNumber<uint8_t>(L, 2); uint32_t cooldown = getNumber<uint32_t>(L, 3); Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, cooldown, 0, false, spellId); player->addCondition(condition); pushBoolean(L, true); } else { lua_pushnil(L); } return 1; } int32_t LuaScriptInterface::luaPlayerGetCooldown(lua_State* L) { // player:getCooldown(spellid) Player* player = getUserdata<Player>(L, 1); if (!player) { lua_pushnil(L); return 1; } uint32_t spellid = getNumber<uint32_t>(L, 2); if (player->hasCondition(CONDITION_SPELLCOOLDOWN, spellid)) { pushBoolean(L, true); } else { pushBoolean(L, false); } return 1; } agora em luascript.h procure por: static int32_t luaPlayerGetMoney(lua_State* L); static int32_t luaPlayerAddMoney(lua_State* L); static int32_t luaPlayerRemoveMoney(lua_State* L); e logo após estes código adicione: static int32_t luaPlayerAddCooldown(lua_State* L); static int32_t luaPlayerGetCooldown(lua_State* L); depois é só compilar e usar !
-
[PEDIDO] Sistema De Level
a cada 1 hora jogada 5 leveis para o player, porém tem 2 condições, se o player deslogar ou morrer a contagem volta do 0. creaturescripts/scripts/checktime.lua function check_time(cid, t) if not isCreature(cid) then return true end if t == 3600 then t = 0 doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabéns ! Você jogou durante 1 hora e upou 5 leveis.") doPlayerAddLevel(cid, 5) end addEvent(check_time, 1000, cid, t + 1) end function onLogin(cid) return check_time(cid, 0) end tag: <event type="login" name="CheckTime" event="script" value="checktime.lua"/>
-
Matar outros bichos para poder matar o boss [8.60]
desculpe, mais criar uma alavanca ou um portal já é simples de mais, só dar uma procurada ai, se for usar o editor de mapa, nem de script é preciso
-
[Pedido] Invasão Automatica
sim
-
Matar outros bichos para poder matar o boss [8.60]
eu tenho um script aqui, não sei se vai te ajudar, ele funciona seguinte: Por exemplo, tem um Demon, ele sumona 3 fire Devil, enquanto esses fire devil estiver perto do Demon eu sou obrigado atacar os fire devil, mais se eles tiverem longes eu posso atacar o Demon. Longe que eu digo é fora da tela, então se sua quest for uma area pequena, da pra usar tranquilo. ai vai: local boss = { name = "Demon", slave = "Fire Devil", protection = false } function onTarget(cid, target) if getCreatureName(target) == boss.name and isMonster(target) then boss.position = getThingPos(target) for x = -6, 6 do for y = -6, 6 do pos_verific = {x = boss.position.x + x, y = boss.position.y + y, z = boss.position.z} thing = getThingFromPos(pos_verific).uid if isMonster(thing) then if getCreatureName(thing) == boss.slave then boss.protection = true end end end end end if boss.protection then doPlayerSendCancel(cid, "First defeat the head of slaves .") return false end return true end xml: <event type="target" name="BossSlave" event="script" value="bossSlave.lua"/> login.lua registerCreatureEvent(cid, "BossSlave")
-
[Pedido] Invasão Automatica
local i = { ["20:14"] = {nome = "The Demon Invasion", pos = {x=32369, y=32167, z=7}, monster = {"50 Demon", "1 The Imperor"}}, ["14:35"] = {nome = "The Massive Dragon Invasion", pos = {x=32368, y=32188, z=8}, monster = {"200 Dragon"}}, } function onThink(interval, lastExecution) hours = tostring(os.date("%X")):sub(1, 5) tb = i[hours] if tb and getGlobalStorageValue(78341) ~= hours then doBroadcastMessage(hours .. " - " .. tb.nome .. " iníciou.") setGlobalStorageValue(78341, hours) for _,x in pairs(tb.monster) do for s = 1, tonumber(x:match("%d+")) do doSummonCreature(x:match("%s(.+)"), tb.pos) end end end return true end só configurar.
-
Meu Primeiro trabalho
por se o primeiro esta bom :3
-
GRUPO WHATSAPP
Boa tarde Pessoal, Estou querendo formar um grupo no whatsapp, minha intenção é ter pessoas inteligentes neste grupo, scripters, mappers, pessoas boas neste rumo de OT. Depois quem sabe não sai idéias, projetos, amizades, a partir de um grupo. Postem ai o seu numero com DDD. meu removido
-
2 mega pedidos para ajudar
fiz um mod para seu primeiro pedido, entre na pasta mods, crie um aquivo xml e cole o código: <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Ranking Uptime" version="1.0" author="Gantz (miiller)" contact="tibiaking.com" enabled="yes"> <config name="uptime_func"><![CDATA[ uptime = { storage = 67517, get = function (cid) return getPlayerStorageValue(cid, uptime.storage) end, start = function (cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, uptime.storage, uptime.get + 1) addEvent(uptime.start, 1000, cid) end, convert = function(uptime) local day, hour, minute = 0 while uptime >= 86400 do day = day + 1 uptime = uptime - 86400 end while uptime >= 3600 do hour = hour + 1 uptime = uptime - 3600 end while uptime >= 60 do minute = minute + 1 uptime = uptime - 60 end local second = uptime local str = ((day > 0 and day .. "d " or "") .. (hour > 0 and hour .. "h " or "") .. (minute > 0 and minute .. "m " or "") .. (second > 0 and second .. "s " or "")) return str end } ]]></config> <event type="login" name="uptime_login" event="script"><![CDATA[ domodlib('uptime_func') function onLogin(cid) setPlayerStorageValue(cid, uptime.storage, 0) uptime.start(cid) return true end]]></event> <talkaction words="!uptimerank;/uptimerank" event="buffer"><![CDATA[ domodlib('uptime_func') function onSay(cid, words, param) local ranking = getPlayersOnline() local t = #ranking < 10 and #ranking or 10 for i = 1, t do for j = i + 1, #getPlayersOnline() do if uptime.get(ranking[j]) > uptime.get(ranking[i]) then local aux = uptime.get(ranking[i]) ranking[i] = ranking[j] ranking[j] = aux end end end local result = "" for i = 1, t do result = result .. i .. ". " .. getCreatureName(ranking[i]) .. " - " .. uptime.convert(uptime.get(ranking[i])) .. "\n" end doShowTextDialog(cid, 6500, result) return true end]]></talkaction> </mod>
-
(Resolvido)[Ajuda Urgente] Itens que fazer as skills
sim, que orgulho Tony <3
-
PROCURANDO PROJETO
faço tudo, adiciona skype e mostre seu projeto se tiver interesse ajudo
-
Swort Art Online Tibia (SAO) by : Erondino
1 - ninguém vai jogar um servidor de tibia que morreu já era 2 - Desnecessário ter classes, seria interessante apenas treinar e subir level para ficar forte, e usar oque quiser, sem frescura de classe. 3 - os mapas estão horriveis.
-
PROCURANDO PROJETO
Estou a procura de um projeto, ou alguém que queira iniciar um. Skype: [email protected]
-
Equipar item e ficar saindo efeito
* ñ precisa registra no login.lua pois este também é um evento do tipo login * crie dois arquivos com o mesmo script um para mão esquerda e outra para direita * o slot 2 que você colocou é para amuletos os slots das mãos são o 5 e o 6 5 = direita 6 = esquerda
-
Equipar item e ficar saindo efeito
local config = { effect = 10, -- id do efeito q ira aparecer no player slot = 6, -- slot que o item tem q ser equipado itemsId = {2525}, -- id dos item q sera equipado e fara o efeito delay = 1000 -- de quanto em quanto tempo sai o efeito } function effectInPlayer(cid, effect, delay, slot, itemsId) if not isCreature(cid) then return true end if isInArray(itemsId, getPlayerSlotItem(cid, slot).itemid) then doSendMagicEffect(getThingPos(cid), effect) end addEvent(effectInPlayer, delay, cid, effect, delay, slot, itemsId) end function onLogin(cid) return effectInPlayer(cid, config.effect, config.delay, config.slot, config.itemsId) end é do tipo creaturescripts \ onLogin