
Solutions
-
Fabi Marzan's post in Problema Em Spell was marked as the answerComecei a olhar seu código e você tinha um END demais.
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -135.8, 0, -140.9, 0) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_RED) setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -170.8, 0, -175.9, 0) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -150.8, 0, -155.9, 0) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end function yagai1(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 399) end end function yagai2(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 411) end end function yagai3(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 398) end end function yagai4(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 396) end end function yagai5(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 438) end end function yagai6(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 439) end end function onCastSpell(cid, var) local waittime = 3.0 -- Tempo de exhaustion local storage = 143512 -- não mecha local storage2 = 55512 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return false end local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3} if getPlayerStorageValue(cid, storage2) == 5 then addEvent(onCastSpell2, 650, parameters) addEvent(yagai3, 50, cid) addEvent(yagai4, 650, cid) elseif getPlayerStorageValue(cid, storage2) == 4 then addEvent(onCastSpell2, 650, parameters) addEvent(yagai3, 50, cid) addEvent(yagai4, 650, cid) elseif getPlayerStorageValue(cid, storage2) == 3 then addEvent(onCastSpell3, 650, parameters) addEvent(yagai5, 50, cid) addEvent(yagai6, 650, cid) else addEvent(onCastSpell1, 650, parameters) addEvent(yagai1, 50, cid) addEvent(yagai2, 650, cid) end exhaustion.set(cid, storage, waittime) return true end
-
Fabi Marzan's post in Problema Em Spell was marked as the answerComecei a olhar seu código e você tinha um END demais.
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -135.8, 0, -140.9, 0) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_RED) setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -170.8, 0, -175.9, 0) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -150.8, 0, -155.9, 0) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end function yagai1(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 399) end end function yagai2(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 411) end end function yagai3(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 398) end end function yagai4(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 396) end end function yagai5(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 438) end end function yagai6(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 439) end end function onCastSpell(cid, var) local waittime = 3.0 -- Tempo de exhaustion local storage = 143512 -- não mecha local storage2 = 55512 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return false end local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3} if getPlayerStorageValue(cid, storage2) == 5 then addEvent(onCastSpell2, 650, parameters) addEvent(yagai3, 50, cid) addEvent(yagai4, 650, cid) elseif getPlayerStorageValue(cid, storage2) == 4 then addEvent(onCastSpell2, 650, parameters) addEvent(yagai3, 50, cid) addEvent(yagai4, 650, cid) elseif getPlayerStorageValue(cid, storage2) == 3 then addEvent(onCastSpell3, 650, parameters) addEvent(yagai5, 50, cid) addEvent(yagai6, 650, cid) else addEvent(onCastSpell1, 650, parameters) addEvent(yagai1, 50, cid) addEvent(yagai2, 650, cid) end exhaustion.set(cid, storage, waittime) return true end
-
Fabi Marzan's post in (Resolvido)Ocultar msg do comando was marked as the answerFiquei confuso, é return true
function onSay(cid, words, param) local playerCoinsItemId = 2625 -- ID do item de moeda local itemToSellId = 10311 -- ID do item a ser vendido if doPlayerRemoveItem(cid, playerCoinsItemId, 8) then -- Verifica se o jogador tem as moedas necessárias local newItem = doPlayerAddItem(cid, itemToSellId, 1) -- Adiciona o item ao jogador if newItem > 0 then doItemSetAttribute(newItem, "owner", getPlayerGUID(cid)) -- Define o dono do item como o jogador atual doItemSetAttribute(newItem, "Descricao", "Item Comprado por " .. getCreatureName(cid) .. ".") -- Define a descrição do item doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce comprou o item.") else -- Lidar com o caso de falha ao adicionar o item ao jogador end else doPlayerSendCancel(cid, 'Voce nao tem 8 Fiapo Credito.') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA) end return true end
-
Fabi Marzan's post in [SQLite] -=[TFS]=- 0.4 8.60 VIP EXP NAO PEGA NAO RECONHECE SÓ PEGA EXP FREE + EXP PREMIUM --[MultipleExp System]-- was marked as the answeralgo assim?
function onLogin(cid) local premiumRate = 1.5 local vipRate = 4.0 local config = { welpre = "Voce Tem "..((premiumRate - 1)*300).."% de [EXP]! Aproveite as Vantagens [PREMIUM]-[P.A]!", welvip = "Voce Tem "..((vipRate - 1)*300).."% de [EXP]! Aproveite as Vantagens [VIP]-[P.A]!", not_vip = "Olá jogador Aproveite as Vantagens [VIP]-[P.A], Voce Ganhará "..((vipRate - 1)*300).."% Mais de XP!", } if isPremium(cid) then doPlayerSetExperienceRate(cid, premiumRate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.welpre) elseif getPlayerStorageValue(cid, 13545) == 1 then doPlayerSetExperienceRate(cid, vipRate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.welvip) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.not_vip) end return TRUE end
-
Fabi Marzan's post in [SQLite] -=[TFS]=- 0.4 8.60 Systemvip não funciona days !vipdays e /checkvip e endvip dando debug was marked as the answerNão vejo problema porque está causando o debug, acabei de testar o sistema no otx 2 e funciona bem, talvez a posição local pos = {x = 154, y = 51, z = 7} ou addEvent(EddyHavoc, 3 * 1000, cid)???
tente ver:
function onSay(cid, words, param) if words == "!buyvip" then -- Check player with VIP if getPlayerStorageValue(cid, 13545) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já tem vip, espere seu tempo acabar, para verificar com !vipdays.") return true end local itemid = 6535 local count = 1 if doPlayerRemoveItem(cid, itemid, count) then local days = 31 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() local time if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if string.find(tostring(getCreatureName(cid)), "[[VIP]]") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow) / (24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem " .. (quantity < 0 and 0 or quantity) .. " dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local name = getCreatureName(cid) db.executeQuery("UPDATE `players` SET `name` = '[VIP] " .. name .. "' WHERE `id` = " .. getPlayerGUID(cid) .. ";") doRemoveCreature(cid) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de [" .. count .. " " .. getItemNameById(itemid) .. "] para colocar VIP.") end elseif words == "!vipdays" then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow) / (24 * 60 * 60)) if quantity > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem " .. quantity .. " dias de VIP no seu character.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao tem dias vip.") end elseif words == "/checkvip" then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") else local player = getPlayerByName(param) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") else local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow) / (24 * 60 * 60)) if quantity > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem " .. quantity .. " dias de VIP no seu character.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao tem dias vip.") end end end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") end elseif words == "/addvip" then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") else local playerName = t[1] local player = getPlayerByName(playerName) local name = getCreatureName(player) local days = tonumber(t[2]) local pid = getPlayerByNameWildcard(playerName) if not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn't exist or is offline.") return TRUE end local daysvalue = days * 3600 * 24 local storageplayer = getPlayerStorageValue(player, 13545) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) if string.find(tostring(getCreatureName(pid)), "[[VIP]]") then doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(player, 13545, time) local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow) / (3600 * 24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem " .. quantity .. " dias de VIP restantes.") else setPlayerStorageValue(player, 13545, time) db.executeQuery("UPDATE `players` SET `name` = '[VIP] " .. name .. "' WHERE `id` = " .. getPlayerGUID(player) .. ";") doRemoveCreature(player) end end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") end elseif words == "/delvip" then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if param == "" then return TRUE, doPlayerSendTextMessage(cid, 18, "Command param required.") end local C, t = {}, string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2])) * 3600 * 24 -- Tempo da VIP por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) -- Dias de VIP. if getPlayerStorageValue(C.uid, 13545) < C.time then doPlayerSendTextMessage(cid, dec, 'O jogador ' .. t[1] .. ' não possui ' .. C.days .. ' dias de VIP.') else doPlayerSendTextMessage(cid, dec, 'Você removeu ' .. C.days .. ' dias de VIP do player ' .. t[1] .. '.') setPlayerStorageValue(C.uid, 13545, getPlayerStorageValue(C.uid, 13545) - C.time) end doSendMagicEffect(C.pos, math.random(28, 30)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") end end return true end
------------------------------
função onLogin
function removeVipName(cid) local newName = string.gsub(getCreatureName(cid), "%[VIP%]", "") newName = newName:trim() db.executeQuery("UPDATE `players` SET `name` = '" .. newName .. "' WHERE `id` = " .. getPlayerGUID(cid) .. ";") doRemoveCreature(cid) end function onLogin(cid) local vipStorage = getPlayerStorageValue(cid, 13545) if vipStorage > 0 then local currentTime = os.time() if vipStorage <= currentTime then setPlayerStorageValue(cid, 13545, -1) doPlayerPopupFYI(cid, "Sua [VIP] Acabou.") if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then addEvent(removeVipName, 3 * 1000, cid) end else local daysLeft = math.ceil((vipStorage - currentTime) / (24 * 60 * 60)) --local pos = {x = 146, y = 389, z = 7} --doTeleportThing(cid, pos) doPlayerPopupFYI(cid, "Voce Ainda Tem " .. daysLeft .. " Dias de [VIP] Restantes.") end end return true end
-
Fabi Marzan's post in [SQLite] -=[TFS]=- 0.4 8.60 Não funciona [Movements] was marked as the answer?????
Eu não vejo o problema
a única coisa foi que você colocou ao contrário
doPlayerSendTextMessage(cid, 22, "Você precisa ser VIP ou falar com o ADM para passar por este piso.")
e
doPlayerSendTextMessage(cid, 22, "Você precisa ser level 717217 ou falar com o ADM para passar por este piso.")
function onStepIn(cid, item, position, fromPosition) if getPlayerGuildId(cid) > 0 then if getPlayerLevel(cid) >= 717217 then if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then doPlayerSendTextMessage(cid, 22, "WELCOME!") doSendMagicEffect(getCreaturePosition(cid), 28) else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa ser VIP ou falar com o ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa ser level 717217 ou falar com o ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa fazer parte de alguma guild ou fala com ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end return TRUE end
-
Fabi Marzan's post in [SPELL] METEORO was marked as the answerHonestamente, nao sou especialista em lua ou em fazer spells, mas fiz algo rapido para voce aqui:
local combatOne = createCombatObject() setCombatParam(combatOne, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combatOne, COMBAT_PARAM_HITCOLOR, COLOR_MAYABLUE) setCombatFormula(combatOne, COMBAT_FORMULA_LEVELMAGIC, -1.0, -500, -1.0, -650) setCombatArea(combatOne,createCombatArea( {{1, 1, 1}, {1, 3, 1}, -- Area 3X3 {1, 1, 1}} )) local function meteor_1(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x - math.random(2, 5), y = pos.y - 4, z = pos.z} local toposition = {x = post.x - math.random(1, 2), y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local function meteor_2(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x + math.random(2, 5), y = pos.y - 4, z = pos.z} local toposition = {x = post.x + math.random(1, 2), y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local function meteor_3(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x, y = pos.y - 4, z = pos.z} local toposition = {x = post.x, y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local config = { hit = 1, time = 1200, -- meteor_1 time_2 = 1300, -- meteor_2 time_3 = 1500, -- meteor_3 numberOfAttacks = 3, attackInterval = 200 } function onCastSpell(cid, var) addEvent(function() doCombat(cid, combatOne, var) end, 1200) local pos = getCreaturePosition(cid) for i = 1, config.numberOfAttacks do addEvent(function() doSendDistanceShoot(pos, {x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, CONST_ANI_FIRE) end, config.attackInterval * i) end for fbn = 1, config.hit do addEvent(meteor_1, config.time * fbn, cid, getCreatureTarget(cid)) addEvent(meteor_2, config.time_2 * fbn, cid, getCreatureTarget(cid)) addEvent(meteor_3, config.time_3 * fbn, cid, getCreatureTarget(cid)) end return true end
-
Fabi Marzan's post in [SQLite] -=[TFS]=- 0.4 8.60 Como faço pro account manager não recebe nada nenhum item fica nil por favor me ajudem was marked as the answerNão tenho conhecimento disso
mas o jeito que eu sei seria modificar os scripts para que não detecte os nomes da lista, como neste caso os scripts acima
if not isInArray(blocked_name, getPlayerName(cid)) then -- scripts return true end
-
Fabi Marzan's post in [SQLite] -=[TFS]=- 0.4 8.60 !q money ta pegando fiz um parecido só que com moeda vip !c só que com esse novo não ta pegando was marked as the answerfunction onSay(cid, words, param, channel) local moedaId = 11192 local itemCount = getPlayerItemCount(cid, moedaId) local itemName = getItemNameById(moedaId) if itemCount > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. itemCount .. " " .. itemName .. (itemCount > 1 and "s" or "") .. " coin" .. (itemCount ~= 1 and "s" or "") .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have any " .. getItemNameById(moedaId) .. " coin.") end return false end
-
Fabi Marzan's post in [SQLite] -=[TFS]=- 0.4 8.60 Piso solta letra |ROX|... Porem continua com efeito do piso was marked as the answermas 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
-
Fabi Marzan's post in para usa essa chest precisa ser level 300 alguem sabe bota o level 300 pra da use na chest was marked as the answerfunction 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
-
Fabi Marzan's post in (Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [ACTION] Transformação de Script. was marked as the answerOs 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.
-
Fabi Marzan's post in (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 was marked as the answerfunction 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)
-
Fabi Marzan's post in -=[TFS]=- 0.4 8.60 Não consigo compra nada no NPC was marked as the answertroca doPlayerSetCapacity por doPlayerSetMaxCapacity
-
Fabi Marzan's post in 05:55 It is yours 7 login to ots. Tem um OT que tem esse sistema toda vez que loga aparece essa mensagem como se tivesse contando os dias de cada player entra no OT was marked as the answerEm data/creaturescripts/scripts
function onLogin(cid) local player = Player(cid) local storage = 1762 local loginCount = getPlayerStorageValue(cid, storage) if loginCount == -1 then setPlayerStorageValue(cid, storage, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Welcome to OTSERVER!") else setPlayerStorageValue(cid, storage, loginCount + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "It is yours ".. (loginCount + 1) .." login to ots.") end return true end
-
Fabi Marzan's post in (Resolvido)[SCRIPT] TALKTYPE_ORANGE_2 Necessito que ele fique verde alguem me ajuda por favor was marked as the answerEu não entendo o que você quer dizer,
Não sei se é um TEXT_COLOR ou um MESSAGE_INFO_DESCR o que você quer dizer.
function onSay(cid, words, param, channel) local thisball = getPlayerSlotItem(cid, 8) if param ~= "" then return false end if words == "!onlinebonus" then local loginmsg = "\n Online Bonus Informações: Tokens ganhos hoje: [?] Próximo recebimento em: 1 em 1 Hora Situação: Recebendo até." --doCreatureSay(getCreatureByName(getCreatureName(cid)), loginmsg, TALKTYPE_ORANGE_2, false, cid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getCreatureByName(getCreatureName(cid)), loginmsg) end return true end
-
Fabi Marzan's post in (Resolvido)Porta que abre com X skill was marked as the answerfunction onUse(cid, item, fromPosition, target, toPosition, isHotkey) if getPlayerSkill(cid, SKILL_SWORD) and getPlayerSkill(cid, SKILL_AXE) and getPlayerSkill(cid, SKILL_CLUB) >= 15 then doTeleportThing(cid, toPosition, true) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Acesso alcancado.") else doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce precisa de habilidade para passar.") end return true end
Estes seriam os scripts, em qualquer caso, tendo maior ou igual a 15 você pode passar. (SO SWORD, AXE, CLUB), se quiser continuar colocando, é só colocar:
and getPlayerSkill(cid, SKILL_MAGLEVEL) and getPlayerSkill(cid, SKILL_DISTANCE)
-
Fabi Marzan's post in Spell de 8 hits com 8 animação. was marked as the answerDesculpe, eu havia deletado algumas linhas pensando que elas funcionam da mesma maneira.
Edite os scripts de uma maneira melhor.
-----DISCORD:SoyFabi#5938 local combat_one = createCombatObject() setCombatParam(combat_one, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat_one, COMBAT_PARAM_DISTANCEEFFECT, 5) --/ Spell With Missile. setCombatParam(combat_one, COMBAT_PARAM_HITCOLOR, 210) --/ 180(red), 70(blue), 156(brown), 215(white), 145(red 2), 95(lightblue) setCombatFormula(combat_one, COMBAT_FORMULA_LEVELMAGIC, -1.0, -5500, -1.0, -6500) -----------------------> local combat_two = createCombatObject() setCombatParam(combat_two, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat_two, COMBAT_PARAM_HITCOLOR, 210) setCombatFormula(combat_two, COMBAT_FORMULA_LEVELMAGIC, -1.0, -8500, -1.0, -9500) -----------------------> function Spell_one(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_two(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_three(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_four(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_five(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_six(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_seven(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_eight(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end ----------> function onCastSpell(cid, var) local exhaustion_time = 5 --/ Time of Exhaustion. local storage = 3 --/ Storage for combo for each spell. if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "You are exhausted, wait a few seconds.") doSendMagicEffect(getCreaturePosition(cid), 2) return false end local config = { hit = 1, --/ Hits time1 = 100, --/ Delay for each function. time2 = 300, time3 = 500, time4 = 700, time5 = 900, time6 = 1100, time7 = 1300, time8 = 1500, configtarget = getCreatureTarget(cid), } -- Effects -- for f = 1, config.hit do addEvent(Spell_one, config.time1 * f, cid, config.configtarget) addEvent(Spell_two, config.time2 * f, cid, config.configtarget) addEvent(Spell_three, config.time3 * f, cid, config.configtarget) addEvent(Spell_four, config.time4 * f, cid, config.configtarget) addEvent(Spell_five, config.time5 * f, cid, config.configtarget) addEvent(Spell_six, config.time6 * f, cid, config.configtarget) addEvent(Spell_seven, config.time7 * f, cid, config.configtarget) addEvent(Spell_eight, config.time8 * f, cid, config.configtarget) -- Combat -- for i = 1, 8 do addEvent(function() doCombat(cid, combat_two, var) end, 100 + ((i-1) * 200)) end end doCombat(cid, combat_one, var) exhaustion.set(cid, storage, exhaustion_time) return true end
-
Fabi Marzan's post in (Resolvido)-=[TFS]=- 0.4 8.60 Stamina Infinita was marked as the answer
-
Fabi Marzan's post in EXP HIT NÃO DA XP NA PARTY was marked as the answerTenta em vez de "doSendAnimatedText" troca por =
doCreatureSay(_cid, expgain - expParty, TALKTYPE_ORANGE_1)
-
Essa tabela "guild_wars" está faltando no SQL.
Em SqlStudio,
CREATE TABLE guild_wars ( id INTEGER NOT NULL, guild_id INT NOT NULL, enemy_id INT NOT NULL, [begin] BIGINT NOT NULL DEFAULT '0', [end] BIGINT NOT NULL DEFAULT '0', frags INT NOT NULL DEFAULT '0', payment BIGINT NOT NULL DEFAULT '0', guild_kills INT NOT NULL DEFAULT '0', enemy_kills INT NOT NULL DEFAULT '0', status TINYINT( 1 ) NOT NULL DEFAULT '0', PRIMARY KEY ( id ), FOREIGN KEY ( guild_id ) REFERENCES guilds ( id ), FOREIGN KEY ( enemy_id ) REFERENCES guilds ( id ) );
-
Fabi Marzan's post in [RESOLVIDO] MOUNT DOLL was marked as the answer0.4 não tem a função getPlayerMount
-
Fabi Marzan's post in Ajuda com spell de reflect was marked as the answerOnde diz:
doPlayerSendCancel(cid, "Você está refletindo todo o dano recebido!") return true end doPlayerSendCancel(cid, "Você está cansado, precisa aguardar "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storagecol))).." segundos.") return true end na parte de "return true" troca pra "return false".
-
Fabi Marzan's post in Magia de Área com Delay. was marked as the answer@raphadoidera
VC TEM COLOCAR ISSO:
local pos = getCreaturePosition(cid)
TESTA AGR:
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -78.2, 1, -88.2, 1) arr1 = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 3, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end function onCastSpell(cid, var) local waittime = 2 -- Tempo de exhaustion local storage = 1000150 if exhaustion.check(cid, storage) then doSendMagicEffect(getCreaturePosition(cid), 2) return false end local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) local pos = getCreaturePosition(cid) addEvent(doSendMagicEffect, 100, {x = pos.x, y = pos.y-2, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x, y = pos.y-1, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x, y = pos.y+2, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x, y = pos.y+1, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x+2, y = pos.y, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x+1, y = pos.y, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x-2, y = pos.y, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x-1, y = pos.y, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x+1, y = pos.y-1, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x+1, y = pos.y+1, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x-1, y = pos.y-1, z = pos.z}, 7) addEvent(doSendMagicEffect, 100, {x = pos.x-1, y = pos.y+1, z = pos.z}, 7) addEvent(doSendMagicEffect, 200, {x = pos.x+2, y = pos.y-1, z = pos.z}, 332) addEvent(doSendMagicEffect, 200, {x = pos.x+1, y = pos.y-2, z = pos.z}, 332) addEvent(doSendMagicEffect, 200, {x = pos.x+2, y = pos.y+1, z = pos.z}, 332) addEvent(doSendMagicEffect, 200, {x = pos.x+1, y = pos.y+2, z = pos.z}, 332) addEvent(doSendMagicEffect, 200, {x = pos.x-2, y = pos.y-1, z = pos.z}, 332) addEvent(doSendMagicEffect, 200, {x = pos.x-1, y = pos.y-2, z = pos.z}, 332) addEvent(doSendMagicEffect, 200, {x = pos.x-1, y = pos.y+2, z = pos.z}, 332) addEvent(doSendMagicEffect, 200, {x = pos.x-2, y = pos.y+1, z = pos.z}, 332) exhaustion.set(cid, storage, waittime) return TRUE end
-
Fabi Marzan's post in (Resolvido)Qual servidor tem essas sprite? was marked as the answerOBS
VV
VV
VV
Sprites Stone.rar