TekaZudo
seuserver.com.br
DESCRIÇÃO
Anuncie aqui neste countdown e dê maior visibilidade ao seu lançamento |
Full Global • Custom Quests • Custom Outfits • Lottery System • Version 15x
Inicia em:
--
Participar
Histórico de Curtidas
-
Matheus Junior deu reputação a Pedriinz em Alguem ajuda +Rep / Aol nao someEu não fiz nada kkkkkk só apontei o erro.
Que bom que resolveu! Boa sorte
-
Matheus Junior deu reputação a Pedriinz em Alguem ajuda +Rep / Aol nao someQue versão tfs?
O problema é aqui: if getPlayerFlagValue(player, PlayerFlag_NotGenerateLoot)
Isso é 1.0? Infelizmente se for não vou poder te ajudar
-
Matheus Junior deu reputação a luanluciano93 em [TFS 1.x] Talkactions: !aol / !blessVá em talkactions/talkactions.xml e add as tags:
<talkaction words="!aol" script="!aol.lua"/> <talkaction words="!bless" script="!bless.lua"/> Agora crie 2 arquivos .lua em talkactions/scripts/ com os nomes: !aol.lua e !bless.lua.
Depois coloque o código dentro dos respectivos arquivos:
!aol.lua
!bless.lua
Bem simples pessoal, abraços!
-
Matheus Junior deu reputação a kk4444 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
-
Matheus Junior deu reputação a Qwizer em [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)Global 11/12x [v32]
- New Falcons
- New Asuras
- Warzone 4,5,6
- Exercise Training
- Raids 100%
- Monstros 100%
- Trainer Offline 100%
- Trainer Online 100%
- Taming system funcionando 100%;
- Database completa
- War System 100%
- Global MAP Full
- Store 100%
- Imbuement
- Prey System
- Entre outros sistemas.
Projeto no: GITHUB
Scan Vírus Total
IMAGES
Créditos: