
kk4444
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
kk4444 deu reputação a WooX em Classic-Yurots [8.60] - Push Cruzado + Cast com SetasClassic Yurots
V 8.60
Eu acompanhei de perto o desenvolvimento deste servidor e sabia que sairia coisa boa dali, mas só quando obtive acesso aos arquivos que pude entender a dimensão do negocio, sendo assim, eu posso afirmar que este é um dos se não o melhor datapack baseado no antigo YurOTS. O datapack está limpo, você não vai encontrar um script em qualquer uma das pastas que não esteja em uso no servidor, alem disto muito tempo foi gasto reescrevendo e revisando os scripts do servidor para garantir máxima performance.
Os mais novos em OpenTibia talvez não saibam, mas os famosos Baiaks e Styllers de hoje em dia foram baseados neste mapinha que teve seu inicio já na versão 7.5 e seu declínio nas versões 8.4 onde foi visto pela ultima vez devido ao surgimento de derivados do mesmo (Baiak e Styller). Devido ao fato dos mapas Baiak e Styller serem derivados do YurOTS, se você tem um projeto de mapa Baiak ou Styller, este é um excelente datapack para você usar como base.
Por que o servidor está sendo postado?
Este servidor foi desenvolvido ao longo de 2 anos pelo Wesley (conhecido aqui no fórum como @KOLISAO), alguns meses atrás o servidor foi finalizado e colocado online, embora hoje em dia, sem contato com times de jogadores, é difícil popular um servidor novo e sem nome logo na abertura, com isso a inauguração não foi como esperado e conseguiu uma média de apenas 30 jogadores. Frustado por 2 anos de muito trabalho não dar o resultado esperado, ele decidiu desistir do servidor, foi então que eu fiz uma proposta em troca do servidor e obtive acesso ao mesmo.
O que eu não sabia na época era que outras duas pessoas alem de mim tiveram acesso a todos os arquivos, uma dessas pessoas é um amigo do próprio Wesley na vida real, ele conversou com este amigo e deletou os arquivos do computador dele. A segunda pessoa em questão, eu não tenho certeza de como obteve estes arquivos, mas ele atualmente está vendendo estes arquivos sem autorização.
Quando fiquei ciente disto, entrei em contato com o Wesley e o informei sobre o que estava acontecendo, ele ficou surpreso e revoltado por alguém estar lucrando em cima de seus esforços. Neste momento pedi permissão a ele para postar o servidor aqui no fórum, e ele me concedeu.
Informações sobre o servidor
Como dito anteriormente, muito tempo foi gasto neste servidor e tudo foi feito com o maior cuidado possivel. Vou deixar aqui as informações sobre o que contem no servidor, informações que foram divulgadas pelo próprio Wesley na data de inauguração.
Vídeo com algumas Quests do servidor
Outras informações podem ser encontradas no tópico de show-off do período em que o servidor ainda estava em desenvolvimento.
Extra + Créditos
Juntamente com o servidor estarei postando a source e o site do mesmo, porem o site será postado em um tópico diferente devido a esta não ser a área correta do fórum para isso. A source do servidor é OTX2, foram feitas pequenas modificações na source para melhor formatação em partes do datapack, como QuestLog e outros.
Edit 29/11
Além disto, a source também possui 2 sistemas muito procurados que até o presente momentos não eram públicos, sendo estes Push Cruzado e Cast com Setas. Ambos os sistemas já estão instalados na source, porem futuramente irei postar ambos os códigos juntamente com tutorial de instalação para os que quiserem adicionar por si mesmos.
Créditos
Como já mencionei diversas vezes neste tópico, o responsável pelo desenvolvimento do servidor e site foi o @KOLISAO, portanto todos os créditos nesta parte vão para ele.
Eu fui o responsável por adicionar o Push Cruzado na source e fazer uma pequena modificação no Cast com Setas.
Obs: quando eu obtive acesso aos arquivos o Cast com Setas já estava instalado na source, eu não tenho informação se o código foi desenvolvido por ele ou por um terceiro.
Links para Download
Servidor
Download - Scan
Source
Download - Scan
Distro compilada para Windows
32x - TheOTXServer.exe - Scan
64x - TheOTXServer_64.exe - Scan
DLLs
dll.zip - Scan
Site
-
kk4444 deu reputação a Danves em (Resolvido){Pedido} Teleportar quando acabar a PremiumFiz um creaturescripts que talvez só ele já funcione. Crie um com o nome vip.lua e cole dentro function onLogin(cid) if getPlayerPremiumDays(cid) > 0 and getPlayerStorageValue(cid, 95498) == -1 then setPlayerStorageValue(cid, 95498, 1) end if getPlayerPremiumDays(cid) <= 0 and getPlayerStorageValue(cid, 95498) == 1 then setPlayerStorageValue(cid, 95498, -1) local temple = getTownTemplePosition(getPlayerTown(cid)) doTeleportThing(cid, temple) doPlayerPopupFYI(cid, "Sua vip acabou.") end return true end Se não quer que teleporte pro templo, edite essa parte de vermelho com as pos e tal
local temple = getTownTemplePosition(getPlayerTown(cid))
No creaturescripts.xml <event type="login" name="Vip" script="vip.lua"/> No login.lua registerCreatureEvent(cid, "Vip") -
kk4444 deu reputação a DdJs em Serpent Spawn's Cave | 10.98 (Quest/Task Place)Serpent Spawn Caves
Version: 10.98
Download:
Type: .Rar
Size: 108KB
Position: [X: 1019 Y: 1026 Z: 7]
File password: tibiaking
Scan:
Images:
Entenda as mecânicas
Understand the mechanics.
Essas são apenas minhas ideias, não é regra e você faz o uso que quiser do mapa.
(Também não acompanha nenhum pack de .lua sobre o que está escrito abaixo).
These are just my ideas, it's not the rule and you make whatever use you want from the map.
(Also does not accompany any pack of .lua on what is written below).
-
kk4444 recebeu reputação de Myalitth em [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)se vira ai entao KKKKKKK já q vc sabe tdo
-
kk4444 deu reputação a Myalitth em [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)Então diz pra ele onde esta. ?
-
kk4444 recebeu reputação de gleison157 em Reward Chest & Boss Reward [TFS 1.2]Se eu não poder fazer isso por favor me avisem aqui no tópico que eu retiro. Créditos SOMENTE do: cbrm (OTLand) Tópico Oficial:https://otland.net/threads/reward-chest-boss-reward-tfs-1-2.233397/ Tested on TFS 1.2, 10.77/78
Based on http://www.tibia.com/news/?subtopic=newsarchive&id=2486 Oque tem?
To-do
Changelog
Comentários
Agradecimentos especiais para
Instruções de instalação
Execute a query na database
CREATE TABLE IF NOT EXISTS `player_rewardchest` ( `id` int(11) NOT NULL AUTO_INCREMENT, `player_id` int(11) NOT NULL, `reward` text NOT NULL, `date` bigint(20) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB; src/const.h
Abaixo...
ITEM_MARKET = 14405 ...Adicione:
ITEM_REWARD_CHEST = 21584, REWARD_CHEST_DEPOT = 99, src/depotchest.h
Abaixo...
explicit DepotChest(uint16_t _type);
...Adicione:
uint32_t getDepotId() const { return depotId; } void setDepotId(uint32_t id) { depotId = id; }
Abaixo...
uint32_t maxDepotItems; ...Adicione:
uint32_t depotId; src/depotchest.cpp
Abaixo...
maxDepotItems = 1500; ...Adicione:
depotId = 0; Acima...
return Container::queryAdd(index, thing, count, flags, actor); ...Adicione:
if (actor != nullptr && getDepotId() == REWARD_CHEST_DEPOT) { return RETURNVALUE_NOTPOSSIBLE; } src/depotlocker.h
Acima...
//cylinder implementations ...Adicione:
void setMaxLockerItems(uint32_t maxitems) { maxSize = maxitems; } src/luascript.h
Acima...
static int luaContainerGetSize(lua_State* L); ...Adicione:
static int luaContainerGetContentDescription(lua_State* L); src/luascript.cpp
Acima...
registerMethod("Container", "getSize", LuaScriptInterface::luaContainerGetSize); ...Adicione:
registerMethod("Container", "getContentDescription", LuaScriptInterface::luaContainerGetContentDescription); Acima...
int LuaScriptInterface::luaContainerGetSize(lua_State* L) ...Adicione:
int LuaScriptInterface::luaContainerGetContentDescription(lua_State* L) { // container:getContentDescription() Container* container = getUserdata<Container>(L, 1); if (container) { std::ostringstream ss; ss << container->getContentDescription(); pushString(L, ss.str()); } else { lua_pushnil(L); } return 1; } src/actions.cpp
Troque:
//depot container if (DepotLocker* depot = container->getDepotLocker()) { DepotLocker* myDepotLocker = player->getDepotLocker(depot->getDepotId()); myDepotLocker->setParent(depot->getParent()->getTile()); openContainer = myDepotLocker; player->setLastDepotId(depot->getDepotId()); } else { openContainer = container; } Por:
//reward chest and depot container if (item->getID() == ITEM_REWARD_CHEST) { DepotLocker* myRewardChest = player->getRewardChest(); myRewardChest->setParent(item->getTile()); openContainer = myRewardChest; player->setLastDepotId(REWARD_CHEST_DEPOT); } else if (DepotLocker* depot = container->getDepotLocker()) { DepotLocker* myDepotLocker = player->getDepotLocker(depot->getDepotId()); myDepotLocker->setParent(depot->getParent()->getTile()); openContainer = myDepotLocker; player->setLastDepotId(depot->getDepotId()); } else { openContainer = container; } src/player.h
Abaixo...
DepotLocker* getDepotLocker(uint32_t depotId); ...Adicione:
DepotLocker* getRewardChest(); src/player.cpp
Abaixo...
DepotChest* depotChest = new DepotChest(ITEM_DEPOT); ...Adicione:
depotChest->setDepotId(depotId); Acima...
void Player::sendCancelMessage(ReturnValue message) const ...Adicione:
DepotLocker* Player::getRewardChest() { auto it = depotLockerMap.find(REWARD_CHEST_DEPOT); if (it != depotLockerMap.end()) { inbox->setParent(it->second); return it->second; } DepotLocker* rewardChest = new DepotLocker(ITEM_LOCKER1); rewardChest->setDepotId(REWARD_CHEST_DEPOT); rewardChest->setMaxLockerItems(1); rewardChest->internalAddThing(getDepotChest(REWARD_CHEST_DEPOT, true)); depotLockerMap[REWARD_CHEST_DEPOT] = rewardChest; return rewardChest; } On player.cpp, container.cpp, inbox.cpp
Change:
if (!item->isPickupable()) { Por:
if (item->getID() != 21518 && !item->isPickupable()) { Adicione em @ data/actions/actions.xml
<!-- Reward Chest System --> <action itemid="21584" script="reward_chest.lua"/> <action actionid="21584" script="reward_chest.lua"/> Crie @ data/actions/scripts/reward_chest.lua
function onUse(player, item, fromPosition, target, toPosition, isHotkey) --Reward Chest if item:getId() == 21584 then if player:getExhaustion(REWARD_CHEST.STORAGE) > 0 then return player:sendCancelMessage('You need to wait ' .. string.diff(player:getStorageValue(REWARD_CHEST.STORAGE)-os.time()) .. ' before using this chest again.') end player:updateRewardChest() --Boss Corpse elseif item:getActionId() == 21584 then local reward = REWARD_CHEST.LOOT[tonumber(item:getAttribute('text'))][player:getGuid()] if reward ~= nil then local rewardBag = Container(doCreateItemEx(REWARD_CHEST.CONTAINER, 1)) addContainerItems(rewardBag, reward) if player:getCapacity() < rewardBag:getCapacity() then return player:sendCancelMessage(RETURNVALUE_NOTENOUGHCAPACITY) end if player:addItemEx(rewardBag, false) == RETURNVALUE_NOERROR then REWARD_CHEST.LOOT[tonumber(item:getAttribute('text'))][player:getGuid()] = nil player:sendCancelMessage('You have picked up a reward container.') else player:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) return true end end end return false end Adicione @ data/creaturescripts/creaturescripts.xml
<event type="kill" name="RewardChest" script="reward_chest.lua"/> Registre em @data/creaturescripts/scripts/login.lua
player:registerEvent("RewardChest") Adicione @ data/items/items.xml
<item id="21518" article="a" name="reward container"> <attribute key="weight" value="1800" /> <attribute key="containersize" value="24" /> <attribute key="slotType" value="backpack" /> </item> <item id="21584" article="a" name="reward chest"> <attribute key="type" value="depot" /> <attribute key="containerSize" value="1" /> <attribute key="description" value="This chest contains your rewards earned in battles." /> </item> Add @ data/lib/core/player.lua
function Player.setExhaustion(self, value, time) return self:setStorageValue(value, time + os.time()) end function Player.getExhaustion(self, value) local storage = self:getStorageValue(value) if storage <= 0 then return 0 end return storage - os.time() end Crie em @ data/creaturescripts/scripts/reward_chest.lua
(download anexado nesse post)
Download
RELEMBRANDO CRÉDITOS APENAS DO CBRM DA OTLAND
-
kk4444 deu reputação a jNo em (3º) | [8.60] - Epic ServerTKs,
Olá, hoje eu trago esse OTServer com o objetivo de mudar a perspectiva dos usuários e OT-Admins em relação aos baiaks, bom, tentar mudar... enfim, esse servidor foi basicamente construído do “0”, diferente dos demais OTServer disponibilizados no fórum que são versões, e mais versões modificadas da base do Yurots (GOD BON), não que seja uma crítica, afinal, eu mesmo já fiz isso 2x, mas, tudo nessa vida precisa mudar ou para pior, ou para melhor, certo?
Nesse server eu tentei desenvolver algumas mudanças drásticas, mas sem perder muito a essência de um Baiak padrão, é claro, que em relação a cidade principal algumas coisas ficaram diferente, mas a jogabilidade, hunts, sistemas e quests (bem elaborados por sinal), ficaram bem shows.
O Epic Server foi construído e auxiliado com algumas partes de mapping e scripts de contribuintes do fórum, portanto o crédito não e só meu quando se olha esse aspecto, é de todo o fórum. Todos os sistemas e partes que compõe o server são atualizados, até a maioria dos scripts, e a datapack fornecida pelo grande @Fir3element
Por conta da faculdade estar me tomando muito tempo e o meu desempenho não tem sido muito bom, deixei alguns itens sem solução, mas estarei fazendo as atualizações assim que possível (no momento o server esta 99/100%), então por enquanto descreverei abaixo alguns avisos.
ALGUNS AVISOS:
1 – O server foi produzido para SQL, dentro da pasta Others contém uma database já com as querrys instalada, e também a lista das mesmas, se quiser por em MYSQL, vai ter que achar uma database que funcione com um site, e inserir essas querrys que consta na pasta "querrys sql" e converter em mysql (algumas ja foram convertidas, e no próprio arquivo do ot tem um link que redireciona para uma database mysql+site). 2 – Sobre as Houses, eu não criei elas no RME, por motivos óbvios, vai facilitar que membros que tenham interesse em fazer algumas mudanças estéticas no mapa as façam facilmente. (Você vai perder no máximo 30 mins criando no mapa, só lembre de cria-las usando a town principal "epic city"). 3 – O Evento Six e Chest Bps estão incompletos por enquanto, ainda estou aguardando um auxílio do portal para finalizar, e quando isso acontecer eu vou atualizando o tópico aqui com esses eventos finalizados, mas você pode facilmente inserir outros no lugar. 4 – A senha do admin é tibiaking/juliano 5 – O server possui o bug do elfbot, o bug do fast attack, eu inseri nas sources os códigos que corrigem esse bug, porém eu não estava conseguindo recompilar o projeto, se você souber, facilmente corrigira esse bug. (Não que seja um problema, mas, é mais interessante você deixar um fast attack editável pelo ot e não por um bug de compilação) E o @fir3element quando voltar a ativa vai corrigir isso no tópico. 6.1 - Também possui o bug do openchat, ja modifiquei nas sources também, e no server ja tem os arquivos e codigos instalados, basta mesmo compilar novamente. http://www.tibiaking.com/forum/forums/topic/67233-860-the-forgotten-server-04-sqlite-e-mysql/ 7 – Eu não sou scripter, então vai ficar difícil eu resolver algumas dúvidas relacionadas, eu sei o básico, mas posso tentar auxiliar, basta postar a foto com o erro, ou criar um tópico na seção de suporte que é o mais indicado. 8 - Recomendo deixar o server com os avisos em english, até os comandos etc... pois pelo que andei observando, bastantes grigos tem jogado os servers BR. 9 - O Server ja possui um sistema de points donate, bastar usar o comando /addpoints Fulano, 15 (Caso insira site, não sei, acho que não tera conflito com esse sistema, só lembre de converter as querys sql para mysql necessárias do script) 10 - O Baiak foi desenvolvido para um padrão, low>middle>high, mas nada exagerado, podendo alcançar em média, level 1200 no max. Você pode editar isso também, como as experiências das criaturas são padronizadas, basta diminuir a exp stage no config.lua, ou, no arquivo xml você muda e coloca uns stages melhores.
Qualquer bug demais não citados, ou critica/sugestões, comente aqui no tópico!
Obrigado aos usuários @Dwarfer, @Vodkart, @MaXwEllDeN, @Sekk, @pablobion, @JcA, @KotZletY, @DboExplorer, @rogaforyn2 @joadson e a toda comunidade! É nós, sem mais delongas:
-
kk4444 recebeu reputação de Igorzerah em Reward Chest & Boss Reward [TFS 1.2]Se eu não poder fazer isso por favor me avisem aqui no tópico que eu retiro. Créditos SOMENTE do: cbrm (OTLand) Tópico Oficial:https://otland.net/threads/reward-chest-boss-reward-tfs-1-2.233397/ Tested on TFS 1.2, 10.77/78
Based on http://www.tibia.com/news/?subtopic=newsarchive&id=2486 Oque tem?
To-do
Changelog
Comentários
Agradecimentos especiais para
Instruções de instalação
Execute a query na database
CREATE TABLE IF NOT EXISTS `player_rewardchest` ( `id` int(11) NOT NULL AUTO_INCREMENT, `player_id` int(11) NOT NULL, `reward` text NOT NULL, `date` bigint(20) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB; src/const.h
Abaixo...
ITEM_MARKET = 14405 ...Adicione:
ITEM_REWARD_CHEST = 21584, REWARD_CHEST_DEPOT = 99, src/depotchest.h
Abaixo...
explicit DepotChest(uint16_t _type);
...Adicione:
uint32_t getDepotId() const { return depotId; } void setDepotId(uint32_t id) { depotId = id; }
Abaixo...
uint32_t maxDepotItems; ...Adicione:
uint32_t depotId; src/depotchest.cpp
Abaixo...
maxDepotItems = 1500; ...Adicione:
depotId = 0; Acima...
return Container::queryAdd(index, thing, count, flags, actor); ...Adicione:
if (actor != nullptr && getDepotId() == REWARD_CHEST_DEPOT) { return RETURNVALUE_NOTPOSSIBLE; } src/depotlocker.h
Acima...
//cylinder implementations ...Adicione:
void setMaxLockerItems(uint32_t maxitems) { maxSize = maxitems; } src/luascript.h
Acima...
static int luaContainerGetSize(lua_State* L); ...Adicione:
static int luaContainerGetContentDescription(lua_State* L); src/luascript.cpp
Acima...
registerMethod("Container", "getSize", LuaScriptInterface::luaContainerGetSize); ...Adicione:
registerMethod("Container", "getContentDescription", LuaScriptInterface::luaContainerGetContentDescription); Acima...
int LuaScriptInterface::luaContainerGetSize(lua_State* L) ...Adicione:
int LuaScriptInterface::luaContainerGetContentDescription(lua_State* L) { // container:getContentDescription() Container* container = getUserdata<Container>(L, 1); if (container) { std::ostringstream ss; ss << container->getContentDescription(); pushString(L, ss.str()); } else { lua_pushnil(L); } return 1; } src/actions.cpp
Troque:
//depot container if (DepotLocker* depot = container->getDepotLocker()) { DepotLocker* myDepotLocker = player->getDepotLocker(depot->getDepotId()); myDepotLocker->setParent(depot->getParent()->getTile()); openContainer = myDepotLocker; player->setLastDepotId(depot->getDepotId()); } else { openContainer = container; } Por:
//reward chest and depot container if (item->getID() == ITEM_REWARD_CHEST) { DepotLocker* myRewardChest = player->getRewardChest(); myRewardChest->setParent(item->getTile()); openContainer = myRewardChest; player->setLastDepotId(REWARD_CHEST_DEPOT); } else if (DepotLocker* depot = container->getDepotLocker()) { DepotLocker* myDepotLocker = player->getDepotLocker(depot->getDepotId()); myDepotLocker->setParent(depot->getParent()->getTile()); openContainer = myDepotLocker; player->setLastDepotId(depot->getDepotId()); } else { openContainer = container; } src/player.h
Abaixo...
DepotLocker* getDepotLocker(uint32_t depotId); ...Adicione:
DepotLocker* getRewardChest(); src/player.cpp
Abaixo...
DepotChest* depotChest = new DepotChest(ITEM_DEPOT); ...Adicione:
depotChest->setDepotId(depotId); Acima...
void Player::sendCancelMessage(ReturnValue message) const ...Adicione:
DepotLocker* Player::getRewardChest() { auto it = depotLockerMap.find(REWARD_CHEST_DEPOT); if (it != depotLockerMap.end()) { inbox->setParent(it->second); return it->second; } DepotLocker* rewardChest = new DepotLocker(ITEM_LOCKER1); rewardChest->setDepotId(REWARD_CHEST_DEPOT); rewardChest->setMaxLockerItems(1); rewardChest->internalAddThing(getDepotChest(REWARD_CHEST_DEPOT, true)); depotLockerMap[REWARD_CHEST_DEPOT] = rewardChest; return rewardChest; } On player.cpp, container.cpp, inbox.cpp
Change:
if (!item->isPickupable()) { Por:
if (item->getID() != 21518 && !item->isPickupable()) { Adicione em @ data/actions/actions.xml
<!-- Reward Chest System --> <action itemid="21584" script="reward_chest.lua"/> <action actionid="21584" script="reward_chest.lua"/> Crie @ data/actions/scripts/reward_chest.lua
function onUse(player, item, fromPosition, target, toPosition, isHotkey) --Reward Chest if item:getId() == 21584 then if player:getExhaustion(REWARD_CHEST.STORAGE) > 0 then return player:sendCancelMessage('You need to wait ' .. string.diff(player:getStorageValue(REWARD_CHEST.STORAGE)-os.time()) .. ' before using this chest again.') end player:updateRewardChest() --Boss Corpse elseif item:getActionId() == 21584 then local reward = REWARD_CHEST.LOOT[tonumber(item:getAttribute('text'))][player:getGuid()] if reward ~= nil then local rewardBag = Container(doCreateItemEx(REWARD_CHEST.CONTAINER, 1)) addContainerItems(rewardBag, reward) if player:getCapacity() < rewardBag:getCapacity() then return player:sendCancelMessage(RETURNVALUE_NOTENOUGHCAPACITY) end if player:addItemEx(rewardBag, false) == RETURNVALUE_NOERROR then REWARD_CHEST.LOOT[tonumber(item:getAttribute('text'))][player:getGuid()] = nil player:sendCancelMessage('You have picked up a reward container.') else player:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) return true end end end return false end Adicione @ data/creaturescripts/creaturescripts.xml
<event type="kill" name="RewardChest" script="reward_chest.lua"/> Registre em @data/creaturescripts/scripts/login.lua
player:registerEvent("RewardChest") Adicione @ data/items/items.xml
<item id="21518" article="a" name="reward container"> <attribute key="weight" value="1800" /> <attribute key="containersize" value="24" /> <attribute key="slotType" value="backpack" /> </item> <item id="21584" article="a" name="reward chest"> <attribute key="type" value="depot" /> <attribute key="containerSize" value="1" /> <attribute key="description" value="This chest contains your rewards earned in battles." /> </item> Add @ data/lib/core/player.lua
function Player.setExhaustion(self, value, time) return self:setStorageValue(value, time + os.time()) end function Player.getExhaustion(self, value) local storage = self:getStorageValue(value) if storage <= 0 then return 0 end return storage - os.time() end Crie em @ data/creaturescripts/scripts/reward_chest.lua
(download anexado nesse post)
Download
RELEMBRANDO CRÉDITOS APENAS DO CBRM DA OTLAND
-
kk4444 recebeu reputação de Matheus Junior em Reward Chest & Boss Reward [TFS 1.2]Se eu não poder fazer isso por favor me avisem aqui no tópico que eu retiro. Créditos SOMENTE do: cbrm (OTLand) Tópico Oficial:https://otland.net/threads/reward-chest-boss-reward-tfs-1-2.233397/ Tested on TFS 1.2, 10.77/78
Based on http://www.tibia.com/news/?subtopic=newsarchive&id=2486 Oque tem?
To-do
Changelog
Comentários
Agradecimentos especiais para
Instruções de instalação
Execute a query na database
CREATE TABLE IF NOT EXISTS `player_rewardchest` ( `id` int(11) NOT NULL AUTO_INCREMENT, `player_id` int(11) NOT NULL, `reward` text NOT NULL, `date` bigint(20) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB; src/const.h
Abaixo...
ITEM_MARKET = 14405 ...Adicione:
ITEM_REWARD_CHEST = 21584, REWARD_CHEST_DEPOT = 99, src/depotchest.h
Abaixo...
explicit DepotChest(uint16_t _type);
...Adicione:
uint32_t getDepotId() const { return depotId; } void setDepotId(uint32_t id) { depotId = id; }
Abaixo...
uint32_t maxDepotItems; ...Adicione:
uint32_t depotId; src/depotchest.cpp
Abaixo...
maxDepotItems = 1500; ...Adicione:
depotId = 0; Acima...
return Container::queryAdd(index, thing, count, flags, actor); ...Adicione:
if (actor != nullptr && getDepotId() == REWARD_CHEST_DEPOT) { return RETURNVALUE_NOTPOSSIBLE; } src/depotlocker.h
Acima...
//cylinder implementations ...Adicione:
void setMaxLockerItems(uint32_t maxitems) { maxSize = maxitems; } src/luascript.h
Acima...
static int luaContainerGetSize(lua_State* L); ...Adicione:
static int luaContainerGetContentDescription(lua_State* L); src/luascript.cpp
Acima...
registerMethod("Container", "getSize", LuaScriptInterface::luaContainerGetSize); ...Adicione:
registerMethod("Container", "getContentDescription", LuaScriptInterface::luaContainerGetContentDescription); Acima...
int LuaScriptInterface::luaContainerGetSize(lua_State* L) ...Adicione:
int LuaScriptInterface::luaContainerGetContentDescription(lua_State* L) { // container:getContentDescription() Container* container = getUserdata<Container>(L, 1); if (container) { std::ostringstream ss; ss << container->getContentDescription(); pushString(L, ss.str()); } else { lua_pushnil(L); } return 1; } src/actions.cpp
Troque:
//depot container if (DepotLocker* depot = container->getDepotLocker()) { DepotLocker* myDepotLocker = player->getDepotLocker(depot->getDepotId()); myDepotLocker->setParent(depot->getParent()->getTile()); openContainer = myDepotLocker; player->setLastDepotId(depot->getDepotId()); } else { openContainer = container; } Por:
//reward chest and depot container if (item->getID() == ITEM_REWARD_CHEST) { DepotLocker* myRewardChest = player->getRewardChest(); myRewardChest->setParent(item->getTile()); openContainer = myRewardChest; player->setLastDepotId(REWARD_CHEST_DEPOT); } else if (DepotLocker* depot = container->getDepotLocker()) { DepotLocker* myDepotLocker = player->getDepotLocker(depot->getDepotId()); myDepotLocker->setParent(depot->getParent()->getTile()); openContainer = myDepotLocker; player->setLastDepotId(depot->getDepotId()); } else { openContainer = container; } src/player.h
Abaixo...
DepotLocker* getDepotLocker(uint32_t depotId); ...Adicione:
DepotLocker* getRewardChest(); src/player.cpp
Abaixo...
DepotChest* depotChest = new DepotChest(ITEM_DEPOT); ...Adicione:
depotChest->setDepotId(depotId); Acima...
void Player::sendCancelMessage(ReturnValue message) const ...Adicione:
DepotLocker* Player::getRewardChest() { auto it = depotLockerMap.find(REWARD_CHEST_DEPOT); if (it != depotLockerMap.end()) { inbox->setParent(it->second); return it->second; } DepotLocker* rewardChest = new DepotLocker(ITEM_LOCKER1); rewardChest->setDepotId(REWARD_CHEST_DEPOT); rewardChest->setMaxLockerItems(1); rewardChest->internalAddThing(getDepotChest(REWARD_CHEST_DEPOT, true)); depotLockerMap[REWARD_CHEST_DEPOT] = rewardChest; return rewardChest; } On player.cpp, container.cpp, inbox.cpp
Change:
if (!item->isPickupable()) { Por:
if (item->getID() != 21518 && !item->isPickupable()) { Adicione em @ data/actions/actions.xml
<!-- Reward Chest System --> <action itemid="21584" script="reward_chest.lua"/> <action actionid="21584" script="reward_chest.lua"/> Crie @ data/actions/scripts/reward_chest.lua
function onUse(player, item, fromPosition, target, toPosition, isHotkey) --Reward Chest if item:getId() == 21584 then if player:getExhaustion(REWARD_CHEST.STORAGE) > 0 then return player:sendCancelMessage('You need to wait ' .. string.diff(player:getStorageValue(REWARD_CHEST.STORAGE)-os.time()) .. ' before using this chest again.') end player:updateRewardChest() --Boss Corpse elseif item:getActionId() == 21584 then local reward = REWARD_CHEST.LOOT[tonumber(item:getAttribute('text'))][player:getGuid()] if reward ~= nil then local rewardBag = Container(doCreateItemEx(REWARD_CHEST.CONTAINER, 1)) addContainerItems(rewardBag, reward) if player:getCapacity() < rewardBag:getCapacity() then return player:sendCancelMessage(RETURNVALUE_NOTENOUGHCAPACITY) end if player:addItemEx(rewardBag, false) == RETURNVALUE_NOERROR then REWARD_CHEST.LOOT[tonumber(item:getAttribute('text'))][player:getGuid()] = nil player:sendCancelMessage('You have picked up a reward container.') else player:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) return true end end end return false end Adicione @ data/creaturescripts/creaturescripts.xml
<event type="kill" name="RewardChest" script="reward_chest.lua"/> Registre em @data/creaturescripts/scripts/login.lua
player:registerEvent("RewardChest") Adicione @ data/items/items.xml
<item id="21518" article="a" name="reward container"> <attribute key="weight" value="1800" /> <attribute key="containersize" value="24" /> <attribute key="slotType" value="backpack" /> </item> <item id="21584" article="a" name="reward chest"> <attribute key="type" value="depot" /> <attribute key="containerSize" value="1" /> <attribute key="description" value="This chest contains your rewards earned in battles." /> </item> Add @ data/lib/core/player.lua
function Player.setExhaustion(self, value, time) return self:setStorageValue(value, time + os.time()) end function Player.getExhaustion(self, value) local storage = self:getStorageValue(value) if storage <= 0 then return 0 end return storage - os.time() end Crie em @ data/creaturescripts/scripts/reward_chest.lua
(download anexado nesse post)
Download
RELEMBRANDO CRÉDITOS APENAS DO CBRM DA OTLAND
-
kk4444 recebeu reputação de noobdemoreno em Reward Chest & Boss Reward [TFS 1.2]Se eu não poder fazer isso por favor me avisem aqui no tópico que eu retiro. Créditos SOMENTE do: cbrm (OTLand) Tópico Oficial:https://otland.net/threads/reward-chest-boss-reward-tfs-1-2.233397/ Tested on TFS 1.2, 10.77/78
Based on http://www.tibia.com/news/?subtopic=newsarchive&id=2486 Oque tem?
To-do
Changelog
Comentários
Agradecimentos especiais para
Instruções de instalação
Execute a query na database
CREATE TABLE IF NOT EXISTS `player_rewardchest` ( `id` int(11) NOT NULL AUTO_INCREMENT, `player_id` int(11) NOT NULL, `reward` text NOT NULL, `date` bigint(20) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB; src/const.h
Abaixo...
ITEM_MARKET = 14405 ...Adicione:
ITEM_REWARD_CHEST = 21584, REWARD_CHEST_DEPOT = 99, src/depotchest.h
Abaixo...
explicit DepotChest(uint16_t _type);
...Adicione:
uint32_t getDepotId() const { return depotId; } void setDepotId(uint32_t id) { depotId = id; }
Abaixo...
uint32_t maxDepotItems; ...Adicione:
uint32_t depotId; src/depotchest.cpp
Abaixo...
maxDepotItems = 1500; ...Adicione:
depotId = 0; Acima...
return Container::queryAdd(index, thing, count, flags, actor); ...Adicione:
if (actor != nullptr && getDepotId() == REWARD_CHEST_DEPOT) { return RETURNVALUE_NOTPOSSIBLE; } src/depotlocker.h
Acima...
//cylinder implementations ...Adicione:
void setMaxLockerItems(uint32_t maxitems) { maxSize = maxitems; } src/luascript.h
Acima...
static int luaContainerGetSize(lua_State* L); ...Adicione:
static int luaContainerGetContentDescription(lua_State* L); src/luascript.cpp
Acima...
registerMethod("Container", "getSize", LuaScriptInterface::luaContainerGetSize); ...Adicione:
registerMethod("Container", "getContentDescription", LuaScriptInterface::luaContainerGetContentDescription); Acima...
int LuaScriptInterface::luaContainerGetSize(lua_State* L) ...Adicione:
int LuaScriptInterface::luaContainerGetContentDescription(lua_State* L) { // container:getContentDescription() Container* container = getUserdata<Container>(L, 1); if (container) { std::ostringstream ss; ss << container->getContentDescription(); pushString(L, ss.str()); } else { lua_pushnil(L); } return 1; } src/actions.cpp
Troque:
//depot container if (DepotLocker* depot = container->getDepotLocker()) { DepotLocker* myDepotLocker = player->getDepotLocker(depot->getDepotId()); myDepotLocker->setParent(depot->getParent()->getTile()); openContainer = myDepotLocker; player->setLastDepotId(depot->getDepotId()); } else { openContainer = container; } Por:
//reward chest and depot container if (item->getID() == ITEM_REWARD_CHEST) { DepotLocker* myRewardChest = player->getRewardChest(); myRewardChest->setParent(item->getTile()); openContainer = myRewardChest; player->setLastDepotId(REWARD_CHEST_DEPOT); } else if (DepotLocker* depot = container->getDepotLocker()) { DepotLocker* myDepotLocker = player->getDepotLocker(depot->getDepotId()); myDepotLocker->setParent(depot->getParent()->getTile()); openContainer = myDepotLocker; player->setLastDepotId(depot->getDepotId()); } else { openContainer = container; } src/player.h
Abaixo...
DepotLocker* getDepotLocker(uint32_t depotId); ...Adicione:
DepotLocker* getRewardChest(); src/player.cpp
Abaixo...
DepotChest* depotChest = new DepotChest(ITEM_DEPOT); ...Adicione:
depotChest->setDepotId(depotId); Acima...
void Player::sendCancelMessage(ReturnValue message) const ...Adicione:
DepotLocker* Player::getRewardChest() { auto it = depotLockerMap.find(REWARD_CHEST_DEPOT); if (it != depotLockerMap.end()) { inbox->setParent(it->second); return it->second; } DepotLocker* rewardChest = new DepotLocker(ITEM_LOCKER1); rewardChest->setDepotId(REWARD_CHEST_DEPOT); rewardChest->setMaxLockerItems(1); rewardChest->internalAddThing(getDepotChest(REWARD_CHEST_DEPOT, true)); depotLockerMap[REWARD_CHEST_DEPOT] = rewardChest; return rewardChest; } On player.cpp, container.cpp, inbox.cpp
Change:
if (!item->isPickupable()) { Por:
if (item->getID() != 21518 && !item->isPickupable()) { Adicione em @ data/actions/actions.xml
<!-- Reward Chest System --> <action itemid="21584" script="reward_chest.lua"/> <action actionid="21584" script="reward_chest.lua"/> Crie @ data/actions/scripts/reward_chest.lua
function onUse(player, item, fromPosition, target, toPosition, isHotkey) --Reward Chest if item:getId() == 21584 then if player:getExhaustion(REWARD_CHEST.STORAGE) > 0 then return player:sendCancelMessage('You need to wait ' .. string.diff(player:getStorageValue(REWARD_CHEST.STORAGE)-os.time()) .. ' before using this chest again.') end player:updateRewardChest() --Boss Corpse elseif item:getActionId() == 21584 then local reward = REWARD_CHEST.LOOT[tonumber(item:getAttribute('text'))][player:getGuid()] if reward ~= nil then local rewardBag = Container(doCreateItemEx(REWARD_CHEST.CONTAINER, 1)) addContainerItems(rewardBag, reward) if player:getCapacity() < rewardBag:getCapacity() then return player:sendCancelMessage(RETURNVALUE_NOTENOUGHCAPACITY) end if player:addItemEx(rewardBag, false) == RETURNVALUE_NOERROR then REWARD_CHEST.LOOT[tonumber(item:getAttribute('text'))][player:getGuid()] = nil player:sendCancelMessage('You have picked up a reward container.') else player:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) return true end end end return false end Adicione @ data/creaturescripts/creaturescripts.xml
<event type="kill" name="RewardChest" script="reward_chest.lua"/> Registre em @data/creaturescripts/scripts/login.lua
player:registerEvent("RewardChest") Adicione @ data/items/items.xml
<item id="21518" article="a" name="reward container"> <attribute key="weight" value="1800" /> <attribute key="containersize" value="24" /> <attribute key="slotType" value="backpack" /> </item> <item id="21584" article="a" name="reward chest"> <attribute key="type" value="depot" /> <attribute key="containerSize" value="1" /> <attribute key="description" value="This chest contains your rewards earned in battles." /> </item> Add @ data/lib/core/player.lua
function Player.setExhaustion(self, value, time) return self:setStorageValue(value, time + os.time()) end function Player.getExhaustion(self, value) local storage = self:getStorageValue(value) if storage <= 0 then return 0 end return storage - os.time() end Crie em @ data/creaturescripts/scripts/reward_chest.lua
(download anexado nesse post)
Download
RELEMBRANDO CRÉDITOS APENAS DO CBRM DA OTLAND
-
kk4444 recebeu reputação de nicholas1q em [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)Possui mto poucos bugs, mas vou flar algumas coisas q n tem,remount system (facil de implantar), n tem reward chest system, music box n funciona (facil de arrumar), oque eu lembro de ter testado é isso, e no distro tem um bug (falta de um code) minimo que vc consegue colocar qualquer coisa no lugar das weapons
-
kk4444 recebeu reputação de gabrielzapto em [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)REMOVIDO
-
kk4444 recebeu reputação de gabrielzapto em [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)Esse bug é nas sources, é facil arrumar esse bug, procura em Programção OTServ aqui no fórum.
-
kk4444 recebeu reputação de Nerivalhs em (Resolvido)[PREMIUM TILE] BugadoTente trocar o script por esse:
<movevent type="StepIn" actionid="9999" event="script" value="pisopremium.lua"/> function onStepIn(cid, item, position, fromPosition) local Denied = "Voce nao é Premium" -- mensagem que deseja que aparece quando não for premiun local Welcome = "Voce é Premium" if isPremium(cid) == false then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, Denied) doTeleportThing(cid, fromPosition, true) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, Welcome) doSendMagicEffect(position,13) end return true end Se ajudei, REP+
-
kk4444 deu reputação a Absolute em [UP-LEVEL] Recompensa ao subir de levelFala TKZIANOS de plantão WTF? AUEHAUHEA Mas ok...
Venho hoje trazer a vocês um sistema de ganhar uma recompensa ao conquistar determinado nível (Configurável)
Como funciona?
Quando o jogador conquistar determinado level ele recebe como recompensa X item ou GOLD!
Mais Absolute, o cara vai ficar se matando e upando de novo para ficar pegando a recompensa... NÃO! Quando o player conquista o level ele recebe uma STORAGE, essa storage faz com que salve isto, ou seja faz com que marque que o jogador já recebeu, se ele tentar burlar o sistema ele não vai receber pelo fato da tal STORAGE já estar gravada nele =p
Em data/creaturescripts/scripts crie um arquivo chamado uplevelabsolute.lua e coloque o seguinte dentro:
function onAdvance(cid, skill, oldLevel, newLevel) local config = { [50] = {item = 2160, count = 5}, [100] = {item = 2160, count = 15}, [150] = {item = 2160, count = 20}, [200] = {item = 2160, count = 25}, [250] = {item = 2160, count = 30}, [300] = {item = 2160, count = 50}, [350] = {item = 4891, count = 1}, [400] = {item = 4892, count = 1}, } if skill == 8 then for level, info in pairs(config) do if newLevel >= level and (getPlayerStorageValue(cid, 30700) == -1 or not (string.find(getPlayerStorageValue(cid, 30700), "'" .. level .. "'"))) then doPlayerAddItem(cid, info.item, info.count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Parabéns, você atingiu o level "..newLevel.." e ganhou "..info.count.." "..getItemNameById(info.item)..".") local sat = getPlayerStorageValue(cid, 30700) == -1 and "Values: '" .. level .. "'" or getPlayerStorageValue(cid, 30700) .. ",'" .. level .. "'" setPlayerStorageValue(cid, 30700, sat) end end end return TRUE end Em data/creaturescripts/creaturescripts.xml adicione a seguinte linha:
<event type="advance" name="UpAbsolute" event="script" value="uplevelabsolute.lua"/> Em data/creaturescripts/scripts/login.lua abaixo de registerCreatureEvent(cid, "Mail") adicione a seguinte linha:
registerCreatureEvent(cid, "UpAbsolute") Pronto, você implantou o sistema em seu servidor.
Como configurar:
[50] = {item = 2160, count = 5}, [50] = level que o player vai receber a tal recompensa
2160 = item que o player vai receber, no caso 2160 é o Crystal Coin
count = 5 = quantidade do item, no caso 5 Crystal Coins
Observação: Ao atingir o level o player receberá uma mensagem e o prêmio estará diretamente em sua backpack.
Qualquer dúvida peço que poste =D
Até o próximo sisteminha bb's.
-
kk4444 deu reputação a Absolute em (Resolvido)[Dúvida] Como deixar server on em windows 2003O IP do VPS é fixo, não muda.
-
kk4444 recebeu reputação de ViitinG em Duvida em system criticalCreio que não dá
Ajudei ?REP+
-
kk4444 recebeu reputação de danrleydn em Ajuda com MySQLposta seu config.lua em spoiler
-
kk4444 deu reputação a Absolute em [Castle War 24H] Conquiste o trono!Fala galera linduxa do TK; hoje trago a vocês o tão desejado CASTLE WAR 24 HORAS, isto gera disputa intensa entre as guilds de seu servidor, atraindo assim mais jogadores que se interessam por guerras e seus demais sistemas! Modificado e com funções diferentes, no tópico ensinarei como instalar e como funciona.
Como funciona? WOOOOOOOOW!
Há um portal 24h aberto em algum lugar do seu mapa que ficará com o castle disponível 24h (avá).
Quando uma guild qualquer acessar o portal do castelo, irá aparecer para o servidor que a X guild está tentando dominar o castelo, então o líde da guild dominante atual irá dizer !gocastle para teleportar ao castelo e defende-lo.
O Objetivo para conquista do mesmo é invadi-lo derrotar os defensor da guild atual para abrir passagem, digamos assim, e subir ao trono, quando um membro da guild invadir o templo do trono e subir no mesmo a antiga guild dominadora é teleportada para o templo e o castelo fica sob domínio da nova guild.
Você poderá colocar como premiação acesso a áreas exclusivas do castelo, no caso hunts e cia. (Fica a vosso critério)
Evento testado nas versões 8.6; 9.6; 9.83; 9.86!
Observação:
Comando !gocastle faz com que o líder possa teleportar todos os membros da sua guild online para perto dele, desde que ele esteja no castle. Comando pode ser usado a cada 3 horas (exhausted).
Vamos aos scripts do sistema;
Em data/actions/scripts crie um arquivo com o nome de naviocastle.lua e coloque dentro:
function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.actionid == 65500) then if getTopCreature({x=32464,y=32378,z=5}).uid > 0 then doTeleportThing(getTopCreature({x=32464,y=32378,z=5}).uid, {x=32526,y=32421,z=5}) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) else doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.") return true end elseif (item.actionid == 65501) then if getTopCreature({x=32526,y=32421,z=5}).uid > 0 then doTeleportThing(getTopCreature({x=32526,y=32421,z=5}).uid, {x=32464,y=32378,z=5}) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) else doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.") end end return true end
Em actions.xml adicione a seguinte linha:
<action actionid="65500-65501" event="script" value="naviocastle.lua"/> Pós feito isto, em data/lib crie um arquivo com o nome de 015-COH e adicione dentro dele:
-- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // COH_PUSHTIME = 10800 -- Tempo (em segundos) de exhausted para usar o comando !gocastle - Padrão (3 horas) COH_AREA = {{x = 32458, y = 32332, z = 7}, {x = 32558, y = 32429, z = 7}} -- Canto superior esquerdo / inferior direito do Castle -- // Não mexa daqui para baixo COH_STATUS = 201320111714 COH_PREPARE1 = 201320111715 COH_PUSHSTOR = 201320111716 COH_PREPARE2 = 201320111717 function doCastleRemoveEnemies() for index, creature in ipairs(getPlayersOnline()) do if isInArea(getThingPos(creature), COH_AREA[1], COH_AREA[2]) then if getPlayerGuildName(creature) ~= getGlobalStorageValue(COH_STATUS) then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature))) end end end return true end Proximo passo, em data/monster.xml adicione a seguinte linha:
<monster name="Castle Guardian" file="Castle Guardian.xml"/> Em data/monsters crie um arquivo com o nome de Castle Guardian.xml e adicione o seguinte:
<?xml version="1.0" encoding="UTF-8"?> <monster name="Castle Guardian" nameDescription="a castle guardian" race="blood" experience="0" speed="0" manacost="0"> <health now="800000" max="800000"/> <look type="131" head="57" body="19" legs="57" feet="95" addons="1" corpse="6080"/> <targetchange interval="5000" chance="30"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="4"/> <flag staticattack="90"/> <flag runonhealth="800"/> </flags> <attacks> <attack name="melee" interval="2000" min="-60" max="-180"/> <attack name="physical" interval="1000" chance="35" range="7" min="-205" max="-385"> <attribute key="shootEffect" value="energy"/> </attack> <attack name="manadrain" interval="1000" chance="17" range="7" min="-205" max="-560"/> <attack name="speed" interval="1000" chance="12" range="7" speedchange="-600" duration="40000"> <attribute key="areaEffect" value="redshimmer"/> </attack> <attack name="fire" interval="2000" chance="45" range="7" radius="3" target="1" min="-250" max="-420"> <attribute key="shootEffect" value="burstarrow"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="20" range="7" radius="2" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="2000" chance="25" length="8" spread="0" min="-265" max="-445"> <attribute key="areaEffect" value="energy"/> </attack> <attack name="speed" interval="6000" chance="10" range="5" speedchange="-600" duration="20000"> <attribute key="areaEffect" value="redshimmer"/> </attack> </attacks> <defenses armor="1" defense="1"/> <elements> <element firePercent="100"/> <element energyPercent="100"/> <element icePercent="100"/> <element earthPercent="90"/> <element holyPercent="-25"/> <element physicalPercent="-33"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="deathspawn" interval="1500" chance="0" max="0"/> </summons> <loot> <item id="2148" countmax="20" chance1="100000" chancemax="0"/> </loot> </monster> Pós isto;
Em data/movements/scripts crie um arquivo com o nome de COH.lua e adicione o seguinte:
-- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "CoH", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não pertence á guild "..getGlobalStorageValue(COH_STATUS)..".") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão no comando do castelo, vá dominar e impedir isso!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está tentando dominar o castelo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está muito próxima do domínio, ataquem!") end end return true end Em data/movements/movements.xml adicione a seguinte linha:
<movevent type="StepIn" actionid="16200-16203" event="script" value="COH.lua"/> Próximo passo:
Em data/talkactions/scripts crie um arquivo com o nome de COHABSOLUTE.lua e adicione o seguinte:
-- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // function onSay(cid, words, param) if getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER then if getPlayerStorageValue(cid, COH_PUSHSTOR) < os.time() then if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then if isInArea(getThingPos(cid), COH_AREA[1], COH_AREA[2]) then if #getMembersOnline(getPlayerGuildId(cid)) > 0 then for index, creature in ipairs(getMembersOnline(getPlayerGuildId(cid))) do if (getTileInfo(getThingPos(creature)).protection ~= true) then return doPlayerSendCancel(cid, "[CoH] Os membros devem estar em área PZ.") end doTeleportThing(creature, getThingPos(cid)) end setPlayerStorageValue(cid, COH_PUSHSTOR, os.time() + COH_PUSHTIME) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "[Castle of Honor] Você teleportou seus membros, comando pode ser usado a cada "..tostring(COH_PUSHTIME / 60).." minuto(s).") else doPlayerSendCancel(cid, "[CoH] Para executar isso, sua guild deve ter 2 ou mais membros online.") end else doPlayerSendCancel(cid, "[CoH] Você deve estar no castelo.") end else doPlayerSendCancel(cid, "[CoH] Sua guild não é dona do castelo.") end else doPlayerSendCancel(cid, "[CoH] Você deve aguardar "..tostring(math.ceil((getPlayerStorageValue(cid, COH_PUSHSTOR) - os.time()) / 60)).." minuto(s) para usar este comando.") end else doPlayerSendCancel(cid, "[CoH] Você deve ser líder de uma guild para executar este comando.") end return true end function getMembersOnline(id) local mbr = {} for index, creature in ipairs(getPlayersOnline()) do if getPlayerGuildId(creature) == id then if getCreatureSkullType(creature) < 3 then table.insert(mbr, creature) end end end return mbr or #mbr end Em data/talkactions/talkactions.xml adicione a seguinte linha:
<talkaction words="!castlepush;!pushmembers;!gocastle" event="script" value="COHABSOLUTE.lua"/> Quem disponibiliza o mapa do castelo a vocês é nosso amigo ViitinG, segue o link do tópico para download do mesmo já adaptado para este Castle:
http://www.tibiaking.com/forum/topic/35730-mapa-evento-war-castle/
Explicação das actions e demais (caso não use o mapa disponibilizado pelo Viiting lembre de adicionar ao castelo);
ActionID 16200 - No meio do caminho para o castelo, ActionID 16201 - Perto do castelo, ActionID 16202 - No piso, trono que faz com que domine, e ActionID 16203 - Para a passagem de acesso ás hunts / city exclusivas da guild vencedora. Importante: Para colocar uma passagem para as hunts ou o que for a premiação da guild vencedora, coloque um caminho único com os actionIDS 16203, assim só a guild dominante do castelo poderá passar neste local. É importante lembrar que este script é de autoria do Roksas Nunez, ex scripter da empresa chaitosoft, fiz simples modificações de otimização.
Qualquer dúvida peço que entre em contato comigo e poste aqui no tópico.
Créditos:
Absolute
Roksas
ViitinG
Espero que gostem, afinal raro alguém disponibilizar algo tão desejado e útil assim!
Até o próximo sistema.
Absolute on tibiaking =p
-
kk4444 recebeu reputação de larafaz em [RESOLVIDO] quantidade de slots na Bagposta seu creaturescripts.xml pois n lembro o nome do arquivo .lua que e to sem nenhum ot aki
-
kk4444 deu reputação a MaXwEllDeN em Alterando mensagem inicial do distroArquivo otserv.cpp
-
kk4444 deu reputação a DeathRocks em [8.60]Baiak Barao Editado DeathRocksFala Ae Galera do TibiaKing
Estou mais um vez disponibilizando um Baiak Barao que Acabei de Editar
Espero Que Gostem
Oque eu Mudei e Adicionei ?
-| Novo Visual do Templo
-| Aura System (comando !aura on)
-| Task System
-| Dodge System
-| Run Event (CORRIDA MALUCA)
-| Reset System (ÁREA EXCLUSIVA COM CASTELO E HUNTS) para resetar fale !reset
-| Guild Frags System (ÁREA EXCLUSIVA COM CASTELO E HUNTS)
-| War System (100% RODANDO EM SQLITE)
-| Cast System (100% Roda em Mysql ) ( Para Ativar vai em Config.lua e ache | enableCast = false | mude para true ) Duvidas entrem em http://www.tibiaking.com/forum/topic/34609-add-cast-system-pra-quem-já-tem-os-códigos-na-distro/
-| PvP Balanceado
-| Varios Eventos Automaticos
-| Battle Field Event
-| Capture The Flag Event
-| Adicionado CASTLE 24HORAS (COM CASTELO) e AVISOS DE INVASORES
-| Itens DONATES
-| Área DONATE ~~ (Só Entra Quem Usar o Itens)
-| Vários Novos Script
-| Fast Atk Arrumado
-| Distro 0.4 Rodando 100% ( Se For 64x Bits)
-| Refinamento ( Aprimora seu Item )
-| Level Points System Adicionado (Melhora Seu Skill)
-| Frags no Look
-| Npc Major Ancient (Vende Itens Exclusivos para quem tiver honor points) Obs:Consegue no GFS)
-| Fly System Adicionado fale !fly
-| e Muito Mais que Não Lembro
-| CONFIRA ~~ !
-| SENHA DO GOD: barao/styller
~~ Algumas Imagens do Servidor ~~
CASTELO GFS Localizado na Barao City
Castelo Reset System Localizado na Barao City
Amostra do CASTLE War 24HORAS Vista por Cima
CASTLE WAR 24 HORAS Vista por Baixo + Amostra de Invasão
Donate Área
Amostra de Itens Donate
Amostra de Systema de Points
Amostra do Refinamento
TEMPLO
-| Download
http://www.4shared.com/rar/kv68Q66Hba/Baiak_Barao_Editado_By_DeathRo.html?
-| Scan
https://www.virustotal.com/pt/file/b036f248977d3b75e8fc205983b449a2fd68a942e62a48963adfcfa49fd954b8/analysis/1402686644/
-| Créditos
Gostou ? então dei um +REP Não vai cair o Dedo
-
kk4444 deu reputação a join em (Resolvido)Erro ao instalar siteO correto é
ALTER TABLE `accounts` ADD `vipdays` INT( 11 ) DEFAULT 0;
-
kk4444 recebeu reputação de Amanditaah em Erro na pagina do siteTroca o seu latestnew.php por esse:
-
kk4444 deu reputação a ViitinG em Item que teleporta o player para house@kk4444 - Sim :
function onUse(cid, item, fromPosition, itemEx, toPosition) if not getTilePzInfo(getThingPos(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Desculpe, voce nao esta em protection zone.") end if hasCondition(cid, CONDITION_INFIGHT) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Desculpe, voce esta em batalha.") end if getPlayerLevel(cid) < getConfigInfo("levelToBuyHouse") then return doPlayerSendCancel(cid, "Sorry, not possible.") end if not getHouseByPlayerGUID(getPlayerGUID(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Desculpe, você não tem house.") end doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))) doRemoveItem(item.uid, 1) return true end