Ir para conteúdo
US
Blazera 8.60
blazera.net
SOBRE O BLAZERA
Um fresh start em um servidor 8.6 clássico, com real map, focado na experiência raiz do Tibia. | Classic Real Map • Fresh Start • Client 8.6 • Old School Gameplay • Active Community
Inicia em: --
Participar

Crypter

Membro
  • Registro em

  • Última visita

Tudo que Crypter postou

  1. Você coloca assim no items.xml <item id="id no items.otb do item" article="a" name="Nome do item"></item> nao esqueçe de arrumar
  2. @bismarkzika teste a minha script smt
  3. local blocked_items = {x,y,z} -- id dos items a ser movido if isInArray(item.itemid, blocked_items) then local item_toPos = getThingByPos(toPos) local blocked_tiles = {e,r,t}-- id dos pisos que não podem jogar os items da tabela blocked_items if isInArray(item_toPos.itemid, blocked_tiles) then return false and doPlayerSendCancel(cid, 'You can not put this object in this place.') and false end end Como essa função tem várias versões eu não sei a sua, então insira isso no seu código e veja se ele usar toPos ou toPosition e então arrume a 1° linha
  4. Esse sistema é algo muito complexo ninguém vai fazer pra ti de graça, se quiser mesmo o sistema vai atrás de um programador
  5. A conta deve ter alguma house vinculada a ela, você vai ter que dar um jeito de tirar a house
  6. Precisa da funçã OnMoveItem na source
  7. Gosto da minha script ne safado, dei uma melhorada nela pra ti, bom uso
  8. function doSendFlamingSphere(cid, target) local effectType = 3 -- effect local posTarget = getCreaturePosition(cid) local posEffect = { {x=posTarget.x, y=(posTarget.y)-1, z=posTarget.z}, {x=(posTarget.x)+1, y=posTarget.y, z=posTarget.z}, {x=posTarget.x, y=(posTarget.y)+1, z=posTarget.z}, {x=(posTarget.x)-1, y=posTarget.y, z=posTarget.z}, {x=posTarget.x, y=(posTarget.y)-1, z=posTarget.z} } for i=1, 4, 1 do if isCreature(cid) and isCreature(target) then addEvent(doSendDistanceShoot, 625*i, {x=posEffect[i].x, y=posEffect[i].y, z=posEffect[i].z}, {x=posEffect[i+1].x, y=posEffect[i+1].y, z=posEffect[i+1].z}, effectType) end end return true end function onCastSpell(cid, var) local target = getCreatureTarget(cid) local mana = 8 local chance = 45 local repeticao = (getPlayerLevel(cid))-1 if repeticao > 8 then local repeticao = 8 end if getCreatureMana(cid) >= mana or getPlayerAccess(cid) >= 3 then doAddCondition(cid, condition) if chance > math.random(1,100) then doCombat(cid, combat, var) end doCreatureAddMana(cid, -mana) if isCreature(cid) and isCreature(target) then doSendFlamingSphere(target) end for i=1, repeticao, 1 do if isCreature(cid) and isCreature(target) then addEvent(doSendFlamingSphere, 2500*i, target) end end for i=1, repeticao, 1 do if chance > math.random(1,100) then addEvent(doCombat, 2500*i, cid, combat, var) end end else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid,"You don't have enough mana.") end return true end
  9. function doSendFlamingSphere(cid, target) local effectType = 3 -- effect local posTarget = getCreaturePosition(cid) local posEffect = { {x=posTarget.x, y=(posTarget.y)-1, z=posTarget.z}, {x=(posTarget.x)+1, y=posTarget.y, z=posTarget.z}, {x=posTarget.x, y=(posTarget.y)+1, z=posTarget.z}, {x=(posTarget.x)-1, y=posTarget.y, z=posTarget.z}, {x=posTarget.x, y=(posTarget.y)-1, z=posTarget.z} } for i=1, 4, 1 do if isCreature(cid) and isCreature(target) then addEvent(doSendDistanceShoot, 625*i, {x=posEffect[i].x, y=posEffect[i].y, z=posEffect[i].z}, {x=posEffect[i+1].x, y=posEffect[i+1].y, z=posEffect[i+1].z}, effectType) end end return true end function onCastSpell(cid, var) local target = getCreatureTarget(cid) local mana = 8 local chance = 45 local repeticao = (getPlayerLevel(cid))-1 if repeticao > 8 then local repeticao = 8 end if getCreatureMana(cid) >= mana or getPlayerAccess(cid) >= 3 then doAddCondition(cid, condition) if chance > math.random(1,100) then doCombat(cid, combat, var) end doCreatureAddMana(cid, -mana) doSendFlamingSphere(target) for i=1, repeticao, 1 do addEvent(doSendFlamingSphere, 2500*i, target) end for i=1, repeticao, 1 do if chance > math.random(1,100) then addEvent(doCombat, 2500*i, cid, combat, var) end end else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid,"You don't have enough mana.") end return true end
  10. Precisa registrar nos monstros e no player.
  11. local config = { levelRequiredToAdd = 20, maxOffersPerPlayer = 5, SendOffersOnlyInPZ = true, blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933} } function onSay(player, words, param) if param == '' then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = param:split(",") if t[1] == "add" then if not t[2] or not t[3] or not t[4] then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if not tonumber (t[3]) or not tonumber(t[4]) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.") return true end if string.len(t[3]) > 7 or string.len(t[4]) > 3 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.") return true end local item = getItemIdByName(t[2]) if not item then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end if player:getLevel() < config.levelRequiredToAdd then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.") return true end if table.contains(config.blocked_items, item) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.") return true end if player:getItemCount(item) < tonumber(t[4]) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).") return true end local check = db.storeQuery("SELECT `id` FROM `auction_system` WHERE `player` = " .. player:getGuid() .. ";") if check:getID() == -1 then elseif check:getRows(true) >= config.maxOffersPerPlayer then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")") return true end if config.SendOffersOnlyInPZ then if not Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.") return true end end if tonumber(t[4]) < 1 or tonumber(t[3]) < 1 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.") return true end local itemcount, costgp = math.floor(t[4]), math.floor(t[3]) player:removeItem(item, itemcount) db.query("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. player:getGuid() .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")") player:sendTextMessage(MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.") end if t[1] == "buy" then if not tonumber(t[2]) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end local buy = db.storeQuery("SELECT * FROM `auction_system` WHERE `id` = " .. tonumber(t[2]) .. ";") if buy:getID() ~= -1 then if player:getMoney() < buy:getNumber("cost") then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.") buy:free() return true end if ( player:getName() == getPlayerNameByGUID(buy:getNumber("player")) ) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.") buy:free() return true end if player:getFreeCapacity() < getItemWeightById(buy:getNumber("item_id"), buy:getNumber("count")) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getString("item_name") .. ". It weight " .. getItemWeightById(buy:getNumber("item_id"), buy:getNumber("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.") buy:free() return true end local itemStacks = ItemType(buy:getString("item_id")):isStackable() if itemStacks then player:addItem(buy:getString("item_id"), buy:getNumber("count")) else for i = 1, buy:getNumber("count") do player:addItem(buy:getString("item_id"), 1) end end player:removeMoney(buy:getNumber("cost")) db.query("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") player:sendTextMessage(MESSAGE_INFO_DESCR, "You bought " .. buy:getNumber("count") .. " ".. buy:getString("item_name") .. " for " .. buy:getNumber("cost") .. " gps!") db.query("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getNumber("cost") .. " WHERE `id` = " .. buy:getNumber("player") .. ";") buy:free() else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if t[1] == "remove" then if not tonumber(t[2]) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end if config.SendOffersOnlyInPZ then if not Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.") return true end end local delete = db.storeQuery("SELECT * FROM `auction_system` WHERE `id` = " .. tonumber(t[2]) .. ";") if delete:getID() ~= -1 then if player:getGuid() == delete:getNumber("player")) then db.query("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") local itemStack = ItemType(delete:getString("item_id")):isStackable() if itemStack then player:addItem(delete:getString("item_id"), delete:getNumber("count")) else for i = 1, delete:getNumber("count") do player:addItem(delete:getString("item_id"), 1) end end player:sendTextMessage(MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.") else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!") end delete:free() else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if t[1] == "withdraw" then local balance = db.storeQuery("SELECT `auction_balance` FROM `players` WHERE `id` = " .. player:getGuid() .. ";") if balance:getNumber("auction_balance") < 1 then player:sendTextMessage(MESSAGE_INFO_DESCR, "You don't have money on your auction balance.") balance:free() return true end player:sendTextMessage(MESSAGE_INFO_DESCR, "You got " .. balance:getNumber("auction_balance") .. " gps from auction system!") player:addMoney(balance:getNumber("auction_balance")) db.query("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. player:getGuid() .. ";") balance:free() end if t[1] == "list" then local result = db.storeQuery("SELECT * FROM `auction_system` ORDER BY `auction_system`.`id` ASC") if result:getID() == -1 then return true end local msg = "Trade Offline:\n\n!offer buy, ID\n!offer remove, ID\n!offer add, ItemName, ItemPrice, ItemCount\n\n" while true do local id = result:getString("id") local name = getPlayerNameByGUID(result:getString("player")) local item_name = getItemNameById(result:getString("item_id")) local count = result:getString("count") local custo = result:getString("cost")/1000 local custo2 = result:getString("cost") if isPlayer() then msg = ""..msg.."ID : "..id.."\nItem Name : "..item_name.." - Item Count : "..count.." - Item Cust : "..custo.."k("..custo2.."GP) - Dono : "..name.."\n" end if not result:next() then break end end player:popupFYI(msg) return true end return true end
  12. Quando você for usar uma função dentro de uma spell coloca local antes fuction ficando assim: local function x(y,z) Assim a função só ira funciona nesse seu arquivo
  13. local skulls = {SKULL_WHITE, SKULL_YELLOW, SKULL_RED, SKULL_BLACK} function addPlayerFrag(cid) db.query("UPDATE `players` SET `frags_all` = `frags_all` + 1 WHERE `id` = " .. getPlayerGUID(cid) .. ";") return true end function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then for i= 1, #skulls do if getPlayerSkullType(cid) == skulls[i] then addPlayerFrag(cid) break end end end return true end function onLogin(cid) registerCreatureEvent(cid, "TopFrags") return true end
  14. Tem um arquivo chamado compat.lua nos tfs 1x que tem essas funções.

Informação Importante

Confirmação de Termo