-
-
[TFS 1.x | Global Windows e Linux 10.0 OLD/11.3] Halls of Hope, Wrap, Store, Prey, Imbuing, Events - Castle War, Snow Ball, Zombie, BattleField
Walls of hope não esta funcionando né? depois que entra no teleporte não tem como continuar com a missao de acesso.
-
-
(Resolvido)VIP POR ITEM
Deu certo vlw ! Pode me explicar o que essa função pega na config.lua ? function vip.setVip(cid,time) dofile("config.lua")
-
-
(Resolvido)VIP POR ITEM
Funcionou em partes,ao relogar aparece a msg 14:59 Você possui 30 dia(s) de vip. Ela irá durar até 18/09/17 14:59:11. Porem eu não consigo passar no tile. e quando dou o comando !vipdays 15:02 You're not a vip player. You naver has a vip. Citar isto @vankk Te passei a lib errada ,a correta é : vip = { name = "Vip system"; author = "Mock"; version = "1.0.0.0"; query="ALTER TABLE `accounts` ADD `vip_time` INTEGER"; query2="ALTER TABLE `accounts` ADD `vip_time` INT(15) NOT NULL" } function vip.setTable() dofile('config.lua') if sqlType == "sqlite" then db.executeQuery(vip.query) else db.executeQuery(vip.query2) end end function vip.getVip(cid) assert(tonumber(cid),'Parameter must be a number') if isPlayer(cid) == FALSE then error('Player don\'t find') end; ae = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..getPlayerAccount(cid).."';") if ae:getID() == -1 then return 0 end local retee = ae:getDataInt("vip_time") or 0 ae:free() return retee end function vip.getVipByAcc(acc) assert(acc,'Account is nil') local a = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';") if a:getID() ~= -1 then return a:getDataInt("vip_time") or 0, a:free() else error('Account don\'t find.') end end function vip.setVip(cid,time) dofile("config.lua") assert(tonumber(cid),'Parameter must be a number') assert(tonumber(time),'Parameter must be a number') if isPlayer(cid) == FALSE then error('Player don\'t find') end; db.executeQuery("UPDATE `"..sqlDatabase.."`.`accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='".. getPlayerAccount(cid).."';") end function vip.getVipByAccount(acc) assert(acc,'Account is nil') return db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';"):getDataInt("vip_time") or 0 end function vip.hasVip(cid) assert(tonumber(cid),'Parameter must be a number') if isPlayer(cid) == FALSE then return end; local t = vip.getVip(cid) or 0 if os.time(day) < t then return TRUE else return FALSE end end function vip.hasVips(cid) assert(tonumber(cid),'Parameter must be a number') if isPlayer(cid) == FALSE then return end; local t = vip.getVip(cid) if os.time(day) < t then return TRUE else return FALSE end end function vip.accountHasVip(acc) assert(acc,'Account is nil') if os.time() < vip.getVipByAccount(acc) then return TRUE else return FALSE end end function vip.getDays(days) return (3600 * 24 * days) end function vip.addVipByAccount(acc,time) --assert(acc,'Account is nil') --assert(tonumber(time),'Parameter must be a number') local a = vip.getVipByAcc(acc) a = os.difftime(a,os.time()) if a < 0 then a = 0 end; a = a+time return vip.setVipByAccount(acc,a) end function vip.setVipByAccount(acc,time) dofile("config.lua") assert(acc,'Account is nil') assert(tonumber(time),'Parameter must be a number') db.executeQuery("UPDATE `accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='"..acc.."';") return TRUE end function vip.returnVipString(cid) assert(tonumber(cid),'Parameter must be a number') if isPlayer(cid) == TRUE then return os.date("%d %B %Y %X ", vip.getVip(cid)) end end Alterei o codigo para : local config = { days = 30, message = 'Você recebeu 30 dias de VIP. Parabéns!' } function onUse(cid, item, frompos, item2, topos) vip.addVipByAccount(acc, config.days) doPlayerSendTextMessage(cid, 22, config.message) doRemoveItem(item.uid, 1) return true end Só que esta me retornando erro no console Existe alguma função alem da OnUse ,que ao inves de ser CID ,seja acc ?
-
(Resolvido)VIP POR ITEM
--[[ Name: Vip System by Account Version: 1.0 Author: Kydrai Forum: http://www.xtibia.com/forum/topic/136543-vip-system-by-account-v10/ [Functions] -- Install installVip() -- By Account doTeleportPlayersByAccount(acc, topos) getVipTimeByAccount(acc) setVipTimeByAccount(acc, time) getVipDaysByAccount(acc) isVipAccount(acc) addVipDaysByAccount(acc, days) doRemoveVipDaysByAccount(acc, days) getVipDateByAccount(acc) -- By Player doTeleportPlayers(cid, topos) getVipTime(cid) setVipTime(cid, time) getVipDays(cid) isVip(cid) addVipDays(cid, days) doRemoveVipDays(cid, days) getVipDate(cid) ]]-- -- Install function installVip() if db.executeQuery("ALTER TABLE `accounts` ADD viptime INT(15) NOT NULL DEFAULT 0;") then print("[Vip System] Vip System instalado com sucesso!") return TRUE end print("[Vip System] Não foi possível instalar o Vip System!") return FALSE end -- By Account function doTeleportPlayersByAccount(acc, topos) if db.executeQuery("UPDATE `players` SET `posx` = "..topos.x..", `posy` = "..topos.y..", `posz` = "..topos.z.." WHERE `account_id` = "..acc..";") then return TRUE end return FALSE end function getVipTimeByAccount(acc) local vip = db.getResult("SELECT `viptime` FROM `accounts` WHERE `id` = "..acc..";") if vip:getID() == -1 then print("[Vip System] Account not found!") return FALSE end return vip:getDataInt("viptime") end function setVipTimeByAccount(acc, time) if db.executeQuery("UPDATE `accounts` SET `viptime` = "..time.." WHERE `id` = "..acc..";") then return TRUE end return FALSE end function getVipDaysByAccount(acc) local vipTime = getVipTimeByAccount(acc) local timeNow = os.time() local days = math.ceil((vipTime - timeNow)/(24 * 60 * 60)) return days <= 0 and 0 or days end function isVipAccount(acc) return getVipDaysByAccount(acc) > 0 and TRUE or FALSE end function addVipDaysByAccount(acc, days) if days > 0 then local daysValue = days * 24 * 60 * 60 local vipTime = getVipTimeByAccount(acc) local timeNow = os.time() local time = getVipDaysByAccount(acc) == 0 and (timeNow + daysValue) or (vipTime + daysValue) setVipTimeByAccount(acc, time) return TRUE end return FALSE end function doRemoveVipDaysByAccount(acc, days) if days > 0 then local daysValue = days * 24 * 60 * 60 local vipTime = getVipTimeByAccount(acc) local time = vipTime - daysValue setVipTimeByAccount(acc, (time <= 0 and 1 or time)) return TRUE end return FALSE end function getVipDateByAccount(acc) if isVipAccount(acc) then local vipTime = getVipTimeByAccount(acc) return os.date("%d/%m/%y %X", vipTime) end return FALSE end -- By Player function doTeleportPlayers(cid, topos) doTeleportPlayersByAccount(getPlayerAccountId(cid), topos) end function getVipTime(cid) return getVipTimeByAccount(getPlayerAccountId(cid)) end function setVipTime(cid, time) return setVipTimeByAccount(getPlayerAccountId(cid), time) end function getVipDays(cid) return getVipDaysByAccount(getPlayerAccountId(cid)) end function isVip(cid) return isVipAccount(getPlayerAccountId(cid)) end function addVipDays(cid, days) return addVipDaysByAccount(getPlayerAccountId(cid), days) end function doRemoveVipDays(cid, days) return doRemoveVipDaysByAccount(getPlayerAccountId(cid), days) end function getVipDate(cid) return getVipDateByAccount(getPlayerAccountId(cid)) end Não vai ,pois nao esta declarado a variavel id e nem name , no codigo da minha talkactions esta declarado ,porem mesmo declarando não vai o item não chega nem a sumir.
-
(Resolvido)VIP POR ITEM
SIm ele esta funcionando mas esta adicionando dias de premmy Eu uso um sistema de vip onde o player ganhar 20% a mais de exp e etc. TEm um tile em especifico que so passar player vip e ao usar esse codigo ,ele nao passa AGr se eu usar aquela talkcations que informei ,ele passa pelo tile e onde percebi e essa linha de codigo que informei que adiciona a vip ao player ,entendeu ?
-
(Resolvido)VIP POR ITEM
creio eu que teria que implementar essa funcao do codigo vip.addVipByAccount(getPlayerAccount(getPlayerByName(name)) ,vip.getDays(id)
-
(Resolvido)VIP POR ITEM
O codigo de vcs esta dando premmy eu uso um sistema vip .
-
(Resolvido)VIP POR ITEM
Hoje uso um sistema que para adicionar vip necessario dar o comando /addvip 30 nome player Gostaria de criar um item que ao dar use a pessoa ja receba 30 dias A minha talkactions : function onSay(cid, words, param) if param == "" then return doPlayerPopupFYI(cid,"Está com problemas?\nAprenda os comandos!\n---------------\nAdicionar vip:\n/vip add days player\n/vip add 30 Real\n---------------\nDeletar vip:\n/vip del player\n/vip del Real\n---------------\nVer a vip:\n/vip see player\n/vip see Real\n---------------\n") end if param:lower():find('add') == 1 and 3 then local _,_,id,name = param:lower():find('add (%d+) (.+)') name = name or "" id = tonumber(id or 1) or 1 if tonumber(id) == nil or getPlayerByName(name) == false then return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Adicionar vip:\n/vip add days player\n/vip add 30 Real\n[Player: "..name.."]") end if isPlayer(getPlayerByName(name)) == TRUE then vip.addVipByAccount(getPlayerAccount(getPlayerByName(name)) ,vip.getDays(id)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Foram adicionados "..tonumber(id).." dias de vip a "..name..".") doPlayerSendTextMessage(getPlayerByName(name),MESSAGE_INFO_DESCR,"Você recebeu "..tonumber(id).." dias de vip.") else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,name.." não esta online ou não existe.") end elseif param:lower():find('del') == 1 and 3 then local _,_,name = param:lower():find('del (.+)') if getPlayerByName(name) == false then return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Deletar vip:\n/vip del player\n/vip del Real\n") end vip.setVipByAccount(getPlayerAccount(getPlayerByName(name)),-os.time()) doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"A vip de "..name.." foi apagada.") elseif param:lower():find('see') == 1 and 3 then local _,_,name = param:lower():find('see (.+)') name = name or "" if getPlayerByName(name) == false then return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Ver a vip:\n/vip see player\n/vip see Real\n") end local ret_ = vip.getVip(getPlayerByName(name)) if ret_ == 0 then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,name.." Não tem vip, e nunca teve.") else return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "A vip de "..name.." Acaba/terminou em "..os.date("%d %B %Y %X ",ret_)) end end return TRUE end Queria saber como colocar essa parte do codigo : vip.addVipByAccount(getPlayerAccount(getPlayerByName(name)) ,vip.getDays(id) em uma função onUSe,alguem da um help ?
-
[TFS 1.x | Global Windows e Linux 10.0 OLD/11.3] Halls of Hope, Wrap, Store, Prey, Imbuing, Events - Castle War, Snow Ball, Zombie, BattleField
Compilei pelo Ubuntu e estou rodando ok. Porém a hall of ropes não esta funcionando corretamente ,vc consegue ter acesso ao portal porem a maquina de imbui não funciona ,abre a tela e tudo mas nao da o atributo ao item e a quest para ter acesso aos bosses depois do portal também não funciona.
-
[TFS 1.x | Global Windows e Linux 10.0 OLD/11.3] Halls of Hope, Wrap, Store, Prey, Imbuing, Events - Castle War, Snow Ball, Zombie, BattleField
Alguém conseguiu compilar para windows
-
-
[HELP] Ajuda Com Script 100% AFK
Amigo,faz tempo que nao uso o elfbot porem ,lembro que tem uma configuração no target,pra atacar somente que esta bem perto ou que esteja te atacando isso iria te ajudar
-
-
Teleport Abrir e fechar ontime()
Agora não fez nada,não apareceu erro nenhum também
-
mc
Fazendo uma rapida buscar no Forum achei :
-
Teleport Abrir e fechar ontime()
Bom dia,estou usando o seguinte código : <globalevent name="Teleport Automatico" time="8:12" event="script" value="teleportwar.lua"/> local configuration = { days = {"Tuesday", "Thursday", "Friday"}, to_pos = {x = 160, y = 54, z = 7}, --Para onde o teleport levará. pos = {x = 100, y = 950, z = 7}, --Onde o teleport será criado. teleport_id = 1387, --ID do teleport. aid = 3434, --Action ID do teleport. time = 120, --Tempo para fechar, em minutos. } function onTime() local x = os.date("%A") print("Day is: " .. x .. ".") if isInArray(configuration.days, x) then local item = getTileItemById(configuration.pos, configuration.teleport_id).uid if item < 1 then local tp = doCreateTeleport(configuration.teleport_id, configuration.to_pos, configuration.pos) doItemSetAttribute(tp, "aid", configuration.aid) broadcastMessage("A arena foi aberta.", MESSAGE_STATUS_WARNING) addEvent(function() tp = getTileItemById(configuration.pos, configuration.teleport_id).uid if tp and tp > 0 then doRemoveItem(tp) broadcastMessage("A arena foi fechada.") end end, configuration.time * 60 * 1000) end end return true end Porem está dando o seguinte erro: Alguem pode me dar uma luz do que possa ser ? o id do teleport está correto,o dia e horario também,creio eu que seja algum erro na função ontime()
-
[PEDIDO] Script de Action
Use essa action usegrounditem ID DA ALAVANCA