
Tudo que Fabi Marzan postou
-
Movement com max de player
Se não funcionar para você, tenho esse que fica na área. Essa será a área From = {x = 1069, y = 1027, z = 6}, -- Area Left To = {x = 1071, y = 1030, z = 7}, -- Area Corner local c = { limit = 5, -- Limit players msgCancel = "Nao pode entrar mais.", area = { From = {x = 1069, y = 1027, z = 6}, -- Area Left To = {x = 1071, y = 1030, z = 7}, -- Area Corner }, pos = {x = 1070, y = 1030, z = 7}, -- TPS Players } local function getPlayersInArea(fromPos, toPos) local t = {} for _, cid in ipairs(getPlayersOnline()) do if isInRange(getThingPos(cid), fromPos, toPos) then table.insert(t, cid) end end return t end function onStepIn(cid, item, fromPos, toPos) if isPlayer(cid) then if table.getn(getPlayersInArea(c.area.From, c.area.To)) < c.limit then doSendMagicEffect(fromPos, CONST_ME_TELEPORT) doTeleportThing(cid, c.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) else doPlayerSendCancel(cid, c.msgCancel) doTeleportThing(cid, toPos, false) end end return true end
-
-=[TFS]=- 0.4 8.60 Necessito do Script Cassino \ NPC
<?xml version="1.0"?> <npc name="Cassino" script="data/npc/scripts/dicer.lua" walkinterval="0" floorchange="0" emblem="1"> <health now="100" max="100"/> <look type="132" head="90" body="80" legs="70" feet="64" addons="3"/> </npc> local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local function delayMoneyRemoval(item, pos) doRemoveItem(getTileItemById(pos, item).uid) return true end local function placeMoney(amount, table_middle_pos) local remain = amount local crystal_coins = 0 local platinum_coins = 0 if (math.floor(amount / 10000) >= 1) then crystal_coins = math.floor(amount / 10000) remain = remain - crystal_coins * 10000 end if ((remain / 100) >= 1) then platinum_coins = remain / 100 end addEvent(doCreateItem, 550, 2152, platinum_coins, table_middle_pos) addEvent(doCreateItem, 600, 2160, crystal_coins, table_middle_pos) end local function rollDice(roll, cc_count, pc_count, table_left_pos, table_middle_pos, npc) local dice_ids = {5792, 5793, 5794, 5795, 5796, 5797} local random_rollval = math.random(1,6) local total_g = (10000 * cc_count) + (100 * pc_count) local prize_percent = 1.0 -- 100% if ((total_g) <= 1000000 and (total_g) >= 5000) then doSendMagicEffect(table_left_pos, CONST_ME_CRAPS) for _, itemId in pairs(dice_ids) do if(getTileItemById(table_left_pos, itemId).uid > 0) then doTransformItem(getTileItemById(table_left_pos, itemId).uid, dice_ids[random_rollval]) end end if (roll == 1 and random_rollval <= 3) then placeMoney(total_g + (total_g * prize_percent), table_middle_pos) addEvent(doSendMagicEffect, 400, table_left_pos, 28) addEvent(doSendMagicEffect, 700, table_left_pos, 28) addEvent(doCreatureSay, 500, npc, "You win "..total_g.." gold coins, Congratulations!", TALKTYPE_SAY, false, 0) elseif (roll == 2 and random_rollval >= 4) then placeMoney(total_g + (total_g * prize_percent), table_middle_pos) addEvent(doSendMagicEffect, 400, table_left_pos, 28) addEvent(doSendMagicEffect, 700, table_left_pos, 28) addEvent(doCreatureSay, 500, npc, "You win "..total_g.." gold coins, Congratulations!", TALKTYPE_SAY, false, 0) else addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_BLOCKHIT) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_BLOCKHIT) addEvent(doCreatureSay, 500, npc, "You lost, try again.", TALKTYPE_SAY, false, 0) end doCreatureSay(npc, string.format("%s rolled a %d.", getCreatureName(npc), random_rollval), TALKTYPE_ORANGE_1, false, 0, table_left_pos) else addEvent(doCreateItem, 100, 2160, cc_count, table_middle_pos) addEvent(doCreateItem, 150, 2152, pc_count, table_middle_pos) doCreatureSay(npc, "Put the money you wish to bet on the counter, the minimum wager is 5K and the maximum wager is 1KK.", TALKTYPE_SAY, false, 0) end return true end function creatureSayCallback(cid, type, msg) -- NPC userdata instance local npc = getNpcCid() -- Participating player userdata instance local position = {x = getNpcPos().x, y = getNpcPos().y+2, z = getNpcPos().z} position.stackpos = STACKPOS_TOP_CREATURE local player_uid = getThingfromPos(position).uid -- Game table position userdata instances local table_left_pos = {x = 120, y = 45, z = 7} local table_middle_pos = {x = 120, y = 46, z = 7} -- Search for coins on the left and middle tables and create item userdata instances local table_middle_cc = getTileItemById(table_middle_pos, 2160) local table_middle_pc = getTileItemById(table_middle_pos, 2152) -- Other variables local cc_count = 0 local pc_count = 0 local ROLL, LOW, HIGH = 0, 1, 2 if (player_uid ~= 0) then if ((msgcontains(string.lower(msg), 'high') or msgcontains(string.lower(msg), 'h')) and (isPlayer(player_uid) and player_uid == cid)) then ROLL = HIGH elseif ((msgcontains(string.lower(msg), 'low') or msgcontains(string.lower(msg), 'l')) and (isPlayer(player_uid) and player_uid == cid)) then ROLL = LOW else return false end if (table_middle_cc.uid ~= 0) then cc_count = table_middle_cc.type doTeleportThing(table_middle_cc.uid, table_left_pos) addEvent(delayMoneyRemoval, 300, 2160, table_left_pos) end if (table_middle_pc.uid ~= 0) then pc_count = table_middle_pc.type doTeleportThing(table_middle_pc.uid, table_left_pos) addEvent(delayMoneyRemoval, 300, 2152, table_left_pos) end addEvent(rollDice, 500, ROLL, cc_count, pc_count, table_left_pos, table_middle_pos, npc) else return false end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) local table_left_pos = {x = 120, y = 45, z = 7} local table_middle_pos = {x = 120, y = 46, z = 7} -- Mesa do meio local position = {x = getNpcPos().x, y = getNpcPos().y+2, z = getNpcPos().z} -- Pos Player
-
NPC - Por Storage / Vocation
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() local function greetCallback(cid) if (not npcHandler:isFocused(cid)) then return false end if getPlayerStorageValue(cid, 10036) == 1 then shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook') shopModule:addBuyableItem({'magic lightwand'}, 2163, 100, 'magic lightwand') else shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion') shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion') end return true end npcHandler:addModule(shopModule) npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Não sei o que você teria errado, apenas coloquei como greetCallback
-
[SQLite] -=[TFS]=- 0.4 8.60 Piso solta letra |ROX|... Porem continua com efeito do piso
mas você quer que ele cure enquanto o jogador ainda está no chão? Acabei de mover o addEvent e use StopEvent. local level = 717217 -- Até que level pode healar local delay = 4 -- de quanto em quanto tempo irá adicionar (no caso, 1 segundo) local mana = 1000000000 -- quanto de mana vai ser adicionado local vida = 1000000000 -- quanto de health vai ser adicionado local eventId function doHealPlayer(cid) if getPlayerStorageValue(cid, 98910) == 1 then doCreatureAddHealth(cid, mana) doPlayerAddMana(cid,vida) doSendAnimatedText(getCreaturePos(cid), "|ROX|...", 138) doSendMagicEffect(getCreaturePosition(cid),53) eventId = addEvent(doHealPlayer, delay*1000, cid) end return true end function onStepIn(cid, item, position, lastPosition, fromPosition) if getPlayerLevel(cid) >= level then doPlayerSendCancel(cid,"Você já é acima do level ".. level .."") else setPlayerStorageValue(cid, 98910, 1) doHealPlayer(cid) end return true end function onStepOut(cid, item, position, lastPosition, fromPosition) setPlayerStorageValue(cid, 98910, -1) stopEvent(eventId) return true end
-
so vai funcionar em player que tiver storage 5551
local config = { p_time = 3600, storageid = 5551 } local function givePoints(cid, quant) if getCreatureStorage(cid, config.storageid) >= 1 then if os.time() - getCreatureStorage(cid, 1219) >= config.p_time then doPlayerSendTextMessage(cid, 19, "[ONLINE BONUS] --> Por completar uma hora online voce ganhou um Baiak Coin. Seu temporizador foi zerado.") doPlayerAddItem(cid,6527,1) doCreatureSetStorage(cid, 1219, 0) doCreatureSetStorage(cid, 1219, os.time()) end end return true end
-
Preciso de ajuda a compilar qualquer base.
que otx é? otx 2.15 ou 3.1? Esse problema pode ser devido as bibliotecas boost.
-
Erro com object builder
e qual é a versão do obj? E qual versão do cliente você está tentando abrir?De qualquer forma, vou deixar para vocês um obj 0.5.5, que é o que uso para tudo. https://github.com/punkice3407/ObjectBuilder/releases/download/v0.5.5/ObjectBuilder_0_5_5.zip
-
para usa essa chest precisa ser level 300 alguem sabe bota o level 300 pra da use na chest
function onUse(cid, item, frompos, item2, topos) if item.uid == 1664 then queststatus = getPlayerStorageValue(cid,1664) if queststatus == -1 then if getPlayerLevel(cid) >= 300 then doPlayerSendTextMessage(cid,25,"Parabens Ganho 3kk.") doPlayerAddItem(cid,2160,300) doPlayerAddItem(cid,2383,1) doPlayerAddItem(cid,2390,1) doPlayerAddItem(cid,10518,1) doPlayerAddItem(cid,2471,1) doPlayerAddItem(cid,2646,1) doPlayerAddItem(cid,2469,1) doPlayerAddItem(cid,2523,1) doPlayerAddItem(cid,2494,1) doPlayerAddItem(cid,8926,1) doPlayerAddItem(cid,7431,1) doPlayerAddItem(cid,7368,1) doPlayerAddItem(cid,8910,1) doPlayerAddItem(cid,2789,100) doPlayerAddItem(cid,10518,1) setPlayerStorageValue(cid,1664,1) else doPlayerSendTextMessage(cid,22,"Precisa do level 300 pra ussar.") end else doPlayerSendTextMessage(cid,22,"Voce ja pegou o bonus") end else return 0 end return 1 end
-
NPC de barco que checa Addon
if player:hasOutfit(153) and player:hasOutfit(157) then Troca pra if not player:hasOutfit(153) and not player:hasOutfit(157) then local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if not player:isPlayer() then return false end if msgcontains(msg, "sail") then if player:hasOutfit(153) and player:hasOutfit(157) then if player:removeMoney(50) then npcHandler:say("Good luck.", cid) npcHandler:releaseFocus(cid) player:teleportTo(Position(32227, 31756, 7)) else npcHandler:say("Nao tem dinheiro.", cid) npcHandler:releaseFocus(cid) end else npcHandler:say("Voce não pode, voce é da classe X.", cid) npcHandler:releaseFocus(cid) end end return true end npcHandler:setMessage(MESSAGE_GREET, 'Olá, com meu barco você pode {sail} para x.') npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Elfbot NG 4.5.1
https://www.elfbot.com.br/2023/01/download-elfbot-ng-860-com-ativador-dll-para-windows7e10.html Milhões de vídeos, páginas, etc. e você vai pagar pelo serviço de um bot de 12 anos.
-
Weapons.xml tibia 13.20 canary
canary e full revscripts, tem que ser em data/scripts/weapons?
-
[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação pra Infinito
<action actionid="13741" event="script" value="script.lua"/> <action uniqueid="18956" event="script" value="script.lua"/> Algo assim? não foi muito claro para mim kk Quer tudo num só script?
-
[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação pra Infinito
<action actionid="13741" event="script" value="script.lua"/> <action uniqueid="18956" event="script" value="script.lua"/> Algo assim? não foi muito claro para mim kk Quer tudo num só script?
-
[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação pra Infinito
<action actionid="13741" event="script" value="script.lua"/> <action uniqueid="18956" event="script" value="script.lua"/> Algo assim? não foi muito claro para mim kk Quer tudo num só script?
-
[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação pra Infinito
<action actionid="13741" event="script" value="script.lua"/> <action uniqueid="18956" event="script" value="script.lua"/> Algo assim? não foi muito claro para mim kk Quer tudo num só script?
-
[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação pra Infinito
<action actionid="13741" event="script" value="script.lua"/> <action uniqueid="18956" event="script" value="script.lua"/> Algo assim? não foi muito claro para mim kk Quer tudo num só script?
-
(Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação de Script.
Os revscripts são utilizados a partir da versão 1.3, no seu caso é um mods que a 0.4 utiliza e não faço ideia de como o utilizar, deixei de utilizar a versão 0.X há muito tempo.
-
(Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação de Script.
Os revscripts são utilizados a partir da versão 1.3, no seu caso é um mods que a 0.4 utiliza e não faço ideia de como o utilizar, deixei de utilizar a versão 0.X há muito tempo.
-
[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação pra Infinito
<action actionid="13741" event="script" value="script.lua"/> <action uniqueid="18956" event="script" value="script.lua"/> Algo assim? não foi muito claro para mim kk Quer tudo num só script?
-
(Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação de Script.
local storage = 18956 local action = Action() local actionid = 46372 function action.onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, storage) == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Ganhou Donate Acesso Infinito.") setPlayerStorageValue(cid, storage, 1) doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja usou esse item antes.") end return true end action:aid(actionid) action:register()
-
[SQLite] -=[TFS]=- [ACTION] 0.4 8.60 Script Casino
só retira dinheiro doPlayerRemoveMoney(cid,config.moneyneed) Testa: local config = { moneyneed = 100, -- dinheiro necessário para jogar (scarab 100) } local premio = 2189 -- id do prêmio local premio_cont = 1 -- quantidade do prêmio que vai ganhar function additem(cid, premio, premio_cont) doPlayerAddItem(cid, premio, premio_cont) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player apostou no cassino e ganhou " .. premio_cont .. " item.") end if item.itemid == 1945 and getPlayerItemCount(cid, 11192) < config.moneyneed then doPlayerSendCancel(cid, "Desculpe, você não tem dinheiro suficiente para jogar!") return false end if item.itemid == 1945 and math.random(0, 8) == 1 then doTransformItem(item.uid, 1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) doCreateItem(6556, 1, pos1) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) addEvent(additem, 2000, cid, premio, premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 2 then doTransformItem(item.uid,1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) return true elseif item.itemid == 1945 and math.random(0, 8) == 3 then doTransformItem(item.uid,1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) doCreateItem(6557,1,pos1) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) addEvent(additem,2000,cid,premio,premio_cont) return true elseif item.itemid == 1945 and math.random(0, 8) == 4 then doTransformItem(item.uid,1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 5 then doTransformItem(item.uid,1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 6 then doTransformItem(item.uid,1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 7 then doTransformItem(item.uid,1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) addEvent(doCreateItem, 1000, 6557, 1, pos2) addEvent(doCreateItem, 2000, 6556, 1, pos3) doCreateItem(6557,1,pos1) return true elseif item.itemid == 1945 and math.random(0, 8) == 8 then doTransformItem(item.uid,1946) doPlayerRemoveItem(cid, 11192, config.moneyneed) addEvent(doCreateItem, 1000, 6556, 1, pos2) addEvent(doCreateItem, 2000, 6557, 1, pos3) doCreateItem(6556,1,pos1) return true end item0 = getThingfromPos(pos1) item1 = getThingfromPos(pos2) item2 = getThingfromPos(pos3) if item.itemid == 1946 then doTransformItem(item.uid,1945) if item0.itemid ~= 0 and item1.itemid ~= 0 and item2.itemid ~= 0 then doRemoveItem(item0.uid,1) doRemoveItem(item1.uid,1) doRemoveItem(item2.uid,1) end else doTransformItem(item.uid,1945) end return 1 end
-
[SQLite] -=[TFS]=- 0.4 8.60 buga a contagem dos days vip quando digita !buyvip fica com 31 dias de vip.
tem de dar mais informações sobre o seu sistema vip, meu amigo.
-
-=[TFS]=- 0.4 8.60 Não consigo compra nada no NPC
troca doPlayerSetCapacity por doPlayerSetMaxCapacity
-
Ataques ficam parados no lugar que são usado
Poderia passar um scripts mínimo amigo!
-
(Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 Se sabe coloca esse script pra somente usar level 717217 e com a storage vip 13545 e só se tiver premium
function onSay(cid, words, param) if getPlayerLevel(cid) == 717217 and getPlayerStorageValue(cid, 13545) == 1 then if doPlayerRemoveMoney(cid, 0) == TRUE then local bp = doPlayerAddItem(cid, 5805, 1) doCreatureSay(cid, "Você comprou um item para desbugar a CAP.", TALKTYPE_ORANGE_1) else doCreatureSay(cid, "Item grátis", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doCreatureSay(cid, "Você não atende aos requisitos para comprar o item.", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end basta eliminar: and isPremium(cid)