Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 11/03/11 em todas áreas
-
[CreatureEvent] Rank Militar
[CreatureEvent] Rank Militar
Mathias Silva reagiu a Guilherme. por uma resposta no tópico
1 pontoOlá galerinha do Tibia King ! Hoje vim trazer para vocês um MOD que achei muito foda. O script atribui um 'rank' militar ao player que tem certa quantidade de frags, é parecido com o REP System, bom agora vamos aos 'finalmente' ! Primeiro entre em /mods/ e crie um arquivo com o nome de ranks.xml agora coloque o código abaixo, salve e feche o arquivo. Você pode editar facilmente o nome do Rank e a quantidade de Frags necessários para obtelo seguindo o padrão: [1] - Quantidade de Frags "Private First Class" - Nome do Rank <?xml version = "1.0" encoding = "UTF-8"?> <mod name = "Military Ranks" version = "1.0" author = "Teckman" enabled = "yes"> <config name = "ranks"><![CDATA[ titles = { [5] = "Private First Class", [10] = "Specialist", [15] = "Corporal", [20] = "Sergeant", [25] = "Staff Sergeant", [30] = "Sergeant First Class", [35] = "Master Sergeant", [40] = "First Sergeant", [45] = "Sergeant Major", [50] = "Command Sergeant Major", [55] = "Sergeant Major of the Army", [60] = "Second Lieutenant", [65] = "First Lieutenant", [70] = "Captain", [75] = "Major", [80] = "Lieutenant Colonel", [90] = "Colonel", [100] = "Brigadier General", [110] = "Major General", [120] = "Lieutenant General", [140] = "General", [170] = "General of the Army" } fragsStorage = 600 ]]></config> <event type = "look" name = "ranksLook" event = "script"><![CDATA[ domodlib("ranks") function onLook(cid, thing, position, lookDistance) if(isPlayer(thing.uid)) then local rank = {rank = "Private", frags = 0} for k, v in pairs(titles) do if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then if(k - 1 > rank.frags) then rank.rank, rank.frags = v, k - 1 end end end doPlayerSetSpecialDescription(thing.uid, "\n Military rank: " .. rank.rank) end return true end ]]></event> <event type = "kill" name = "ranksKill" event = "script"><![CDATA[ domodlib("ranks") function onKill(cid, target) if(isPlayer(target)) then setPlayerStorageValue(cid, fragsStorage, math.max(0, getPlayerStorageValue(cid, fragsStorage) + 1)) if(titles[getPlayerStorageValue(cid, fragsStorage)]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced to military rank: " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. ". Congratulations " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. "!") end end return true end ]]></event> <event type = "login" name = "ranksLogin" event = "script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ranksKill") registerCreatureEvent(cid, "ranksLook") return true end ]]></event> </mod> Os créditos do script vão para Teckman;1 ponto -
[TalkAction] Dungeon Finder
[TalkAction] Dungeon Finder
gabriel28 reagiu a Guilherme. por uma resposta no tópico
1 pontoOlá 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:1 ponto -
[GESIOR AAC] Postando novo ticker in game
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!1 ponto
-
TrainerBOT (Sem Tibia.api)
TrainerBOT (Sem Tibia.api)
allanbergmann reagiu a Jszer por uma resposta no tópico
1 pontoBoa tarde pessoal do TibiaKing Andei observando os tópicos aqi de Programação do Forum e notei que a parte de Linguagem C falta muitos tutorias, projetos e tópicos a respeito de codigos pra crianção de bots. Tentei aprender mais sobre as outras linguagens, porém é realmente dificil. Como eu "aprendi" a programar em Linguagem C++ na faculdade (conhecimentos qase nulos qando pois não aprendemos a utilizar processos etc..), resolvi criar um bot (SEM TIBIA.API) em linguagem c++ com a ajuda de voces. - Bot mais simples possivel e de facil utilização. - Bot atualizado pra versão atual (Tibia 9.31) e futuras atualizações. - Bot baseado (qase copiado 100%) no Mini-Bot feito por Kimoszin [Criando um Mini-Bot no Delphi (Sem API)], porém é mais simples.. - Trate-se de um trainer bot. Imagem: Form1.h: SzerBot.cpp // SzerBot.cpp : main project file. #include "stdafx.h" #include "Form1.h" using namespace SzerBot; [STAThreadAttribute] int main(array<System::String ^> ^args) { // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false);[/size][/size] // Create the main window and run it Application::Run(gcnew Form1()); return 0; } TextBox1 = SpellText (magia a ser usada) TextBox2 = ManaText ( x de mana para usar a magia) CheckBox1 = Box1 (ativar anti-kick) CheckBox2 = Box2 (ativar eat food) Label4 = XMana (mostrar mana atual do player) Timer1 = ContFood (determinar o intervalo de tempo pra comer food) Timer2 = ContMana (contar a mana atual do player) Timer3 = ContTime (determinar o intervalo de tempo para girar o player) RadioButton1 = Button1 (ligar o Bot) RadioButton2 = Button2 (desligar o Bot) Especificaçoes: - O Anti-Kick vai girar o player de 5 em 5 minutos. - O EatFood vai acionar a Hotkey F10 (onde vai estar selecionado pelo proprio player o food qe levou pra treinar) de 7 em 7 minutos. - A opção do RadioButton2 (Desligado), ao abrir o bot, ja deve estar marcado. - Quando clicado na opção Ligado (RadioButton1), a opção do RadioButton2 (Desligado) deve ser desmarcada. - O Bot vai ler o numero de mana indicado para usar a magia, e quando o ContMana for igual ou superior, o Bot usará a magia. Enfim, peço a ajuda de voces porqe meus conhecimentos são basicamentes nulos pois não sei fazer interação da linguagem com os processos. Coloquei espesificaçoes bem óbvias.. mas é isso ai. O Bot não é pra ser comercializado.. é para uso pessoal (principalmente pra mim qe deixo meus char treinando enquanto eu estudo ao lado).1 ponto -
Raids automáticos
1 pontoNome: Raids automáticos Autor: Antharaz Feito para: TFS 0.4 Descrição: Os raids acontecerão nos dias e horas programados por você neste script. Instalação Abra o arquivo globalevents.xml localizado em data/globalevents e coloque antes de </globalevents>: <globalevent name="raidautomatico" interval="1000" event="script" value="raidautomatico.lua"/> Ficaria assim se não tivesse outros globalevents: <?xml version="1.0" encoding="UTF-8"?> <globalevents> <globalevent name="raidautomatico" interval="1000" event="script" value="raidautomatico.lua"/> </globalevents> Agora crie o arquivo raidautomatico.lua em data/globalevents/scripts e coloque isto: local raid={{["nome"]="RatRaid",["dia_semana_ou_mes"]="semana",["dia"]={2,3,4,5,6},["hora"]=8,["minuto"]=0}, {["nome"]="Orshabaal",["dia_semana_ou_mes"]="mes",["dia"]={2,14,26},["hora"]=15,["minuto"]=0} } function onThink(interval) local time = os.date("*t") for _,a in pairs(raid) do if ((a["dia_semana_ou_mes"] == "semana" and isInArray(time.wday,a["dia"])) or (a["dia_semana_ou_mes"] == "mes" and isInArray(time.day,a["dia"]))) and a["hora"] == time.hour and a["minuto"] == time.min then executeRaid(a["nome"]) break end end return true end Configuração A configuração ocorre apenas nesta parte: local raid={{["nome"]="RatRaid",["dia_semana_ou_mes"]="semana",["dia"]={2,3,4,5,6},["hora"]=8,["minuto"]=0}, {["nome"]="Orshabaal",["dia_semana_ou_mes"]="mes",["dia"]={2,14,26},["hora"]=15,["minuto"]=0} } É bem simples entender como funciona: ["nome"] > Coloca o nome da raid já existente em data/raids/raids.xml. ["dia_semana_ou_mes"] > Coloca se está especificando os dias da semana ou do mês. ["dia"] > Coloca os dias da semana em números, começando pelo domingo representado por 1, segunda por 2 e assim por diante até o sábado representado por 7. ["hora"] > Coloca a hora que irá ocorrer. ["minuto"] > Coloca o minuto que irá ocorrer. No caso há 2 exemplos, um para ocorrer durante alguns dias do mês e outro para ocorrer durante alguns dias de toda semana. Caso queria adicionar mais elementos para mais raids aconselho que estude tables, não pretendo entrar em detalhes aqui.1 ponto
-
[MOD] Warp System 1.0
1 pontoWarp System[1.0] Olá a todos do TibiaKing! Já estou a um tempo devendo mais um sisteminha para vocês e aqui está ele. Simples, eficaz e completamente editavel. Utilidade Esse sistema de Warp significa ao jogador poder teleportar para várias posições, já armazenadas no mapa, quando estiver em uma dessas posições. Mapa Estive imaginando como fazer essa posição no mapa e tive a ideia de deixa-la assim.. Porém vocês decidem, isso é só um exemplo. Warp Helper Quando o player utiliza o comando "!warp help" ou "!warp helper". Warp Locations Quando o player utiliza o comando "!warp pos" ou "!warp locations". Informações Extras Como você pode notar, quando o player utiliza o Warp Helper, aparece várias configurações extras. Por exemplo: premmium account, promotion, quest... Essas configurações você poderá editar no script para o jeito que desejar. Do mesmo jeito que vocês poderam editar essas configurações, tambem poderam adicionar novos warps para a lista, com seu relativo valor. Código warpSystem.xml Configs Obs¹: Se necessitas que um player tenha feito alguma quest para utilizar o sistema, basta colocar em needQuest ( true ) e em questStorage o valor do storage da quest desejada. Adicionando Warps No próprio code você encontrará as seguintes variaveis: warpTotals; warpNames; POS; VALUES; Para adicionar novas warps, precisamos somente altera-los... No código temos para três warps, adicionando mais uma: Conclusões Esse é um script fácil de se manipular, porém pode haver alguns erros que não foi percebidos ainda, por isso está na versão [1.0], pois já foi corrigido vários erros e assim modificado. A versão inicial foi [0.1] e pretendo altera-lo sempre que possivel. Deixando cada vez mais perfeito o sistema. Obs²: Qualquer dúvida é só postar no tópico ou enviar uma mp. Espero que tenham gostado, Aproveitem! Atenciosamente, Aluccard.1 ponto
-
[TUTORIAL] Fazendo seu Potion Refiller
[TUTORIAL] Fazendo seu Potion Refiller
Jose Anderson reagiu a toty1234 por uma resposta no tópico
1 pontoBom galera, eu não vi ainda nenhum tutorial explicando isso aqui no forum, então resolvi fazer o meu ... Está bem simples mas axo qe está bom para entender Simples, faça seu waypoint, com no inicio uma label escrito start, E no final faça um Macro com o seguinte: 500 {Refill} Misc.ItemCountEx(266)>10 CaveBot.GoLabel(start)) Onde 10 é o tanto de pot para ele sair da cave e ir refillar, é 266 o ID da potion. ID | Name da Potion 7876 | Small Health Potion 266 | Health Potion 268 | Mana Potion 236 | Strong Health Potion 237 | Strong Mana Potion 239 | Great Health Potion 238 | Great Mana Potion 7642 | Great Spirit Potion 7643 | Ultimate Health Potion Agora ande até o bank, com o learn ativado, xegando la ADD um Hi, deposit all, yes, e crie um novo macro, com o seguinte: 1000 {Withdraw} VarSetEx(Total, NUMBEROFPOTS) VarSet(Potnow) Misc.ItemCountEx(IDITEMHERE) VarSub(Total, !Potnow!) VarMult(Total, PRICEEACHITEM) HUD.Display(!Total!) Self.Say(hi) Macro.Wait(2000) NPC.Say(withdraw) Macro.Wait(2000) NPC.Say(!Total!) Macro.Wait(2000) NPC.Say(yes)) Onde 'NUMBEROFPOTS' é o numero de potions qe voc quer qe ele fique no final; 'IDITEMHERE' é o ID da potion; 'PRICEEACHITEM' é o preço de cada potion. Agora, faça o caminho até a loja de potions, add um Hi/Trade, e coloque o seguinte macro la: 1000 {Pot Reffil} VarSetEx(Total, NUMBEROFPOTS) VarSet(Potnow) Misc.ItemCountEx(IDITEMHERE) VarSub(Total, !Potnow!) HUD.Display(!Total!) Self.Say(hi) Macro.Wait(2000) NPC.Say(trade) NPC.Buy(266, !Total!, 1) Macro.Wait(2000) NPC.Say(bye)) Onde 'NUMBEROFPOTS' é o numero de potions qe voc quer qe ele fique no final; 'IDITEMHERE' é o ID da potion. Agora faça o caminho de volta para a cave, salve seu waypoint e seja feliz. GOSTOU DO TUTORIAL ? Então de um REP+ ake em baixo NÃO GOSTOU DO TUTORIAL ? Então de um REP+ ake em baixo1 ponto -
[MOD] Killed Monsters Count 2.0 + Premios
[MOD] Killed Monsters Count 2.0 + Premios
darkkonrad reagiu a Renato por uma resposta no tópico
1 pontoO que é? O script é assim, ele conta quantos monstros você já matou até o momento, consultando por [ !monsters ] Agora com a versão 2.0 você pode consultar monstro específico, pela talk [ !monsters Demon ] por exemplo. SE O MONSTRO ESTIVER CONFIGURADO. Ahh, e você também configura a recompensa que ele ganhará ao matar X de determinado monstro =p Vamos lá. Se você já instalou o Killed Monsters Count 1.0 é só abrir o mesmo arquivo e substituir. Caso não, vá em server/data/mods ou server/mods crie o arquivo monsterskill.xml e coloque dentro: <?xml version="1.0" encoding="UTF-8"?> <mod name="Monsters Kill Count and Awards" version="2.0" author="Renato Ribeiro" enabled="yes"> <config name="config-monsterskill"><![CDATA[ local monters = { ['demon'] = { id = 1, qtKill = 250, itemId = xxxx, qtItem = 1 }, ['hydra'] = { id = 2, qtKill = 500, itemId = yyyy, qtItem = 1 }, ['frost dragon'] = { id = 3, qtKill = 750, itemId = zzzz, qtItem = 1}, } storage = 1647 killedMonsters = getPlayerStorageValue(cid, storage) ]]></config> <event type="look" name="monsterLook" event="script"><![CDATA[ domodlib("config-monsterskill") function onLook(cid, thing, position, lookDistance) if(isPlayer(thing.uid)) then doPlayerSetSpecialDescription(thing.uid, "\n Killed Monsters: " .. killedMonsters) end return TRUE end ]]></event> <event type="kill" name="monsterKill" event="script"><![CDATA[ domodlib("config-monsterskill") function onKill(cid, target) if (isMonster(target)) then setPlayerStorageValue(cid, storage, math.max(1, getPlayerStorageValue(cid, storage) + 1)) end if (monsters[string.lower(getCreatureName(target))]) then mName = getCreatureName(target) mId = monsters[string.lower(mName)].id mqtKill = monsters[string.lower(mName)].qtKill mItemId = monsters[string.lower(mName)].itemId mqtItem = monsters[string.lower(mName)].qtItem getMStorage = getPlayerStorageValue(cid, storage + mId) setPlayerStorageValue(cid, storage + mId, math.max(0, getMStorage + 1)) if (getMStorage == mqtKill) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You earned " .. mqtItem .. " " .. getItemNameById(mItemId) .. ".") adding = doPlayerAddItem(cid, mItemId, mqtItem) doSetItemSpecialDescription(adding, "\n Reward to " .. getPlayerName(cid) .. " to kill " .. qtKill .. " " .. mName .. "s") end end return TRUE end ]]></event> <event type="login" name="monsterLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "monsterLook") registerCreatureEvent(cid, "monsterKill") return TRUE end ]]></event> <talkaction words="!monsters" event="script"><![CDATA[ domodlib("config-monsterskill") function onSay(cid, words, param, channel) if (monsters[string.lower(param)] or monsters[param]) then killedMonstersX = getPlayerStorageValue(cid, storage + monsters[string.lower(param)] and monsters[string.lower(param)] or monsters[param]) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed " .. killedMonstersX .. " " .. param .. "s at the moment.") elseif (param) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Do not have a " .. param .. " task.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed " .. killedMonsters .. " monsters at the moment") end return TRUE end ]]></talkaction> </mod> [/code] [b]Talkactions:[/b] !monsters - consulta quantos monstros você já matou ao total (também aparece no seu look) !monsters NOME - consulta quantos monstros 'NOME' você já matou [b]Pra adicionar novos monstros siga o padrão:[/b] ['frost dragon'] = { id = 3, qtKill = 750, itemId = zzzz, qtItem = 1}, ['nome do monstro'] = { o id tem que ser sequencial, ou seja, se o ultimo for 3, o proximo é 4, depois 5 etc. o qtKill é q quantidade que o cara tem que matar pra ganhar o item. itemId é o id do item que o cara ganha e qtItem é a quantidade que ele ganha. Por exemplo você pode por o id da arrow e na qtItem você poe 100, ele ganha 100 arrows. Agora se for um item que não da pra juntar, mesmo você colocando 100 ele só vai ganhar 1. } [b]Enfim, script não testado, qualquer erro POSTE AQUI![/b] Abraços.1 ponto -
Dragon Yalahar 90+
Dragon Yalahar 90+
Daniel Neves reagiu a AL4sKiM por uma resposta no tópico
1 pontoYalahar Dragons Place: Yalahar Vocation: Knight Level: 70+ Skills: 80/80 Exp/h: 55~60k* Profit/h: 9~11k Premium: Yes Be Prepared to Face: Script Includes: Refiller, Depositer, Macro for change soft boots to steel boots. Credits: N2wb1e1 ponto -
Portfólio - Radar
1 ponto
-
Trainer
Trainer
Gusttavomarinho reagiu a EdsonJunior por uma resposta no tópico
1 pontoTrainer Resumo O Trainer é uma ferramenta que permite você treinar com slimes, monks, gargoyles ou qualquer monstro de treinamento. The HP / Monk Trainer O treinamento da HP é um recurso que permite que você bata as criaturas até uma determinada porcentagem de saúde, ou seja, enquanto a criatura tem saúde suficiente, o bbot continua a bater-lhes, caso contrário, quando a criatura está com a saúde baixa, o bbot parar os ataques. Nota : o Treinamento HP não irá atacar monstros que não estão na lista de treinadores , desta forma você pode trazer monstros para treinar seu shielding como ratos ou insetos. Como configurar o Hp Trainer Na lista de treinadores selecione a criatura. Por exemplo, o treinamento com o monk: 1)Confira o Monk; 2)Traga alguns ratos ou qualquer outra criatura para treinar o seu shield; 3) Configuração do HP Attack eo HP Stop e habilitar o recurso. 4) HP Attack: O HP mínimo do monstro para o bot começar a atacar 5) Stop HP: O mínimo que a HP irá fazer o bot parar o ataque. Slime Training O treino com Slime é um recurso que lhe permite matar copias da criatura. No caso mais famoso - Slime, mas funciona para qualquer criatura. Ele trabalha matando tudo que não estiver na lista de treinadores , sobre o caso Slime, você pode configurá-lo para matar a convocação de uma mãe, a mãe vai estar na lista de treinadores . Como configurar o Slime Training É muito fácil, faça uma batida pequena no Slime Mãe e, em seguida, clique no Trainer bbot no botão Refresh (na parte inferior da guia Trainer), marque a mãe Slime na lista e marque a opção Training Slime. Texto Original: BBot Wiki Tradução e formação do topico: EdsonJunior1 ponto