Ir para conteúdo
  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo

Fóruns

  • Portal Tibiaking
    • Portal
    • Server Oficial TibiaKing
    • Sobre o Fórum
    • Projetos Open Source
    • Regras
  • OTServer Tibia & Derivados
    • Suporte & Pedidos
    • OTServer Downloads
    • OTServer Scripts
    • Ferramentas OpenTibia
    • Linguagens de Programação
    • Mapas
    • Websites
    • Show Off
    • Gráficos e Design
    • Divulgações
  • Tibia e Bots
    • Tibia
    • Bots & Macro
  • Diversos
    • Playground (Off-topic)

Calendários

  • Calendário Oficial
  • Calendário de OTServs
  • Calendários Diversos

Categorias

  • Conteúdo da Comunidade
    • Sprites
    • Aplicações Web

Categorias

  • Articles

Blogs

Não há resultados

Product Groups

  • Advertisement

Encontrar resultados em...

Encontrar resultados que contenham...

Data de Criação

  • Início

    FIM

Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Encontrado 26 registros

  1. Olá TibiaKing! Esse script necessita um pouco mais de conhecimento, pois precisa adicionar códigos em C++ ao distro. O script adiciona você em uma espécie de fila, assim que a fila completar 5 pessoas, automaticamente um grupo é formado e as 5 pessoas são teleportadas para dentro da dungeon ou quest. Basicamente funciona assim: Player (Eu): /queue join Player (Outro): /queue join Player (Outro): /queue join Player (Outro): /queue join Player (Outro): /queue join Onde queue significa fila. Uma pequena demonstração Database (MySQL/PHPMyAdmin) CREATE TABLE `dungeon_finder` (`id` INT(8) AUTO_INCREMENT PRIMARY KEY, `player_id` INT(255)) Talkactions function onSay(cid, words, param, channel) if(param == "join") then query = db.getResult("SELECT * FROM `dungeon_finder` WHERE `player_id` = " .. getPlayerGUID(cid) .. "") if(getPlayerStorageValue(cid, CONFIG.DUNGEON_STORAGE) > 1) then if(getPlayerStorageValue(cid, CONFIG.DUNGEON_STORAGE) > os.time()) then doPlayerSendCancel(cid, "You can't join queue with deserter debuff.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end end if(CONFIG.AREA) then if(not(isInArea(getPlayerPosition(cid), (CONFIG.AREA).FROMPOS, (CONFIG.AREA).TOPOS))) then doPlayerSendCancel(cid, "You're not in required area to join the queue.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end end if(CONFIG.PZ_REQUIRED) then if(not(getTilePzInfo(getPlayerPosition(cid)))) then doPlayerSendCancel(cid, "You're not in protection zone to join the queue.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end end if(CONFIG.REQUIRED_LEVEL) then if(getPlayerLevel(cid) < CONFIG.REQUIRED_LEVEL) then doPlayerSendCancel(cid, "You don't have required level to join the queue. The minimum level to join the queue is " .. CONFIG.REQUIRED_LEVEL .. ".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end end if(CONFIG.SKULL) then if(getPlayerSkullType(cid) >= CONFIG.SKULL) then doPlayerSendCancel(cid, "Murderers are not allowed to join the queue.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end end if(CONFIG.IN_FIGHT) then if(getCreatureCondition(cid, CONDITION_INFIGHT)) then doPlayerSendCancel(cid, "You can't be in combat in order to join the queue.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end end if(isInParty(cid)) then doPlayerSendCancel(cid, "You can't join queue while you are in party group.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end if(query:getID() == 0) then doPlayerSendCancel(cid, "You are already listed in queue.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end db.executeQuery("INSERT INTO `dungeon_finder` SET `player_id` = " .. getPlayerGUID(cid) .. ";") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) doCreatureSay(cid, "You've beed queued in dungeon finder - random mode.", TALKTYPE_ORANGE_1) elseif(param == "remove") then query = db.getResult("SELECT * FROM `dungeon_finder` WHERE `player_id` = " .. getPlayerGUID(cid) .. "") if(query:getID() == -1) then doPlayerSendCancel(cid, "You are not listed in the queue.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end db.executeQuery("DELETE FROM `dungeon_finder` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") doCreatureSay(cid, "You've beed removed from queue.", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED) end return true end Globalevents local DUNGEONS = { [1] = {NAME = "Test dungeon", LEVEL = 30, POS = {x = 450, y = 357, z = 15}}, } local condition = createConditionObject(CONDITION_INFIGHT) setConditionParam(condition, CONDITION_PARAM_TICKS, 15000) function onThink(cid, interval) DUNGEON = DUNGEONS[math.random(1, table.maxn(DUNGEONS))] players = {} for i = 1, 1000 do if(table.maxn(players) == 5) then break end query = db.getResult("SELECT * FROM `dungeon_finder` WHERE `id` = " .. i .. ";") if(query:getID() > -1) then pid = getPlayerByName(getPlayerNameByGUID(query:getDataInt("player_id"))) if(getPlayerStorageValue(pid, CONFIG.DUNGEON_STORAGE) > 1) then return true end if(getPlayerLevel(pid) > DUNGEON.LEVEL and getPlayerLevel(pid) < DUNGEON.LEVEL + 50) then table.insert(players, getPlayerGUID(pid)) end query:free() end end if(table.maxn(players) == 5) then for i = 1, 5 do pid = getPlayerByName(getPlayerNameByGUID(players[i])) if(i == 1) then doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, "You were chosen to be a dungeon guide.") addEvent(doCreatureSay, 15200, pid, "You and your team were teleported to the " .. DUNGEON.NAME .. ".", TALKTYPE_ORANGE_1) for j = 2, 5 do lid = getPlayerByName(getPlayerNameByGUID(players[j])) doPlayerInviteToParty(pid, lid) end else doPlayerJoinParty(pid, getPlayerByName(getPlayerNameByGUID(players[1]))) end delay = 0 for i = 1, 15 do addEvent(doPlayerSendTextMessage, delay + 1000, pid, MESSAGE_STATUS_CONSOLE_BLUE, "A dungeon group for you has been found. You'll be teleported to the dungeon in " .. 15 - i .. " seconds.") delay = delay + 1000 end doAddCondition(pid, condition) addEvent(doTeleportThing, 15000, pid, DUNGEON.POS) addEvent(doSendMagicEffect, 15000, DUNGEON.POS, CONST_ME_TELEPORT) db.executeQuery("DELETE FROM `dungeon_finder` WHERE `player_id` = " .. players[i] .. ";") if(CONFIG.QUIT_POS) then setPlayerStorageValue(pid, 9001, getPlayerPosition(pid).x) setPlayerStorageValue(pid, 9002, getPlayerPosition(pid).y) setPlayerStorageValue(pid, 9003, getPlayerPosition(pid).z) end setPlayerStorageValue(pid, CONFIG.DUNGEON_STORAGE, 1) end end return true end CreatureEvents function onLogout(cid) query = db.getResult("SELECT * FROM `dungeon_finder` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(query:getID() == -1) then return true end db.executeQuery("DELETE FROM `dungeon_finder` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") return true end function onLeaveParty(cid) if(getPlayerStorageValue(cid, CONFIG.DUNGEON_STORAGE) == 1) then setPlayerStorageValue(cid, CONFIG.DUNGEON_STORAGE, -1) if(CONFIG.DESERTER_DEBUFF_TIME) then setPlayerStorageValue(cid, CONFIG.DUNGEON_STORAGE, os.time() + CONFIG.DESERTER_DEBUFF_TIME) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You've been marked with deserter debuff for " .. CONFIG.DESERTER_DEBUFF_TIME / 3600 .. " hour/s. For this time you can't join the queue again.") end TMP_POS = CONFIG.QUIT_POS and {x = getPlayerStorageValue(cid, 9001), y = getPlayerStorageValue(cid, 9002), z = getPlayerStorageValue(cid, 9003)} or getPlayerMasterPos(cid) doTeleportThing(cid, TMP_POS) doSendMagicEffect(TMP_POS, CONST_ME_TELEPORT) for i = 9001, 9003 do setPlayerStorageValue(cid, i, -1) end end return true end lib CONFIG = { AREA = false, -- if false then everyone can join queue everywhere, if you want certain area add AREA = {FROMPOS = {}, TOPOS = {}} PZ_REQUIRED = false, -- requirement of standing in pz, if you don't want it just set PZ_REQUIRED = false REQUIRED_LEVEL = 30, -- required level to join the queue, if you don't want it just set REQUIRED_LEVEL = false SKULL = 1, -- skull that is not acceptable while joining queue, if you want players join with skulls just set SKULL = false IN_FIGHT = true, -- if player is in fight he can't join the queue, IN_FIGHT = false to disable QUIT_POS = false, -- if you want player to go back to his previous position (from which he got teleported to the dungeon) set QUIT_POS = true, if set to false it'll teleport player to his temple DESERTER_DEBUFF_TIME = 1800, -- 60 = 1 min, 3600 = 1h DUNGEON_STORAGE = 9005 } C++ luascript.cpp int32_t LuaScriptInterface::luaDoPlayerJoinParty(lua_State* L) { //doPlayerJoinParty(cid, lid) ScriptEnviroment* env = getEnv();[/left] Player* leader = env->getPlayerByUID(popNumber(L)); if(!leader) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } Player* player = env->getPlayerByUID(popNumber(L)); if(!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } g_game.playerJoinParty(player->getID(), leader->getID()); lua_pushboolean(L, true); return 1; } Coloque: int32_t LuaScriptInterface::luaDoPlayerInviteToParty(lua_State* L) { //doPlayerInviteToParty(cid, pid) ScriptEnviroment* env = getEnv(); Player* leader = env->getPlayerByUID(popNumber(L)); if(!leader) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } Player* player = env->getPlayerByUID(popNumber(L)); if(!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } g_game.playerInviteToParty(player->getID(), leader->getID()); lua_pushboolean(L, true); return 1; } creatureevent.h Depois de: CREATURE_EVENT_PREPAREDEATH, Coloque: CREATURE_EVENT_LEAVEPARTY Depois de: bool playerLogout(Player* player, bool forceLogout); Coloque: uint32_t executeLeaveParty(Player* player); Depois de: uint32_t executePrepareDeath(Creature* creature, DeathList deathList); Coloque: uint32_t executeLeaveParty(Player* player); creatureevent.cpp Depois de: else if(tmpStr == "preparedeath") m_type = CREATURE_EVENT_PREPAREDEATH; Coloque: else if(tmpStr == "leaveparty") m_type = CREATURE_EVENT_LEAVEPARTY; Depois de: case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath"; Coloque: case CREATURE_EVENT_LEAVEPARTY: return "onLeaveParty"; Depois de: case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList"; Coloque: case CREATURE_EVENT_LEAVEPARTY: return "cid"; Depois da função: uint32_t CreatureEvent::executeFollow(Creature* creature, Creature* target)... Coloque: uint32_t CreatureEvent::executeLeaveParty(Player* player) { //onLeaveParty(cid) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); #ifdef __DEBUG_LUASCRIPTS__ std::stringstream desc; desc << player->getName(); env->setEventDesc(desc.str()); #endif env->setScriptId(m_scriptId, m_interface); env->setRealPos(player->getPosition()); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); bool result = m_interface->callFunction(1); m_interface->releaseEnv(); return result; } else { std::cout << "[Error - CreatureEvent::executeAdvance] Call stack overflow." << std::endl; return 0; } } game.cpp Mude: bool Game::playerLeaveParty(uint32_t playerId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; if(!player->getParty() || player->hasCondition(CONDITION_INFIGHT)) return false; return player->getParty()->leave(player); } Para: bool Game::playerLeaveParty(uint32_t playerId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; if(!player->getParty() || player->hasCondition(CONDITION_INFIGHT)) return false; CreatureEventList leavePartyEvents = player->getCreatureEvents(CREATURE_EVENT_LEAVEPARTY); for(CreatureEventList::iterator it = leavePartyEvents.begin(); it != leavePartyEvents.end(); ++it) (*it)->executeLeaveParty(player); return player->getParty()->leave(player); } E é isso galera, o local da quest pode ser mudado/adicionado no GlobalEvent, mais uma maravilha do Teckman Depois de: //doPlayerJoinParty(cid, lid) lua_register(m_luaState, "doPlayerJoinParty", LuaScriptInterface::luaDoPlayerJoinParty); Coloque: //doPlayerInviteToParty(cid, pid) lua_register(m_luaState, "doPlayerInviteToParty", LuaScriptInterface::luaDoPlayerInviteToParty); Depois de:
  2. Opa galera! Essa foi uma ideia que tive já que tava afim de mexer com o banco de dados, você posta notícias no site pelo jogo. Super flexível (: Pra usar você tem que usar gesior, se não meu amigo, não vai funcionar e vai bugar :x Primeiramente crie um arquivo em talkactions/scripts chamado gesiorTicker.lua (é de suma importância que o nome seja este) E coloque o código a seguir: -- (Gesior) Posting new Ticker in Game by Talkaction -- Author: Renato Ribeiro -- Url: www.tibiaking.com function onSay(cid, words, param, channel) if (param==nil) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Necessário um Post.") else return db.executeQuery("INSERT INTO `z_news_tickers` (`date`, `author`, `image_id`, `text`, `hide_ticker`) VALUES ('".. os.time() .."', '1', '0', '".. param .."', '0');") end end [/code] Em seguida vá no arquivo[b] talkactions/talkactions.xml[/b] E adicione: [code]<talkaction access="5" words="/ticker" event="script" value="gesiorTicker.lua"> Para adicionar um novo ticker, basta no god dizer /ticker Notícia aqui Atenção! Peço que se der erros avisar aqui. Script NãO testado. Abraços galera!
  3. Bem pessoal, pensei que uma action dessa ia deixar o servidor de vocês com mais RPG, então resolvi botar a ideia para funcionar. - Para que serve? Para o seu servidor ficar com mais RPG, serve para quest mais elaboradas - Como funciona? Você instala a quest e a action no seu servidor, depois para passar na porta, o player ira precisar da chave, quando ele der use, a porta vai se abrir e ficar aberta, quando ele der use denovo a porta irá se fechar e ficar trancada. - Qual a vantagem disso? Na verdade, quase nenhuma, pois só vai trazer mais RPG para o seu servidor se você tiver criatividade para usa-la, alguns players valorizam isso. - Como "instalo" no meu servidor ? Simples, vamos adicionar dois scripts em \data\actions\script e adicionar duas linhas em \data\actions\actions.xml Vamos lá Instalação data\actions\scripts\portas.lua function onUse(cid, item, fromPosition, itemEx, toPosition) local doors = {[5098]={id=5100}, [5099]={id=5100}, [5101]={id=5102}, [5107]={id=5109}, [5108]={id=5109}, [5110]={id=5111}} local config = { actionid = 1221, -- Uma action normal, só para a portar nao abrir. keyaid = 1222 -- A action que deve ter na key } for i, x in pairs(doors) do if ((itemEx.itemid == i) and (itemEx.actionid == config.actionid) and (item.actionid == config.keyaid)) then doTransformItem(itemEx.uid, x.id) doItemSetAttribute(itemEx.uid, "aid", 0) elseif (itemEx.itemid == x.id) and (itemEx.actionid == 0) and (item.actionid == config.keyaid) then doTransformItem(itemEx.uid, i) doItemSetAttribute(itemEx.uid, "aid", config.actionid) elseif (itemEx.itemid == i) and (itemEx.actionid == 0) and (item.actionid == config.keyaid) then doTransformItem(itemEx.uid, i) doItemSetAttribute(itemEx.uid, "aid", config.actionid) end end return TRUE end data\actions\actions.xml <action itemid="IDdeUmaChave" event="script" value="portas.lua" /> Agora uma quest para ganhar a chave que abre a porta. data\actions\scripts\darkey.lua function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { storage = 3235, -- Uma storage, se quiser nao precisa modificar keyID = 2088, -- ID de uma chave, você pode trocar. aid = 1222, -- ActionID, tem que ser o mesmo do script acima. } if getPlayerStorageValue(cid, config.storage) == -1 then local item = doPlayerAddItem(cid, config.keyID,1) if item then doItemSetAttribute(item, "aid", config.aid) setPlayerStorageValue(cid, config.storage, 1) doPlayerSendCancel(cid, "Você recebeu uma key") end else doPlayerSendCancel(cid, "Desculpe, mais você ja fez essa quest") end end data\actions\actions.xml <action actionid="7777" event="script" value="darkey.lua" /> " Lembrando que o bau, ou qualquer outra coisa, deve conter o action id = 7777 " Se você preferir, aqui tem um NPC que vende a mesma key que é pega na quest. data/npc/Diog.xml <?xml version="1.0"?> <npc name="Diog" script="data/npc/scripts/diog.lua" walkinterval="7000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="76" body="96" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|! Eu vendo keys, Diga {keys} para saber quais eu vendo e o valor delas." /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="keys" /> <parameter key="keyword_reply1" value="Eu vendo {Key Quest Editada} por 1000 gps." /> </parameters> </npc> data/npc/scripts/diog.lua 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 keys = { ["Key Quest Editada"] = {id_key = 2088, price = 1000, action_id = 1222}, } local m = keys[msg] if (not m) then selfSay("Eu não vendo esta key ", cid) return FALSE end if doPlayerRemoveMoney(cid, m.price) == TRUE then a = doPlayerAddItem(cid, m.id_key, 1) doItemSetAttribute(a, "aid", m.action_id) selfSay("Obrigado, aqui esta sua key", cid) talkState[talkUser] = 0 else selfSay(" Você não tem ".. m.price.." gps para comprar ", cid) talkState[talkUser] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Configuração Como você viu, eu nao adicionei todas as portas no script portas.lua, então só iram funcionar em um tipo. Nao adicionei porque sou preguiçoso, então para você adicionar é simples. Só seguir esses parametros [iDPortaFechada]={id=IDPortaAberta}, e adicionar em local doors = {} Agora para adicionar mais keys para o npc vender, é muito simples tambem, Só você adicionar mais linhas em local keys, Siga os parametros ["NomeQueOPlayerTemQueFalar"] = {id_key = IDDaKey, price = PreçoDaKey, action_id = 1222}, E mudar para quando o player falar com o npc: <parameter key="keyword_reply1" value="Eu vendo {Key Quest Editada} por 1000 gps e {NomeQueOPlayerTemQueFalar} por 122 gps." /> Script bem facil que eu fiz, qualquer duvida só falar comigo, Até mais.
  4. me confundi só por causa do nome do script alguem porfavor move para actions. Bem pessoal esse era um sistema de lenhador, mas eu dei uma modificada eu transformei ele ne um script de mining, antes de falarem qualquer coisa, eu tive autorização do autor para modificar o script. Nivel Máximo Padrão = 100 - Ganhos Por Nivel- Esse sistema conta com mensagem de avanço de nivel ou seja, você passou do nivel 10 pro 11 mostra o seguinte: "You advanced from level 10 to level 11 in mining." Delay, esse delay(atraso) funciona da seguinte forma, ao quebrar a rocha ela se torna um "destroço de pedra" e ao passar 480 segundos(pode ser modificado) a rocha volta. OBS: Deixei o Delay pois ficaria dificil o player esperar o Server Save para achar mais rochas caso o servidor seja pequeno. Oque o player ganha ao quebrar as rochas? Ele ganha Gold Nuggets(configuravel) Instalação: Abra a pasta data/actions/script e adicione isso em um arquivo lua (Sugestão: mining.lua) ------------------------------------------------------ -- Script by: Lwkass -- Mod: Vittu -- Version: 2.0 -- Tested in: TFS 0.4 --------------------------- -- Configurations -- --------------------------- local STORAGE_SKILL_LEVEL = 10002 local STORAGE_SKILL_TRY = 10003 local config = { levels = { {level = {0,9}, quant = {1,2}, percent = 5}, {level = {10,19}, quant = {2,4}, percent = 10}, {level = {20,29}, quant = {3,6}, percent = 15}, {level = {30,39}, quant = {4,8}, percent = 20}, {level = {40,49}, quant = {5,10}, percent = 25}, {level = {50,59}, quant = {6,12}, percent = 30}, {level = {60,69}, quant = {7,14}, percent = 30}, {level = {70,79}, quant = {8,16}, percent = 35}, {level = {80,89}, quant = {9,18}, percent = 35}, {level = {90,99}, quant = {10,20}, percent = 40}, {level = {100}, quant = {11,22}, percent = 50} }, rocks = {1356, 1285, 3607, 3616}, -- Id das rochas que podem ser quebradas stones = {}, -- Modelo = {rock_id, rock_id} default_stone = 2157, -- pedra padrão rock_delay = 480, -- Tempo de volta da rocha (Em segundos) bonus_chance = 3, -- Chance (em porcentagem) de se conseguir um bonus de exp bonus_exp = 1 -- Bonus extra } ------------------------------------ -- END Configurations --- ------------------------------------ function getMiningLevel(cid) return getPlayerStorageValue(cid, STORAGE_SKILL_LEVEL) end function setPlayerMiningLevel(cid, n) setPlayerStorageValue(cid, STORAGE_SKILL_LEVEL, n) end function addMiningLevel(cid, n) setPlayerMiningLevel(cid, getMiningLevel(cid) + (isNumber(n) and n or 1)) setMiningTry(cid, 0) end function getMiningInfo(cid) for i = 1, #config.levels do min = config.levels[i].level[1]; max = config.levels[i].level[2] if (getMiningLevel(cid) >= min and getMiningLevel(cid) <= max) then return {quantity = {min = config.levels[i].quant[1], max = config.levels[i].quant[2]}, chance = config.levels[i].percent} end end end function getStoneByRock(rockid) for i = 1, #config.stones do if (config.stones[2] == rockid) then return config.stones[1] end end return config.default_stone end function getMiningTries(cid) return getPlayerStorageValue(cid, STORAGE_SKILL_TRY) end function setMiningTry(cid, n) setPlayerStorageValue(cid, STORAGE_SKILL_TRY, n) end function addMiningTry(cid, bonus) setMiningTry(cid, getMiningTries(cid) + 1 + (bonus and config.bonus_exp or 0)) if (getMiningTries(cid) >= getMiningExpTo(getMiningLevel(cid))) then -- Up doPlayerSendTextMessage(cid, 22, "You advanced from level " .. getMiningLevel(cid) .. " to level ".. (getMiningLevel(cid) + 1) .." in mining.") if ((getMiningLevel(cid)+1) == getMiningMaxLevel()) then doPlayerSendTextMessage(cid, 22, "Max level reached in mining.") end addMiningLevel(cid) doSendMagicEffect(getCreaturePosition(cid), math.random(28,30)) setMiningTry(cid, 0) end end function getMiningExpTo(level) return ((level*1.5)+((level+1)*7)) end function getMiningMaxLevel() return config.levels[#config.levels].level[#config.levels[#config.levels].level] end --------------------------- function onUse(cid, item, fromPosition, itemEx, toPosition) rock = { id = itemEx.itemid, uid = itemEx.uid, position = toPosition } player = { position = getCreaturePosition(cid) } if (getMiningLevel(cid) < 0) then setPlayerMiningLevel(cid, 0) end if (isInArray(config.rocks, rock.id)) then addMiningTry(cid) if (math.random(1,100) <= getMiningInfo(cid).chance) then local collected = math.random(getMiningInfo(cid).quantity.min, getMiningInfo(cid).quantity.max) doPlayerAddItem(cid, getStoneByRock(rock.id), collected) doPlayerSendTextMessage(cid, 22, "You got " .. collected .. " gold" .. (collected > 1 and "s" or "") .. " nuggets.") if (math.random(1,100) <= config.bonus_chance) then -- Bonus calc addMiningTry(cid, true) doSendAnimatedText(player.position, "Bonus!", COLOR_ORANGE) end event_rockCut(rock) else if (math.random(1,100) <= (10-getMiningInfo(cid).chance/10)) then doPlayerSendTextMessage(cid, 22, "You got nothing.") event_rockCut(rock) else doSendMagicEffect(rock.position, 3) doSendAnimatedText(rock.position, "Poff!", COLOR_GREEN) end end else doPlayerSendCancel(cid, "This can't be cut.") end end function event_rockCut(rock) addEvent(event_rockGrow, config.rock_delay * 1000, rock.position, rock.id) doTransformItem(rock.uid, 3610) doSendMagicEffect(rock.position, 3) doSendAnimatedText(rock.position, "Tack!", COLOR_GREEN) doItemSetAttribute(rock.uid, "name", "A trunk of " .. getItemNameById(rock.id)) end function event_rockGrow(rockPos, old_id) local rock = getThingFromPos(rockPos).uid doTransformItem(rock, old_id) doItemSetAttribute(rock, "name", getItemNameById(old_id)) doSendMagicEffect(rockPos, 3) end --Lumberjack 2.0 by: Lwkass <action itemid="id_do_item" script="mining.lua"/> id_do_item: coloque o id do item que deseja para quebrar as rochas, eu aconselho a usar a pick. Id da pick: 2553 Obrigado. Adicione essa linha no actions.xml
  5. Olá a todos! Estou aqui para mostrar um script aonde será bem útil a servidores de Pokémon. Não é nada mais do quem um SHOP in-game. Como assim? Com estes 3 comandos será possível comprar Revives, Hyper Potions, Ultra Balls, trocar de nome pelo jogo e até mesmo comprar o Ditto. Detalhe o tipo de moeda que utilizei foi Small Diamonds, caso queria modificar leia passo a passo. Como se percebe, a maioria de servidores hoje em dia vende apenas estes items e outros, mais esses são os padrões. Chega de enrolação e vamos direto ao script. Changename Script: Primeiramente crie um arquivo em otserv/talkactions/scripts chamado changename.lua e adicione isso em seu arquivo. (Este script serve para modificar o nome do jogador pelo jogo). -- Creditos a Doughell function onSay(cid, words, param) local maxLen = 15 -- tamanho maximo do nome local itemid = 2145 ------ Numero do Item que ser&#225; removido local proibido = [{"!","@","*"}-- simbolos proibidos for i = 1, #proibido do if string.find(tostring(param), proibido[i]) then doPlayerSendCancel(cid,"[AUTO SHOP] You can not use symbols in their name.") return TRUE end end if tostring(param) == "" then -- checkar se n&#227;o &#233; nome vazio doPlayerSendCancel(cid, "[AUTO SHOP] Choose a name to make the change of his surname.") return TRUE end if string.len(tostring(param)) > maxLen then doPlayerSendCancel(cid, "[AUTO SHOP] You can use a maximum of " .. maxLen .. " letters.") return TRUE end if not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendCancel(cid,"[AUTO SHOP] Can only be used in Protection Zone.") return TRUE end if getPlayerItemCount(cid, itemid) >= 1 then doPlayerRemoveItem(cid, itemid, 5) db.executeQuery("UPDATE `players` SET `name` = '"..param.."' WHERE `id` = "..getPlayerGUID(cid)..";") doPlayerSendTextMessage(cid,25,"[AUTO SHOP] You will be logged out in 5 seconds for the changes to be made.") addEvent(doRemoveCreature, 5*1000, cid, true) else doPlayerSendCancel(cid,"[AUTO SHOP] You don't have " .. getItemNameById(itemid) .. " to make the purchase of changename.") end return TRUE end Agora em talkactions.xml adicione em Players: <talkaction words="!changename" event="script" value="changename.lua"/> -- Explicação do Script (Changename): local maxLen = 15 -- tamanho maximo do nome O número 15 e a quantidade máxima de caracteres que poderá ser utilizado na troca de nome. local itemid = 2145 ------ Numero do Item que será removido Este e o ID do item que será removido, no caso do 2145 e Small Diamonds (moeda principal do PokeXGames). Aconselho a usar Small Diamonds. local proibido = {"!","@","*"} -- simbolos proibidos Estes e os símbolos proibidos, caso queria adicionar mais faça o seguinte: {"!","@","*","?"} adicionando dessa seguinte maneira: ,"?"} Ditto Script: Crie um arquivo em otserv/talkactions/scripts com o nome de ditto2.lua e adicione isso em seu arquivo: (Este script serve para adicionar a caixa do Ditto no jogador). function onSay(cid,words,param) if doPlayerRemoveItem(cid,2145,10) == TRUE then doPlayerAddItem(cid,1738,1) doCreatureSay(cid,"[AUTO SHOP] You bought your Pokemon Ditto, it cost 10 diamonds.",TALKTYPE_ORANGE_1) else doCreatureSay(cid,"[AUTO SHOP] You do not have two diamonds to make the purchase.",TALKTYPE_ORANGE_1) end end Agora em talkactions.xml adicione em Players: <talkaction words="!buyditto" event="script" value="ditto2.lua"/> A segunda parte do script você precisa ir otserv/actions/scripts crie um arquivo chamado ditto_.lua e adicione o seguinte: (Este script serve para o id da caixa ser usado para conseguir o Ditto) function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 15215) <= 100 then doPlayerSendTextMessage(cid, 20,"[AUTO SHOP] Thank donations.") setPlayerStorageValue(cid, 15215, 1) local pox = getTownTemplePosition(1) local health = 325 local maxhealth = 325 local description = "Contains a Ditto." local poke1 = "This is Ditto's pokeball. HP = ["..health.."/"..maxhealth.."]" item = doCreateItemEx(2219) doItemSetAttribute(item, "poke", poke1) doItemSetAttribute(item, "nome", "Ditto") doItemSetAttribute(item, "apelido", "Ditto") doItemSetAttribute(item, "description", description) doPlayerAddItemEx(cid, item, true) doTransformItem(item, 2222) doPlayerSendTextMessage(cid, 27, "[AUTO SHOP] You just get the Pokemon Ditto.") doPlayerSendTextMessage(cid, 27, "Do not forget to donate this item has a cost of 10 diamonds, and you can not get this Pokemon through quests / npcs / catchs.") doTeleportThing(cid, pox) doSendMagicEffect(pox, 21) doPlayerAddSoul(cid, 1) doPlayerRemoveItem(cid,1738,1) setPlayerStorageValue(cid, 54842, "Ditto, ") return TRUE else doPlayerSendTextMessage(cid, 20, "Have you got this Pokemon.") end end Agora em actions.xml adicione: <action itemid="1738" event="script" value="ditto_.lua"/> -- Explicação do Script (Ditto): PARTE DAS TALKACTIONS if doPlayerRemoveItem(cid,2145,10) == TRUE then O número 2145 e o id da Small Diamonds, já o número 10 e a quantidade de Small Diamonds que precisa para comprar o Ditto. doPlayerAddItem(cid,1738,1) O número 1738 e o id da box, caso modificar este número modifique tambem em actions.xml! PARTE DAS ACTIONS doSendMagicEffect(pox, 21) O número 21 e o número do efeito que vai ser utilizado ao abrir a box, pode ser modificado em qual você preferir. doPlayerAddSoul(cid, 1) Será adicionado 1 de soul, como se fosse 1 de catch (dependendo de alguns servidores) se preferir retire a linha inteira. doPlayerRemoveItem(cid,1738,1) Este e o id da box, caso você muda-lá na talkactions, e na actions.xml mude aqui tambem. Kit Script: Crie um arquivo em otserv/talkactions/scripts chamado kit.lua e adicione isso dentro dele: (Este script serve para receber Revives, Ultra Balls e Hyper Potions). function onSay(cid,words,param) if doPlayerRemoveItem(cid,2145,2) == TRUE then doPlayerAddItem(cid,2269,100) doPlayerAddItem(cid,2275,100) doPlayerAddItem(cid,2146,100) doCreatureSay(cid,"[AUTO-SHOP]: You just buy ultra ball 100x, 100x revive and 100x hyper potion. All this will cost 2 diamonds!",TALKTYPE_ORANGE_1) else doCreatureSay(cid,"[AUTO-SHOP]: You do not have two diamonds to make the purchase.",TALKTYPE_ORANGE_1) end end Agora em talkactions.xml adicione: <talkaction words="!buykit" event="script" value="kit.lua"/> -- Explicação do Script (Kit): if doPlayerRemoveItem(cid,2145,2) == TRUE then O id 2145 e o Small Diamonds e o número 2 e a quantidade que será retirada para a realização da compra do kit. doPlayerAddItem(cid,2269,100) O id 2269 e o da Ultra Ball e o número 100 e a quantidade que o player receberá de Ultra Balls. doPlayerAddItem(cid,2275,100) O id 2275 e o do Revive, e o número 100 e a quantidade que o player receberá de Revives. doPlayerAddItem(cid,2146,100) O id 2146 e o da Hyper Potion, e o número 100 e a quantidade que o player receberá de Hyper Potions. Bom, estes são os scripts prometido, mas se alguém quiser coloca outras talkactions como a !buykit vou colocar abaixo o que poderam usar de base: function onSay(cid,words,param) if doPlayerRemoveMoney(cid,10000) == TRUE then doPlayerAddItem(cid,2173,1) doCreatureSay(cid,"Mensagem que ele conseguiu comprar o item.",TALKTYPE_ORANGE_1) else doCreatureSay(cid,"Mensagem quando n&#227;o possui dinheiro ou diamantes suficientes.",TALKTYPE_ORANGE_1) end end if doPlayerRemoveMoney(cid,10000) == TRUE then Essa função diz que irá remover 10k para comprar o item, se você quiser que remova outra coisa por exemplo um shield você adiciona a seguinte função no lugar dessa: doPlayerRemoveItem(cid,1738,1) ficando assim: doPlayerRemoveItem(cid,1738,1) = TRUE then O id do shield você modifica no 1738 e a quantidade no número 1. doPlayerAddItem(cid,2173,1) Esas função adiciona o item e a quantidade no jogador, exemplo: 2173 e o ID do item, e o número 1 e a quantidade só modificar do seu gosto. O que você pode adicionar em um script? Efeitos, para adicionar um efeito basta colocar essa função: doSendMagicEffect(getThingPos(cid), 132) O número 132 e o número do efeito, para pesquisar mais procure pelo jogo no GOD o seguinte: /z 1, /z 2, /z 3 até o seu limite. É isso ai galera, qualquer dúvida postem ou dêem sujestões! Detalhe: as cores nos scripts foram retiradas por bug, em outra hora adicionarei novamente!
  6. Bom esse é outro simples script, vai renovar sua soft boots e firewalker boots quando vc clicar nelas. recarregar.lua boots = { [10021] = {money = 20000, new = 2640}, [10022] = {money = 40000, new = 9932} } function onUse(cid,item) if not boots[item.itemid] then return false elseif not doPlayerRemoveMoney(cid, boots[item.itemid].money) then return doPlayerSendCancel(cid, "Voc&#234; precisa ter "..boots[item.itemid].money.." gps para regarregar sua bota.") end doRemoveItem(item.uid, 1) doPlayerAddItem(cid, boots[item.itemid].new, 1) doSendMagicEffect(getCreaturePosition(cid), 12) doPlayerSendTextMessage(cid, 22, "Voc&#234; renovou sua "..getItemNameById(boots[item.itemid].new)..".") end Actions.xml <action itemid="10021;10022" event="script" value="recarregar.lua"/>
  7. Esse é um script feito para quando o player usar um amuleto o EXP Rate dele aumente e fique 4x. Funciona mesmo se você morrer. Vá até data > actions > actions.xml e adicione a tag: <action itemid="6527" event="script" value="expamulet.lua"/> Vá até data > actions > scripts e crium arquivo "expamulet.lua" com isto: local config = { rate = 3, -- 4x mais experience time = 5, -- Tempo em horas que funcionar o amuleto storage = 20012 } local function endExpRate(cid) if isPlayer(cid) == TRUE then doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate setPlayerStorageValue(cid, config.storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.") end end function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, config.storage) < 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your extra experience rate is now: " .. config.rate .. ". It will last for ".. config.time .." hours.") doPlayerSetRate(cid, SKILL__LEVEL, config.rate) setPlayerStorageValue(cid, config.storage, os.time() + config.time * 3600) addEvent(endExpRate, config.time * 3600 * 1000, cid) doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You still have extra experience time left.") end return TRUE end Créditos: XouruS Você gostou deste conteúdo!? Este conteúdo te ajudou!? Isso será realmente útil pra você!? Então, se possível, faça uma doação (de qualquer valor) que estará me ajudando também!
  8. Nome: Comprar skill/magic level Versão testada: TFS 0.3.6pl1 / 0.4 / 0.3.7 Créditos: fireelement Exemplo de uso: !comprar club !comprar magiclevel Vá em data/talkactions/talkactions.xml e adicione essa tag: <talkaction words="!comprar;/comprar" event="script" value="comprar.lua"/> Agora vá em data/talkactions/scripts/ e crie um arquivo com o nome comprar.lua e cole isso nele: local config = { protectZone = "sim", -- Precisa estar em PZ para usar o comando? skill = { item = 9971, -- Item removido quantidade = 10, -- Quantidade quantidadeskill = 10, -- Skill adicionada limiteskill = 350 -- Limite }, magicLevel = { item = 9971, -- Item removido quantidade = 15, -- Quantidade quantidademl = 5, -- Magic level adicionado limitedeml = 200 -- Limite }, skillID = { -- ID das skills ["club"] = SKILL_CLUB, ["sword"]= SKILL_SWORD, ["axe"] = SKILL_AXE, ["distance"] = SKILL_DISTANCE, ["shielding"] = SKILL_SHIELD }, vocationSkill = { -- Vocações que pode comprar x skill ["club"] = {4, 8}, ["sword"] = {4, 8}, ["axe"] = {4, 8}, ["distance"] = {3, 7}, ["shielding"] = {4, 8} }, vocationMagicLevel = {1, 2, 5, 6}, -- Vocações que pode comprar magic level delay = { skill = { storage = 45, duration = 5 -- Tempo para comprar skill novamente }, magicLevel = { storage = 97, duration = 5 -- Tempo para comprar magic level novamente } } } function onSay(cid, words, param, channel) if config.protectZone == "sim" and not getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "Você precisa estar em protection zone para comprar.") end if param == "magiclevel" then if getPlayerMagLevel(cid) < config.magicLevel.limitedeml then if isInArray(config.vocationMagicLevel, getPlayerVocation(cid)) then if doPlayerRemoveItem(cid, config.magicLevel.item, config.magicLevel.quantidade) then if (os.time() - getPlayerStorageValue(cid, config.delay.magicLevel.storage)) >= config.delay.magicLevel.duration then setPlayerStorageValue(cid, config.delay.magicLevel.storage, os.time()) doRemoveCreature(cid, true) local playerId = getPlayerGUID(cid) db.executeQuery("UPDATE `players` SET `maglevel` = `maglevel` + " .. config.magicLevel.quantidademl .. " WHERE `id` = " .. playerId) else doPlayerSendCancel(cid, "Espere " .. config.delay.magicLevel.duration .. " segundos para comprar novamente.") end else doPlayerSendCancel(cid, "Você não tem o item requerido.") end else doPlayerSendCancel(cid, "Voce não pode comprar magic level.") end else doPlayerSendCancel(cid, "Você chegou no limite de magic level.") end elseif config.skillID[string.lower(param)] then if getPlayerSkill(cid, config.skillID[string.lower(param)]) < config.skill.limiteskill then if isInArray(config.vocationSkill[string.lower(param)], getPlayerVocation(cid)) then if doPlayerRemoveItem(cid, config.skill.item, config.skill.quantidade) then if (os.time() - getPlayerStorageValue(cid, config.delay.skill.storage)) >= config.delay.skill.duration then setPlayerStorageValue(cid, config.delay.skill.storage, os.time()) doRemoveCreature(cid, true) local playerId = getPlayerGUID(cid) db.executeQuery("UPDATE `player_skills` SET `value` = `value` + " .. config.skill.quantidadeskill .. " WHERE `player_id` = " .. playerId .. " and `skillid` = " .. config.skillID[string.lower(param)]) else doPlayerSendCancel(cid, "Espere " .. config.delay.skill.duration .. " segundos para comprar novamente.") end else doPlayerSendCancel(cid, "Você não tem o item requerido.") end else doPlayerSendCancel(cid, "Voce não pode comprar este skill.") end else doPlayerSendCancel(cid, "Você chegou no limite de skill.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Possíveis parâmetros: club, sword, axe, distance, shielding, magiclevel.") end return true end
  9. Esse script é para aquele OTserver que pode bugar o NPC para comprar itens, um deles é o de potion. Então eu resolvi criar esse script, mais ele nao é novidade, você ja deve ter visto. - Para que serve? Hora, para vender itens, e nao se preocupar se alguem vai bugar o seu OT, pode ser tanto runas, potions e etc... - Como eu faço para ter em meu servidor? Basta adicionar o actionID 7004 numa alavanca, e depois adicionar os script em data\actions\scripts e actions.xml alavancasell.lua local config = { money = 1000, -- Dinheiro que vai custar item = 7618, -- ID do item que vai vender count = 20, -- Quantidade } function onUse(cid, item, fromPosition, itemEx, toPosition) pos = getCreaturePosition(cid) if item.itemid == 1945 then if doPlayerRemoveMoney(cid, config.money) == TRUE then doPlayerAddItem(cid, config.item, config.count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Você acaba de comprar "..config.count.." "..getItemNameById(config.item)..".") doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Desculpe, mais você nao tem dinheiro suficiente.") doSendMagicEffect(pos, CONST_ME_POFF) end end end actions.xml <action actionid="7004" event="script" value="alavancasell.lua"/> É isso galera, esse script simples que salva vidas Abraços...
  10. Nome: Advanced Auction House v1.0 Autor: josejunior23 Server testado: Real Server 8.60 Como funciona? A ideia é do WoW(World of Warcraft), o Auction-House, que você poe lá items, e espera que outro jogador o compre caso ninguém compre, ele será removido apos X dias. Comandos: !auction-sell itemname, ammount, price - para adicionar um item a lista de ofertas. !auction-buy OfferID - para comprar item pelo OfferID !auction-find itemname - para procurar ofertas pelo nome do item !auction-del OfferID - para apagar uma oferta feita por você !auction-info OfferID - para mostrar info sobre uma oferta pelo OfferID !auction-list - mostrar uma lista completa com os items. !auction-list PLAYER_NAME - mostra uma lista com os items de PLAYER_NAME !auction-cmd - mostra uma lista com todos os comandos. !auction-clean - apagara todas as ofertas com a mesma data de quem usar o comando.(access 3+) !auction-clean 01/01/11 - apagara todas as ofertas com a data 01/01/11 que você pode mudar(access 3+) !auction-balance - ver a quantidade de dinheiro que tem em sua Auction-house !auction-withdraw - para pegar seu dinheiro Informações: - Os items são guardado em um ficheiro .txt e não em uma database. - os items ficam guardados assim: 01/01/11 3031 2000 10 2 data, item, preço, quantidade, guid do player 1º - cria um ficheiro XML na pasta mods chamado ADVANCED-AUCTION-HOUSE, e poe isso dentro: 2º - crie um ficheiro .LUA na pasta mods/scripts chamado AAH e poe isso dentro: 3º - cria um ficheiro .txt na pasta do seu server(onde fica o .exe), chamado houseItems, que ficara -> houseItems.txt Algumas imagens do sistema: Créditos: 100% Saymon 14
  11. Bom, se você ja jogou OTserver baiak, então provavelmente você ja deve ter visto essa talkaction Ela é bem simples, a função dela é quando alguem digitar !addon parametro, vai adicionar o addon a pessoa AddonDoll.lua female = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["nobleman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}} male = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}} msg = {"Addon nao encontrado!", "Voce n&#227;o tem o Addon Doll!", "Falta parametros!", "Voc&#234; recebeu seu addon!"} -- Mensagems itemID = 2112 -- ITEM function onSay(cid, words, param)if (not isPremium(cid)) then doPlayerSendCancel(cid, "Desculpe, apenas jogadores premium account podem comprar addons!.") return TRUE end if(getPlayerItemCount(cid, itemID) > 0) then if(param ~= "" and male[param] and female[param]) then doPlayerRemoveItem(cid, 2112, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) if(getPlayerSex(cid) == 0)then doPlayerAddOutfit(cid, female[param][1], 3) else doPlayerAddOutfit(cid, male[param][1], 3) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2]) end end Talkactions.xml <talkaction words="!addon" script="AddonDoll.lua"/> Qualquer duvida relacionada ao script, pergunte!
  12. Nome do Script: Stamina Doll Autor: Não sei o autor, pois foi um amigo meu que me passou! Testado em: Styller 8.6 É um script simples e util, bom para servidores com mapa Global com site. Instalando: Vá em ...data/actions/scripts, e crie um arquivo chamado stamina-refuel.lua e cole isto dentro: Código: function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") elseif(not isPremium(cid)) then doPlayerSendCancel(cid, "You must have a premium account.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") doRemoveItem(item.uid) end return true end Em actions cole a seguinte tag: Código: <action itemid="ID DO SEU DOLL AQUI" script="stamina-refuel.lua"/> Onde está "ID DO SEU DOLL AQUI", coloque o número do doll que você deseja. Geralmente utilizam Santa Doll ou Nightmare Doll. *6512 *11138 Grato!
  13. eae pessoal vim trazer esse script pro Tibia king e nao sei se voces vao gosta mais nao custa nada tenta agrada um sistema de refinamento usado em muitos ots,porém esse coloquei umas modificações e passei para portugês. Vamos lah... primeiro abra o bloco de notas e cole isso: Agora salve ele como upgrade.lua na pasta scripts agora em actions.xml adicione essa linha <action itemid="8306" script="upgrade.lua"/>[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] e pronto seu script esta feito!!! mudanças: * Script atualizado para português * diminuido a chance de sucesso do upgrade(se nao todos no ot vai ter os itens fortes) * almentado os pontos que ganha quando o upgrade tem sucesso * almentado os pontos que perde quando o upgrade falha * em maxlvl = 10 , coloque qualquer numero que voce quizer espero que vocês gostem do novo script créditos 98% para Mock 2 % para min pelas mudanças. atualizado e antes de posta aki pedi permissao do Mock __________________________________________ Nao custa nada da +REP xD
  14. Bom galera, tava sem nada para fazer aqui, e resolvi criar uma action muito simples, mais que tem gente que ainda procura... - Oque ela faz? Ela remove uma pedra que esta em um lugar X, e se usar a alavanca denovo.. a pedra é criada novamente. - Para que isso serve? Pode ser usados em servers de war, em quest's com rpg e etc... - Como eu 'instalo' isso em meu servidor? Muito simples, siga os passos... 1. Vá para a pasta data\actions\scripts e crie um arquivo lua chamado alavanca, depois bote isso dentro: function onUse(cid, item, toPosition) rock1pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} -- Posição da Pedra getrock1 = getThingfromPos(rock1pos) UniID = 3331 -- UniqueID que vai ser adicionado na alavanca rockID = 1304 -- ID da pedra if item.uid == UniID and item.itemid == 1945 and getrock1.itemid == rockID then doRemoveItem(getrock1.uid, 1) doTransformItem(item.uid, item.itemid+1) doSendMagicEffect(rock1pos, 2) elseif item.uid == UniID and item.itemid == 1946 then doCreateItem(rockID, 1, rock1pos) doTransformItem(item.uid,item.itemid-1) doSendMagicEffect(rock1pos, 13) end return TRUE end 2. Adicione esse tag em actions.xml : <action uniqueid="3331" script="alavanca.lua"></action> Só isso galerinha, é um script simples que eu fiz para passar o tempo!. Abraços..
  15. Bom o script não é de minha autoria. Só vou postar e orientar vocês a importalos. Primeiramente vamos começar com o !buypremium. Abra um bloco de notas vazio e cole esse script : Aqui você irá alterar o preço desejavel para o seu servidor : (cid, 10000) Agora salve isso em seu servidor/data/talkactions/scripts Agora abra seu talkactions.xml E cole nas linhas comuns ou seja nos talkactions que estão sendo usado normalmente em seu servidor. !buyfood Abra um bloco de notas vazio e cole o seguinte script : Preço e ID do item: ID, quantidade.doPlayerAddItem(cid, 2789, 100) Preço : doPlayerRemoveMoney(cid, 2000) Agora abra o talkactions.xml e seguindo a mesma orientação cole isso : Eu só fis esse tópico com o intuito de ajudar, nenhum dos scripts foram feitos por mim, espero estar aqui postando mais tutoriais para vocês. Eu só desejo um feliz 2012 para todos se eu não estiver por aqui na virada né, provavelmente estarei numa mesa de bar, haha, obrigado ae por tudo Tibia KING! EDIT OU PODE FAZER TUDO DE 1 VES
  16. Sim, tive a ideia ao ver o shop system do skyd, mas não peguei nada do script dele. Instalando talkactions/scripts/shop.lua local config = { ["demon shield"] = {id = 2520, sell = 'yes 32000', buy = 'yes 70000' }, ["magic plate armor"] = {id = 2472, sell = 'yes 120000', buy = 'no' }, ["boots of haste"] = {id = 2195, sell = 'yes 30000', buy = 'no' } } function upperfirst(first, rest) return first:upper()..rest:lower() end function onSay(cid, words, param, channel) if (param == nil or param == '' or param == 'lista' or param == 'list') then if (words == "!sell" or words == "/sell") then str = "Showing items that you can sell:\n\n" else str = "Showing items that you can buy:\n\n" end for item, vars in pairs(config) do if (words == "!sell" or words == "/sell") then expl = string.explode(vars.sell, " ") else expl = string.explode(vars.buy, " ") end item = item:gsub("(%a)([%w_']*)", upperfirst) if (expl[1] == 'no') then str = str else str = str .. item.. " - " .. expl[2] .. " gps\n" end end return doShowTextDialog(cid, 2160, str) end local item = config[param:lower()] param = param:lower() if (item) then local sell = string.explode(item.sell, " ") local buy = string.explode(item.buy, " ") if (words == "!sell" or words == "/sell") then if (sell[1] == "yes") then if (doPlayerRemoveItem(cid, item.id, 1)) then doPlayerAddMoney(cid, sell[2]) doSendMagicEffect(getPlayerPosition(cid), 30) return doPlayerSendTextMessage(cid,29,"Here are, you sold "..param.." for "..sell[2].." gold coins.") else doSendMagicEffect(getPlayerPosition(cid), 2) return doPlayerSendTextMessage(cid,29,"You don't have anything "..param.." to sell.") end else doSendMagicEffect(getPlayerPosition(cid), 2) return doPlayerSendTextMessage(cid,29,"Sorry, "..param.." cannot be sold.") end else if (buy[1] == "yes") then if (doPlayerRemoveMoney(cid, buy[2])) then doPlayerAddItem(cid, item.id) doSendMagicEffect(getPlayerPosition(cid), 28) return doPlayerSendTextMessage(cid,29,"Here are, you bought "..param.." for "..buy[2].." gold coins.") else doSendMagicEffect(getPlayerPosition(cid), 2) return doPlayerSendTextMessage(cid,29,"You don't have enough money.") end else doSendMagicEffect(getPlayerPosition(cid), 2) return doPlayerSendTextMessage(cid,29,"Sorry, "..param.." cannot be bought.") end end else doSendMagicEffect(getPlayerPosition(cid), 2) if (words == "!sell") then return doPlayerSendTextMessage(cid,29,"Sorry, this item cannot be sold or it does't exist.") else return doPlayerSendTextMessage(cid,29,"Sorry, this item cannot be bought or it does't exist.") end end end [/code] [b]talkactions/talkactions.xml[/b] [code]<talkaction words="!sell;/sell;!buy;/buy" event="script" value="shop.lua"/> Adicionando novos itens ♣ Config Observem no começo do código estas linhas: local config = { ["demon shield"] = {id = 2520, sell = 'yes 32000', buy = 'yes 70000' }, ["magic plate armor"] = {id = 2472, sell = 'yes 120000', buy = 'yes 60000' }, ["boots of haste"] = {id = 2195, sell = 'yes 30000', buy = 'no' } }[/code] Seguindo uma ordem óbvia, adicionem abaixo do boots of haste e antes do '}' que fecha o config. assim para adicionar sigam o modelo ["nome do item"], repectivamente de suas variáveis. [b]♣ Variáveis[/b] [color=#800080][b]id[/b][/color] - é onde você coloca o id do item [color=#800080][b]sell [/b][/color]- você precisa colocar se o item pode ser vendido por "yes" ou "no", caso for yes de um espaço (se não der espaço não funciona) e bote o valor em gold coins (não é k) [color=#800080][b]buy [/b][/color]- segue a ordem igual ao sell porem é se o item pode ser comprado pelo !buy ou não, e o preço que o player pagará. [b]♣ Exemplos[/b] Assim, digamos que desejo acrescentar um mastermind shield onde o player pode vender por 60k e comprar por 120k, adicionarei: [code]["mastermind shield"] = {id = 2514, sell = 'yes 60000', buy = 'yes 120000' }, Em seguida quero adicionar uma soft boots que pode ser vendida por 300k, mas NÃO PODE ser comprada. Colocarei: ["soft boots"] = {id = 6132, sell = 'yes 300000', buy = 'no' }, local config = { ["demon shield"] = {id = 2520, sell = 'yes 32000', buy = 'yes 70000' }, ["magic plate armor"] = {id = 2472, sell = 'yes 120000', buy = 'no' }, ["boots of haste"] = {id = 2195, sell = 'yes 30000', buy = 'yes 60000' }, ["mastermind shield"] = {id = 2514, sell = 'yes 60000', buy = 'yes 120000' }, ["soft boots"] = {id = 6132, sell = 'yes 300000', buy = 'no' } }[/code] [color=#ff0000][size=5][b]Atenção![/b][/size][/color] [color=#ff0000]Reparem que em todas as linhas finalizam-se com }, mas na última há ausência da vírgula, isto ocorre por que não pode ter vírgula no último, não sei ao certo se dará erro, não cheguei a testar, mas em muitas linguagens de programação ocorre um erro. Então é melhor ficar atento.[/color] Creio que passei as devidas instruções corretamente, e não é nenhum bixo de sete cabeças... qualquer um que tenha uma mentalidade normal conseguirá configurar. [size=5][b] [size=6][color=#006400]Explicando as talkactions[/color][/size][/b][/size] [b]♣ Comprando[/b] Bom, agora que já adicionou todos os items, vou explicar como funciona: O player comprará uma boh (item sugestivo) item por: [color=#800080][b]!buy boots of haste[/b][/color], caso não tenha grana, não vai conseguir, caso tenha comprará. [b]♣ Vendendo[/b] O mesmo quando ele for vender, ele falará: [color=#800080][b]!sell boots of haste[/b][/color], caso não tenha o item, o script negará, caso tenha o item some e o dinheiro aparece (: [center][/center] [center][/center] [b]♣ Lista de items[/b] [i]Ohh, não sei quais items pode ser comprados, e também não sei quanto custa, e agora?[/i] Diga [b][color=#800080]!buy[/color][/b], ou [b][color=#800080]!buy[/color] [color=#800080]list [/color][/b]ou [b][color=#800080]!buy[/color] [color=#800080]lista[/color][/b] para ver todos os items [center][/center] [i]O mesmo com os items que podem ser vendidos:[/i] [b][color=#800080]!sell[/color][/b], [b][color=#800080]!sell list[/color][/b] ou [b][color=#800080]!sell lista[/color][/b] [center][/center] [size=7][color=#006400]Versão 2[/color][/size] Deixo aberto sugestões para a versão 2 E claro, caso haja, correção de bugs. __________________ [b]♣ Créditos[/b] Renato - Desenvolvimento skydangerous - Ideia Então, meu config ficará desta forma:
  17. Olá Galera Hoje eu Vou Postar um Sistema De Afk Para vcs Então VAMOS Lá Vá Na pasta do seu otserv data/talkaction/talkaction.xml Adicione a Tag abaixo Depois salve e Feche... Agr Va em data/talkactions/scripts. Abra um arquivo Lua q n estar sendo Usado Renomei Por Sistemaafk e Coloque Isto Pronto Seu Sistema De Afk Estar feito feche e salve. CREDITOS: Higor Lara Jeff Owns
  18. Não tem muito oque explicar pelo nome, vocês já sabem. Vá na pasta talkactions/script e crie um arquivo com nome de sexy.lua e cole o seguinte script: -- Sexy System(Funny) by Cobraa. function prepareToSexy(ela, ele) doCreatureSetLookDir(ela, 3) pos = getThingPos(ela) doTeleportThing(ele, {x=pos.x+3, y=pos.y, z=pos.z}) doCreatureSetLookDir(ele, 3) mayNotMove(ele, true) mayNotMove(ela, true) end function Sexy(ela, ele, rounds) if rounds < 1 then mayNotMove(ele, false) mayNotMove(ela, false) setPlayerStorageValue(ele, 8958, -1) setPlayerStorageValue(ela, 8958, -1) return true end msg = {"OOHH!", "OMG", "FAST", "FUCK ME"} pos = getThingPos(ela) doTeleportThing(ele, {x=pos.x+1, y=pos.y, z=pos.z}) addEvent(doTeleportThing, 500, ele, {x=pos.x+3, y=pos.y, z=pos.z}) doSendAnimatedText(pos, msg[math.random(#msg)], math.random(255)) setPlayerStorageValue(ele, 8958, 1) setPlayerStorageValue(ela, 8958, 1) addEvent(Sexy, 1000, ela, ele, rounds-1) end function onSay(cid, words, param) if words == "!sex" then x = getPlayerByName(param) if x then if getPlayerSex(cid) == 0 then return doPlayerSendTextMessage(cid, 27, "Uma garota tem que ser convidada.") end if param == getCreatureName(cid) then return doPlayerSendTextMessage(cid, 27, "Isto n&#227;o &#233; possivel") end if getDistanceBetween(getThingPos(cid), getThingPos(x)) > 4 then return doPlayerSendTextMessage(cid, 27, "Este player est&#225; muito longe para tranzar.") end if getPlayerStorageValue(x, 8958) == 1 or getPlayerStorageValue(cid, 8958) == 1 then return doPlayerSendTextMessage(cid, 27, "Voc&#234; ou a pessoa que convidou est&#225; tranzando neste momento.") end setPlayerStorageValue(x, 8956, cid) setPlayerStorageValue(x, 8957, 1) doPlayerSendTextMessage(x, 19, getCreatureName(cid)..", te convidou para tranzar, diga !aceitar ou !recusar") doPlayerSendTextMessage(cid, 19, getCreatureName(x)..", foi convidado(a) para tranzar aguarde sua resposta.") else doPlayerSendTextMessage(x, 27, "Player Not Found.") end elseif words == "!aceitar" then if getPlayerStorageValue(cid, 8957) == 1 then if getDistanceBetween(getThingPos(cid), getThingPos(getPlayerStorageValue(cid, 8956))) > 4 then return doPlayerSendTextMessage(cid, 27, "Este player est&#225; muito longe para dar uma resposta.") end doPlayerSendTextMessage(cid, 19, "Voc&#234; aceitou o convite de "..getCreatureName(getPlayerStorageValue(cid, 8956))..".") doPlayerSendTextMessage(getPlayerStorageValue(cid, 8956), 19, "Seu convite foi aceito.") setPlayerStorageValue(cid, 8957, -1) prepareToSexy(cid, getPlayerStorageValue(cid, 8956)) addEvent(Sexy, 800, cid, getPlayerStorageValue(cid, 8956), 20) else doPlayerSendTextMessage(cid, 27, "Voc&#234; n&#227;o tem nenhum convite de tranza para aceitar.") end elseif words == "!recusar" then if getPlayerStorageValue(cid, 8957) == 1 then if getDistanceBetween(getThingPos(cid), getThingPos(getPlayerStorageValue(cid, 8956))) > 4 then return doPlayerSendTextMessage(cid, 27, "Este player est&#225; muito longe para dar uma resposta.") end doPlayerSendTextMessage(cid, 19, "Voc&#234; recusou o convite de "..getCreatureName(getPlayerStorageValue(cid, 8956))..".") doPlayerSendTextMessage(getPlayerStorageValue(cid, 8956), 19, "Seu convite foi recusado.") setPlayerStorageValue(cid, 8957, -1) else doPlayerSendTextMessage(cid, 27, "Voc&#234; n&#227;o tem nenhum convite de tranza para recusar.") end end return true end Depois na pasta talkactions procure o arquivo talkactions.xml e adicione a seguinte tag: <talkaction words="!sex;!aceitar;!recusar" event="script" value="sexy.lua"/> Para convidar alguem para fazer sexo , use o comando: !sex Nome do Player Para responder use !aceitar ou !recusar CREDITOS: Cobraa Obrigado a todos.
  19. Script: Trollando um amigo Função: Mate seu amigo, e ainda humilhe Testado: Versão 8.6 Observação: Script Inutil, mais é engraçado INSTALANDO vá na pasta talkaction/scripts e cria um arquivo no formato.lua com o nome de troll e cole isto: function onSay(cid, words, param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce deve digitar o nome do jogador.") return TRUE end local player = getPlayerByNameWildcard(param) local pos = getCreaturePosition(player) local troll = {x = pos.x, y = pos.y - 1, z = pos.z, stackpos = 255} local troll1 = {x = pos.x, y = pos.y + 1, z = pos.z, stackpos = 255} local troll2 = {x = pos.x+1, y = pos.y, z = pos.z, stackpos = 255} local troll3 = {x = pos.x-1, y = pos.y, z = pos.z, stackpos = 255} doSendAnimatedText(getCreaturePosition(player), "Trollado", 64) doSendAnimatedText(troll, "Trollado", TEXTCOLOR_GREEN) doSendAnimatedText(troll1, "Trollado", TEXTCOLOR_GREEN) doSendAnimatedText(troll2, "Trollado", TEXTCOLOR_GREEN) doSendAnimatedText(troll3, "Trollado", TEXTCOLOR_GREEN) doCreatureAddHealth(player, -getCreatureMaxHealth(player)) doCreatureAddMana(player, -getCreatureMaxMana(player)) return TRUE end depois em talkaction.xml adicione a tag: <talkaction words="!troll" event="script" value="troll.lua"/> Como Usar: !troll nome do seu amigo Script Exclusivo Tibia King Em breve eu atualizo, para melhorar +1 Script tosco , kkk'
  20. Fala galerinha, eu fiz esse script à muito tempo, na época que eu tinha um servidor online, é um script bem simples, mas tem um função bem interessante: proibir palavrões, por isso resolvi trazer-lo até o TK. Bom, primeiramente já até a pasta data/talkaction, abra o arquivo talkactions.xml e adicione esta tag: <talkaction words="porra;caralho;cu;merda;buceta" event="script" value="proibido.lua"> Repare que você pode adicionar os palavrões que você quiser, basta botar ; entre eles... Agora vá até a pasta scripts dentro da pasta talkaction, faça um script chamado proibido.lua e coloque isso dentro: -- Proibir palavrões by Talkaction -- Author: Matheus Sesso -- Url: www.tibiaking.com function onSay(cid, words, param) local time = 10 -- Tempo que ele ficará com outra outfit e muted! (em segundos) local life = 15 -- Quantidade de vida que o player perderá! doSendAnimatedText(getPlayerPosition(cid), "#$#%##%", 19) doPlayerSendTextMessage(cid, 23, "Now you are muted and with other outfit for "..time.." seconds!") doCreatureAddHealth(cid, -life) doSetMonsterOutfit(cid, "Bug", time*1000) doMutePlayer(cid, time*1000) return TRUE end É isso ai, até mais! Você gostou deste conteúdo!? Este conteúdo te ajudou!? Isso será realmente útil pra você!? Então, se possível, faça uma doação (de qualquer valor) que estará me ajudando também!
  21. Olá TKbianos, Estou trazendo a vocês esse script de Change Sex 2.0, mas qual é a diferença para os outros ChangerSex ? Um pequena e valiosa diferença, para servidores sérios! Geralmente tem aqueles bugs de quando o player está com o mage addon de mulher (que são os itens de summoner, com nome de mage) e troca de sexo, o player fica de mage addon de homem (o addon dificil de fazer, ferumbras hat e a clava lá), isso é um BUG... pois erá pra ficar com o summoner addon male (capa e vials)... Bem, nesse script não tem essa : Tag XML : <talkaction words="!changesex" event="script" value="sex.lua"/> Crie um arquivo .lua nomeado para sex.lua na pasta de script do talkaction e bote isso : config = { costPremiumDays = 10 } function onSay(cid, words, param, channel) if(getPlayerSex(cid) >= 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.") return end if(getPlayerPremiumDays(cid) < config.costPremiumDays) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough premium time - changing gender costs " .. config.costPremiumDays .. " premium days.") doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) return end if(getPlayerPremiumDays(cid) < 65535) then doPlayerAddPremiumDays(cid, -config.costPremiumDays) end local c = { {3, 1, false, 6, 1}, {3, 2, false, 6, 2}, {6, 1, false, 3, 1}, {6, 2, false, 3, 2} } for i = 1, #c do if canPlayerWearOutfitId(cid, c[i][1], c[i][2]) then doPlayerRemoveOutfitId(cid, c[i][1], c[i][2]) c[i][3] = true end end doPlayerSetSex(cid, getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost " .. config.costPremiumDays .. " days of premium time.") doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_RED) for i = 1, #c do if c[i][3] == true then doPlayerAddOutfitId(cid, c[i][4], c[i][5]) end end return true end Script muito util (eu acho). Espero que tenho ajudado ! Att. Huziwara no Mokou
  22. Bom hoje vou dar meu 2 tutorial mais vai ser o melhor bom vamos ao que intereça Bom va na pasta: data\actions\scripts copie (Qualquer arquivo .lua) e cole E renomei o arquivo que você colou para: tremsystem.lua Agora entre nessa pasta (tremsystem.lua) e coloque assim --Script by mock the bear --Config local SPEED = 1 local PLAYERSPEED = 250 --End local RAILS = {7121, 7122, 7123, 7124, 7125, 7126, 7127, 7128, 7129, 7130} --Thxy rails itemid by nord local CART = {[0] = 7132, [2] = 7132, [3] =7131, [1] =7131} local CONFIG = { [7121] = 0,[7122] = 0, [7123] = {EAST, SOUTH}, [7124] = {WEST, SOUTH}, [7125] = {EAST, NORTH}, [7126] = {WEST, NORTH}, [7127] = 0,[7128] = 0, [7129] = 0,[7130] = 0, --Random } local reverse = {[0] = 2, 3, 0, 1} -- All that table was made by nord. local function moveTrain(cid, frompos, direc) local tab if not isPlayer(cid) then return end local pos = getCreaturePosition(cid) local rar = findRail(pos) if not rar then doPlayerSetNoMove(cid, false) doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -PLAYERSPEED) doMoveCreature(cid, direc) else tab = CONFIG[rar] if tab and type(tab) == 'table' then direc = tab[tab[1] == reverse[direc] and 2 or 1] -- by nord here end doSetItemOutfit(cid, CART[direc], -1) doMoveCreature(cid, direc) addEvent(moveTrain, SPEED, cid, pos,direc) end end function findRail(p) local p_ = {x=p.x, y=p.y, z=p.z} for i=0,10 do p_.stackpos = i local t = getTileThingByPos(p_) if isInArray(RAILS, t.itemid) then return t.itemid,t.uid end end end function onUse(cid, item, frompos) --Script by mock the bear if hasCondition(cid, CONDITION_OUTFIT) or (item.actionid < 500 and item.actionid > 503) then return false end doTeleportThing(cid, frompos, false) doPlayerSetNoMove(cid, true) doChangeSpeed(cid, PLAYERSPEED) addEvent(moveTrain, SPEED, cid, frompos, item.actionid-500) return true end e salve e feche. Legenda: Em Azul é a speed do carrinho no caso quanto menor o número maior é a velocidade E agora va em data\actions E abra a pasta actions.xml Abra a pasta e acrescente essa tag no final e pronto Quote <action itemid="7131" event="script" value="tremsystem.lua" /> <action itemid="7132" event="script" value="tremsystem.lua" /> Quote Legenda: Em Vermleho é o id dos carrinhos só estou avisando porque vcs podem colocar outras coisas né se eu te ajudei me de um REP+ e lembrese sempre que você for faser um trem sytem vc temque colocar um actionid no cart(TREM) tipo 503 é pro lado <<<(esquerdo) e 502 é \/ (para baixo) bom isso é so uma relação para vc. (Os action podem variar variar de 500 até 510 (Acho n me lembro bem ao serto mais se não é 510 é 509 o maximo) Créditos: 60% Mock por inventar o scripter 40% Para min paulo
  23. Olá TKbianos, Estou aqui para postar pra vocês o script do item que quando usa, ganha a promotion 2 (Caso seu server tenha 3 niveis de vocação. Exemplo : Sorcerer > Master Sorcerer > Demigod. Tag XML : <action itemid="9971" event="script" value="promoitem.lua"/> Crie um arquivo .lua dentro da pasta scripts da pasta action e nomeie para promoitem.lua e coloque isso : function onUse(cid, item, fromPosition, itemEx, toPosition) local vocation = getPlayerVocation(cid) local id = getPlayerGUID(cid) if(item.itemid == 9971) then if(isInArray({5,6,7,8,9,10,11,12}, getPlayerVocation(cid)) == TRUE) then elseif vocation == 5 then db.executeQuery("UPDATE `players` SET `vocation` = 9 WHERE `id` ='"..id.."';") elseif vocation == 6 then db.executeQuery("UPDATE `players` SET `vocation` = 10 WHERE `id` ='"..id.."';") elseif vocation == 7 then db.executeQuery("UPDATE `players` SET `vocation` = 11 WHERE `id` ='"..id.."';") elseif vocation == 8 then db.executeQuery("UPDATE `players` SET `vocation` = 12 WHERE `id` ='"..id.."';") end doSendMagicEffect(fromPosition, CCONST_ME_MAGIC_RED) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 20, "You are a ".. getPlayerVocationName(cid) ..".") return true end end Espero ter ajudado ! Att. Huziwara no Mokou
  24. Esse script é basicamente o seguinte, você ta cansado dakele Varkhal que qualquer noob level 8 vai la e compra a full addon, então que tal um sistema que, apenas os merecedores podem ter as addons? Que tal uma fonte que, ao clicar o player ganha uma full addon???? Gostou? Ai vai: Abra a pasta do seu OT>Data>Actions>Actions.xml Coloque isso em qualquer lugar entre o <actions> e o </actions>: <action uniqueid="8913" script="addons.lua"> <action uniqueid="8914" script="addons.lua"> <action uniqueid="8915" script="addons.lua"> <action uniqueid="8916" script="addons.lua"> Salve, feche, e abra a pasta Scripts; Copie e cole qualquer arquivo LUA; Renomeie para addons; Abra, apague tudo e cole isso: if item.uid == 8913 then queststatus = getPlayerStorageValue(cid,1500) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found the citizen addon full.") doPlayerAddOutfit(cid, 128, 3) doPlayerAddOutfit(cid, 136, 3) setPlayerStorageValue(cid,1500,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8914 then queststatus = getPlayerStorageValue(cid,1600) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found the hunter addon full.") doPlayerAddOutfit(cid, 129, 3) doPlayerAddOutfit(cid, 137, 3) setPlayerStorageValue(cid,1600,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8915 then queststatus = getPlayerStorageValue(cid,1700) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found the mage addon full.") doPlayerAddOutfit(cid, 138, 3) doPlayerAddOutfit(cid, 130, 3) setPlayerStorageValue(cid,1700,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8916 then queststatus = getPlayerStorageValue(cid,1800) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found the knight addon full.") doPlayerAddOutfit(cid, 139, 3) doPlayerAddOutfit(cid, 131, 3) setPlayerStorageValue(cid,1800,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end else return 0 end return 1 end Ai vocês editam, mudam ali o "doPlayerAddOutfit(cid, 131, 3)" pro addon que vocês querem Citizen: 136/128 - 3 Hunter: 137/129 - 3 Mage: 138/130 - 3 Knight: 139/131 - 3 Nobleman: 140/132 - 3 Summoner: 141/133 - 3 Warrior: 142/134 - 3 Barbarian: 147/143 - 3 Druid: 148/144 - 3 Wizard: 149/145 - 3 Oriental: 150/146 - 3 Pirate: 155/151 - 3 Assassin: 156/152 - 3 Beggar: 157/153 - 3 Shaman: 158/154 - 3 Norseman: 252/151 - 3 Nightmare: 269/268 - 3 Jester: 270/273 - 3 Brotherhood: 279/278 - 3 Demonhunter: 288/289 - 3 Yalaharian: 342/325 - 3 Creditos: Danitero
  25. Sistema de Sexo Tibiano Olá pessoal do Tibia King,hoje vou postar um script,que faz o player fazer sexo no jogo.Veja só como instalar : Na pasta talkactions/scripts crie um arquivo lua chamado sexo.lua,contendo esse script : Depois na pasta talkactions procure o arquivo talkactions.xml e adicione a seguinte tag: Comandos : !sex Nome do ser !aceitar !recusar Autor : GuuhTorres & Cobraa Espero que pelo menos no jogo,vocês perdem a virgindade.BEIJOS DO GORDO WOW !

Informação Importante

Confirmação de Termo