
firstemperor
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
firstemperor deu reputação a Rogex Joyz em TFS 1.4 - Donos de houses podem colocar tapestries ou qualquer item na parede do lado de fora da house. Como fazer?Apenas passe o sqm da house por dentro das paredes, para que aquele sqm conte como "house". Perceba na imagem que o piso de dentroda house está verde, logo ali dentro conta como house. Agora, se você passar esse piso "verde" (house tile) onde fica as paredes, elas passarão a ser parte da house. Espero que funcione!
-
firstemperor deu reputação a Sergio R em [TFS 1.x] Talkactions: !aol / !blessBoa tarde!
comigo não funcionou nenhum dos códigos que achei. Eu uso OTX com a versão do TFS 1.3.
Criei uma linha nova no arquivo talkactions.xml dentro da pasta Talkactions.
<talkaction words="!bless" script="bless.lua"/> e criei um arquivo novo com o nome bless.lua na pasta scripts.
function onSay(cid) local player = Player(cid) local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.7 if player:getBlessings() == 5 then player:sendCancelMessage("You already have been blessed!", cid) elseif player:removeMoney(totalBlessPrice) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!") for b = 1, 5 do player:addBlessing(b, 1) end player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) else player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid) end end O valor da bless poderá ser alterado conforme o gosto, basta trocar o 0.7 pelo valor desejado.
Espero ajudar!!
Abraço
-
firstemperor deu reputação a Forged em [BOSS TELEPORT ROOM] Pefect SystemEste script funciona perfeitamente qual quer problema comente no topico.
basta ser adicionado em action.xml com um action e adicionado ao mapa.
local t = { players = { -- posições que os players devem ficar ao puxar a alavanca [1] = Position(33395,32661,6), [2] = Position(33394,32662,6), [3] = Position(33395,32662,6), [4] = Position(33395,32663,6), [5] = Position(33396,32662,6) }, boss = {name = "Scarlett Etzel", create_pos = Position(33396,32642,6)}, destination = Position(33395,32656,6), -- posição para qual os players serão teleportados cooldown = {0, "sec"}, -- tempo para ser teleportado novamente. Ex.: {2, "sec"}, {5, "min"}, {10, "hour"}, {3, "day"} storage = 56482 -- storage não utilizado no seu servidor } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local players, tab = {}, t.players for i = 1, #tab do local tile = Tile(tab) if tile then local p = Player(tile:getTopCreature()) if p then if p:getStorageValue(t.storage) <= os.time() then players[#players + 1] = p:getId() end end end end if #players == 0 then player:sendCancelMessage("One or all players did not wait " .. getStrTime(t.cooldown) .. " to go again.") return true end for i = 1, #tab do local playerTile = Tile(tab) local playerToGo = Player(playerTile:getTopCreature()) if playerToGo then if isInArray(players, playerToGo:getId()) then playerToGo:setStorageValue(t.storage, mathtime(t.cooldown) + os.time()) playerTile:relocateTo(t.destination) tab:sendMagicEffect(CONST_ME_POFF) end end end t.destination:sendMagicEffect(CONST_ME_TELEPORT) Game.createMonster(t.boss.name, t.boss.create_pos) item:transform(item.itemid == 36319 or 1946 or 1945) return true end local boss_room = {fromPos = Position(33386, 32639, 6), toPos = Position(33405, 32659, 6)} local bossplayer = Player(cid) local exit = Position(33395, 32659, 6) if bossplayer and isInRange(bossplayer:getPosition(), boss_room.fromPos, boss_room.toPos) then bossplayer:teleportTo(exit) end function mathtime(table) -- by dwarfer local unit = {"sec", "min", "hour", "day"} for i, v in pairs(unit) do if v == table[2] then return table[1](60^(v == unit[4] and 2 or i-1))(v == unit[4] and 24 or 1) end end return error("Bad declaration in mathtime function.") end function getStrTime(table) -- by dwarfer local unit = {["sec"] = "second",["min"] = "minute",["hour"] = "hour",["day"] = "day"} return tostring(table[1].." "..unit[table[2]]..(table[1] > 1 and "s" or "")) end
? Crédito total ao Desenvolvedor que disponibilizou para toda nossa comunidade: @Underewar
Obrigado pela Contribuição!
-
firstemperor deu reputação a Vodkart em [8.6] [Talkactions] - Find ItemÉ um comando para procurar determinado item no servidor, ele procura em:
*Jogador
*Depot
*House Tiles
basta usar o comando /find NOME DO ITEM
exemplo: /find solar axe
Obs: Como é feito por DB, os items só ficaram salvo quando der serve save(hora que altera os valores na data base), então se o jogador receber o item as 15:00 e só de serve save as 16:00, só irá aparecer no comando as 16:00 horas.
talkactions
finditem.lua
function onSay(cid, words, param) if param == '' or tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "/find item name") return true end local item_id = getItemIdByName(tostring(param), false) if not item_id then doPlayerSendCancel(cid, "This item does not exist.") return true end local str, player_depotitems, players_items, tile_items = "",{},{},{} local dp = db.getResult("SELECT `player_id`, `count` FROM `player_depotitems` WHERE `itemtype` = "..item_id),{} if (dp:getID() ~= -1) then repeat player_depotitems[#player_depotitems+1] = {dp:getDataInt("player_id"), dp:getDataInt("count") } until not(dp:next()) dp:free() end local pi = db.getResult("SELECT `player_id`, `count` FROM `player_items` WHERE `itemtype` = "..item_id),{} if (pi:getID() ~= -1) then repeat players_items[#players_items+1] = {pi:getDataInt("player_id"), pi:getDataInt("count") } until not(pi:next()) pi:free() end local hi = db.getResult("SELECT `tile_id`, `count` FROM `tile_items` WHERE `itemtype` = "..item_id),{} if (hi:getID() ~= -1) then repeat local tile = db.getResult("SELECT `house_id`, `x`, `y`, `z` FROM `tiles` WHERE `id` = "..hi:getDataInt("tile_id")),{} tile_items[#tile_items+1] = {tile:getDataInt("house_id"),tile:getDataInt("x"),tile:getDataInt("y"),tile:getDataInt("z")} until not(hi:next()) hi:free() end if #player_depotitems > 0 then str = str .. "#DEPOT ITEMS#\nQuantidade - Jogador\n" for i = 1, table.maxn(player_depotitems) do str = str .. player_depotitems[i][2] .. ' ' .. getPlayerNameByGUID(player_depotitems[i][1]) ..' \n' end end if #players_items > 0 then str = str .. (str ~= "" and "--------------//-------------\n\n#PLAYER ITEMS#\nQuantidade - Jogador\n" or "#PLAYER ITEMS#\nQuantidade - Jogador\n") for i = 1, table.maxn(players_items) do str = str .. players_items[i][2] .. ' ' .. getPlayerNameByGUID(players_items[i][1]) ..' \n' end end if #tile_items > 0 then str = str .. (str ~= "" and "--------------//-------------\n\n#TILE ITEMS#\nHouse ID - Tile Position\n" or "#TILE ITEMS#\nHouse ID -Tile Position\n") for i = 1, table.maxn(tile_items) do str = str .. tile_items[i][1] .. ' - {x = ' .. tile_items[i][2] ..', y = ' .. tile_items[i][3] ..', z = ' .. tile_items[i][4] ..'} \n' end end return doShowTextDialog(cid,item_id, str) end
TAG
<talkaction log="yes" words="!find;/find" access="5" event="script" value="finditem.lua"/>
-
firstemperor deu reputação a EddyHavoc em [TFS 1.3] Goldchange - Converter 100 gold coin em 1 platinum coin e 100 platinum coin em 1 crystal coin[TFS 1.3] Goldchange - Converter 100 gold coin em 1 platinum coin e 100 platinum coin em 1 crystal coin
Muitos dos novos servers não tem mais esta função facilitadora que os jogadores tanto adoram! Por este motivo venho compartilhar aqui com vocês.
gold_change.lua
Em Data/Scripts/Actions/Other/ crie um arquivo .lua chamado gold_change.lua e insira o código abaixo:
CRÉDITOS:
@EddyHavoc