-
Total de itens
368 -
Registro em
-
Última visita
-
Dias Ganhos
14
Tudo que Crypter postou
-
[Encerrado] [Encerrado] [PEDIDO] [Dxp] Executavel sem Erro Depot
tópico respondeu ao Ayslan Sky de Crypter em Tópicos Sem Resposta
<item id="11447" chance="0.1" countmax="1"/> -
[Encerrado] [Encerrado] [PEDIDO] [Dxp] Executavel sem Erro Depot
tópico respondeu ao Ayslan Sky de Crypter em Tópicos Sem Resposta
@Ayslan Sky Para alterar o drop de stone voce tem que mecher em cada monsters na pasta monters/ e abrir o xml: Ex: charizard tem a linha : <item id="11447" chance="CHANCE DE DROPA" countmax="1"/> --fire stone Ou vai em config.lua e meche na rate: rateLoot =0.1 -
[Encerrado] [Encerrado] [PEDIDO] [Dxp] Executavel sem Erro Depot
tópico respondeu ao Ayslan Sky de Crypter em Tópicos Sem Resposta
Testa esse aqui PokeAlpha.rar PokeAlpha.rar -
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)local talkState = {}function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() endfunction creatureSayCallback(cid, type, msg)if(not npcHandler:isFocused(cid)) thenreturn falseendlocal talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cidlocal shopWindow = {}local moeda = 2145 -- moeda usadalocal t = { -- items a venda [2178] = {price = 100000}, -- [iD DO ITEM QUE SERÁ VENDIDO] = {QUANTO IRÁ CUSTAR} [10220] = {price = 2000}, [2153] = {price = 1000}, }local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if t[item] and not doPlayerRemoveItem(cid, moeda, t[item].price) then selfSay("você não tem "..t[item].price.." "..getItemNameById(moeda), cid) else doPlayerAddItem(cid, item) selfSay("aqui está seu item!", cid) end return trueendif (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then for var, ret in pairs(t) do table.insert(shopWindow, {id = var, subType = 0, buy = ret.price, sell = 0, name = getItemNameById(var)}) end openShopWindow(cid, shopWindow, onBuy, onSell) endreturn trueendnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new())
-
Qual versão do seu client?
-
Não acho uma boa pois se o player relogar vai continuar com a vida assim bugando o servidor, tera de criar essa script + uma função no login.lua.... local function BikeSpeedOn(cid, t) setPlayerStorageValue(cid, t.s, t.speed, t.vida) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, t.speed) setCreatureMaxHealth(cid, t.vida)doCreatureAddHealth(cid, getCreatureMaxHealth(cid))end local function BikeSpeedOff(cid, t)setPlayerStorageValue(cid, t.s, -1) doRegainSpeed(cid) setCreatureMaxHealth(cid, -t.vida)end local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 700, vida = 10000}function onUse(cid, item, fromPosition, itemEx, toPosition)local pos = getThingPos(cid) if #getCreatureSummons(cid) >= 1 thenreturn doPlayerSendCancel(cid, "Return your pokemon.")endif getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 orgetPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then --alterado v1.9 return doPlayerSendCancel(cid, "You can't do that right now.")endif getPlayerStorageValue(cid, t.s) <= 0 then doSendMagicEffect(pos, 177) doCreatureSay(cid, t.text, 19) BikeSpeedOn(cid, t) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 2128, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 2127, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) endelse doSendMagicEffect(pos, 177) doCreatureSay(cid, t.dtext, 19) BikeSpeedOff(cid, t) doRemoveCondition(cid, CONDITION_OUTFIT)endreturn trueend login.lua if getPlayerStorageValue(cid,5700) >= 1 then setCreatureMaxHealth(cid, -t.vida) end
-
Se a pessoa segue as regras do "Xtibia" não acho que tera posts com rep negativa...
-
Dei uma olhada aqui e parece que os caras acabaram de tirar os REP- dos posts.... Acho que foi medo do ban msm
-
Os premios veem dos anuncios ou dos patrocinadores? Se a galera abusar tem que dar ban msm acho meio sem sentido ficar dando REP- em posts de ajudas mas d'boa kkkk deram ate REP- em codigos na area Scripting
-
Vai ter gente criando fake dando REP- pros top so pra pegar os premios mensais kkkkk
-
D' boa menos 1 menbro no xtibia ... Consegui rep que vocês não conseguiram em 2 anos ajudando os caras...
-
O Cara vai la ajudar os cara "tentar" ai os cara vai la e começa a dar REP- não entendo a mente desses caras se tu tem inveja , pare de mecher no forum eu perdi meu tempo tentando ajudar um cara e ele mete Rep negativa .... A partir de hoje não irei mais ajudar os cara , talvez eu volte porque ta foda...
-
[Encerrado] setar os itens no player pós primeiro login
tópico respondeu ao Pkzor de Crypter em Tópicos Sem Resposta
Procura no items.xml -
[Encerrado] setar os itens no player pós primeiro login
tópico respondeu ao Pkzor de Crypter em Tópicos Sem Resposta
items = {1988, 1987, 2382, 2120, 2550, 2580, 7385, 2395, 2547} -
[Encerrado] setar os itens no player pós primeiro login
tópico respondeu ao Pkzor de Crypter em Tópicos Sem Resposta
mods/firstitems.xml <?xml version="1.0" encoding="UTF-8"?><mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes"> <config name="firstitems_config"><![CDATA[ config = { storage = 30001, items = {1988, 1987, 2382, 2120, 2550, 2580, 7385, 2395, 2547} -- 7385 (pokeinfo) -- 2395 (portfoil) ok -- 2382 (pokedex) ok -- 2547 (coin case) ok -- 2550 (order) ok -- 1987 (bag) ok -- 1988 (badge case) ok -- 2120 (rope) ok -- 2580 (fishing rod) ok } ]]></config> <event type="login" name="FirstItems" event="script"><![CDATA[ domodlib('firstitems_config') function onLogin(cid) if getCreatureName(cid) == "Account Manager" then doSetCreatureOutfit(cid, {lookType = 655}, -1) return true end if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid > 0 then return true end for _, id in ipairs(config.items) do doPlayerAddItem(cid, id, 1) end local bag = getPlayerItemById(cid, false, 1988).uid doAddContainerItem(bag, 12267, 1) doAddContainerItem(bag, 12266, 1) doAddContainerItem(bag, 12264, 1) doAddContainerItem(bag, 12265, 1) doAddContainerItem(bag, 12263, 1) doAddContainerItem(bag, 12262, 1) doAddContainerItem(bag, 12261, 1) doAddContainerItem(bag, 12260, 1) return true end ]]></event></mod> Obs: No Mysql os chars ja vem com os items pois os samples ja tem. No caso no SQlite tem que por script não esqueça de arrumar os id. -
Editei a script e so testa
-
pedido programação Erro Visual C++ ao abrir Exe do server
pergunta respondeu ao lazarocp de Crypter em Resolvidos
https://support.microsoft.com/pt-br/help/2977003/the-latest-supported-visual-c-downloads -
2- local text = "msg"local pos = {x=2510, y=2233, z=14} --locallocal stor = 65423 function onUse(cid, item, fromPosition, itemEx, toPosition)if getPlayerStorageValue(cid, stor) >= 1 then doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, 25, text)else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "x") endreturn trueend Para criar Spoiler use assim: [spoiler.] Mensagem aqui [/spoiler.] (sem os pontos)
-
Esta spell ao ser utilizada pelo player teleporta ele para sua cidade com um delay para se teleportar. spells.xml <instant name="Konoha teleport" words="Konoha teleport" lvl="1" mana="0" prem="1" aggressive="0" selftarget="1" exhaustion="10000" needlearn="0" event="script" value="citytp.lua"> </instant> citytp.lua function onCastSpell(cid, var) local waittime = 15.0 -- Tempo de exhaustion local storage = 115518 local function doTeleport(cid, count) if (not isPlayer(cid)) then return true end doSendAnimatedText(getCreaturePosition(cid), (10 - count).."s", COLOR_ORANGE) doSendMagicEffect(getCreaturePosition(cid), 54) if (count == 10) then return doCreatureSetNoMove(cid, false) and doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) else addEvent(doTeleport, 1000, cid, count + 1) end return true end if (not isPlayerPzLocked(cid)) then if (not getCreatureCondition(cid, 1024)) then return doCreatureSetNoMove(cid, true) and doTeleport(cid, 0) else doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"You cannot use this command while you are infight.") return false end else doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"You cannot use this command while you are pz locked.") return false end end
-
È uma spell que ao usar voce heala "X" por "Y" segundos assim não podendo se mecher.! Uma script simples que pode ser usada por muitos. data/spells/script Tank.lua tempo = 10 -- Tempo de duração da spell em segundoshp = 10000 -- Quanto HP vai healar a cada x segundosfunction heal(cid)if not isCreature(cid) then return true endif getPlayerStorageValue(cid, 13978) == 1 thendoCreatureAddHealth(cid, hp)addEvent(heal, 3000, cid) return trueendreturn trueendfunction onCastSpell(cid, var)setPlayerStorageValue(cid, 13978, 1)doPlayerSetNoMove(cid, true)heal(cid)doSendMagicEffect(getCreaturePosition(cid), 26) addEvent(setPlayerStorageValue, tempo*1000, cid, 13978, -1)addEvent(doPlayerSetNoMove, tempo*1000, cid, false)return trueend Spells.xml: <instant name="Tank Mode" words="Tank Mode" lvl="25" mana="100" prem="0" aggressive="0" exhaustion="1000" needlearn="0" blockwalls="1" enabled="1" event="script" value="tank.lua"> </instant>
-
Sistema Jinchuuriki De Servidores de Naruto. Selar um dos monstros e ser seu jinchuuriki , usando a magia só quando o Monstro estiver com 20% ou menos de vida. A Magia tem a range de 1 sqm, ou seja, você tem que usar a magia colado no monstro e Apenas um jogador conseguira selar o Monstro e ser seu jinchuuriki. Após selar um dos monstros você será o jinchuuriki dela por 10 dias, caso selar um outro Monstro você perdera a anterior e ficara com a nova e o tempo será renovado! Em data/spells/script crie um arquivo chamado Jinchuuriki.lua local storagecool = 89758local storagemob = 89759local tempo = 10 * 24 * 60 * 60 -- 10 diaslocal mobs = { ["kurama"] = 1, ["hachibi"] = 2, ["demon"] = 3, -- sempre letra minuscula e o numero q ele representa}function onCastSpell(cid, var) local target = variantToNumber(var) if target and isMonster(target) then if getCreatureHealth(target) <= math.floor(0.2 * getCreatureMaxHealth(target)) then if getCreatureName(target) and mobs[getCreatureName(target):lower()] then doPlayerSetStorageValue(cid, storagecool, os.time() + tempo) doPlayerSetStorageValue(cid, storagemob, mobs[getCreatureName(target):lower()]) doSendMagicEffect(getPlayerPosition(cid), 13) -- efeito no player doSendMagicEffect(getPlayerPosition(target), 13) -- efeito no monstro doRemoveCreature(target) doPlayerSendCancel(cid, "Você selou a criatura!") else doPlayerSendCancel(cid, "Essa criatura nao pode ser selada.") end else doPlayerSendCancel(cid, "O monstro precisa ter menos de 20% de vida para ser selado.") end else doPlayerSendCancel(cid, "Spell somente pode ser usada em monstros.") endreturn trueend Em spells.xml <instant name="Selar Bijuu" words="Selar Bijuu" lvl="200" mana="20000" prem="1" range="1" needtarget="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script" value="Jinchuuriki.lua"> <vocation id="1-10"/> </instant> Vantagens de ser um Jinchuuriki: Buff Especial que voce domina ela. data/spells/ Hachibi.lua local tempo = 60 -- tempo em segundoslocal effect = {134} -- effect no playerlocal exausted = 1 -- em minutoslocal points = 60 -- quantos ira aumentar os skillslocal outfit = {lookType = 350}-- outfit que ira darlocal combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)local condition = createConditionObject(CONDITION_ATTRIBUTES)setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, points)setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, points)setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, points)setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, points)setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, points)setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, points)setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, points)setCombatCondition(combat, condition)local condition = createConditionObject(CONDITION_OUTFIT)setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)addOutfitCondition(condition, outfit)setCombatCondition(combat, condition)function Magica(cid) if isCreature(cid) then for i=1, #effect do local position = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z} doSendMagicEffect(position, effect) end endendfunction onCastSpell(cid, var) if getPlayerStorageValue(cid, 91546) ~= 2 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce nao eh um jinchuriki da Hachibi!") return false elseif getPlayerStorageValue(cid, 17456)-os.time() > 1 then local seetime = getPlayerStorageValue(cid, 17456)-os.time() local minutes, seconds = math.floor(seetime/60), math.floor(seetime%60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde "..minutes.." minuto(s) e "..seconds.." segundo(s) para usar novamente!") return false end setPlayerStorageValue(cid, 17456, exausted*60+os.time()) doCombat(cid, combat, var) local tempo2 = 0 while (tempo2 <= (tempo*1000)) do addEvent(Magica, tempo2, cid) tempo2 = tempo2 + 300 end return trueend
-
Muito bom essa script de saga vai ajudar muitos!
-
Nome: Evento for fun Infos: quem é atingido pelo fogo morre, o último a sobreviver ganha. O evento é automático, mas também possui um comando para dar inicio ao evento, só usar /firestart minutos exemplo: /firestart 1 Fire_Storm_Event.xml <?xml version="1.0" encoding="ISO-8859-1"?><mod name="Fire Storm Event" version="8.6" author="Vodkart" contact="" enabled="yes"><config name="fire_config"><![CDATA[Fire = { storages = {172354, 172355}, -- storage Count players = {min = 2, max = 50}, -- min, max players no evento minLevel = 20, -- level minimo para entrar no event rewards = {{2160,10},{2494,1}}, -- premios que vai receber timeToStartEvent = 30, -- segundos para começar o evento CheckTime = 5, -- time to check event teleport = {{x=158, y=53, z=7}, {x=189 , y=58, z=7}}, -- posição do teleport, posição para onde o jogador vai arena = {{x=186,y=54,z=7},{x=193,y=60,z=7}} -- posição começo e final da area}Fire_Days = { ["Monday"] = {"13:00","18:00","20:00","22:00"}, ["Tuesday"] = {"13:00","18:00","20:00","22:00"}, ["Wednesday"] = {"13:00","18:00","20:00","22:00"}, ["Thursday"] = {"13:00","18:00","20:00","22:00"}, ["Friday"] = {"13:00","18:00","20:00","22:00"}, ["Saturday"] = {"13:00","18:00","20:00","22:00"}, ["Sunday"] = {"13:00","18:00","20:00","22:00"}}function removeFireTp() local t = getTileItemById(Fire.teleport[1], 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(Fire.teleport[1], CONST_ME_POFF)endfunction ZerarStorFire() setGlobalStorageValue(Fire.storages[1], 0) setGlobalStorageValue(Fire.storages[2], 0)endfunction getPlayersInFireEvent() local t = {} for _, pid in pairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), Fire.arena[1], Fire.arena[2]) then t[#t+1] = pid end end return tendfunction getFireRewards(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end endendfunction doFireInArea(n) if #getPlayersInFireEvent() > 1 then for i = 1, n do local pos = {x=math.random(Fire.arena[1].x, Fire.arena[2].x), y=math.random(Fire.arena[1].y,Fire.arena[2].y), z=Fire.arena[1].z} local m = getTopCreature(pos).uid doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE) addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE) addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA) if m ~= 0 and isPlayer(m) then doSendMagicEffect(getCreaturePosition(m), CONST_ME_FIREAREA) doCreatureSay(m, "Ooh Burn Burn", TALKTYPE_ORANGE_1) local corpse = doCreateItem(3058, 1, getPlayerPosition(m)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(m) .. ". He was killed by Fire Field.") doSendMagicEffect(getPlayerPosition(m), CONST_ME_POFF) doTeleportThing(m, getTownTemplePosition(getPlayerTown(m))) doPlayerSendTextMessage(m, MESSAGE_EVENT_ADVANCE, "[Fire Storm Event] You died burned out.") end end local x = 2700-(200*n) addEvent(doFireInArea, x <= 0 and 500 or x, n+1) elseif #getPlayersInFireEvent() == 1 then local cid = getPlayersInFireEvent()[1] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) getFireRewards(cid, Fire.rewards) doBroadcastMessage("Fire Storm Event have finished. The winner is ".. getCreatureName(cid).. ". Congratulations.", MESSAGE_EVENT_ADVANCE) ZerarStorFire() else doBroadcastMessage("No one Won the Fire Storm Event.", MESSAGE_EVENT_ADVANCE) ZerarStorFire() endendfunction CheckFireEvent(delay) if getGlobalStorageValue(Fire.storages[1]) ~= (Fire.players.max+1) then if delay > 0 and getGlobalStorageValue(Fire.storages[1]) < Fire.players.max then doBroadcastMessage("[Fire Stortm Event] Starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) elseif delay == 0 and getGlobalStorageValue(Fire.storages[1]) < Fire.players.min then for _, cid in pairs(getPlayersInFireEvent()) do doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end removeFireTp() doBroadcastMessage("The Fire Storm event could not start because of to few players participating.\n At least " .. Fire.players.min .. " players is needed!", MESSAGE_STATUS_WARNING) ZerarStorFire() elseif delay == 0 and getGlobalStorageValue(Fire.storages[1]) >= Fire.players.min then removeFireTp() doBroadcastMessage("Good Lucky! The event will start on "..Fire.timeToStartEvent.." seconds. get ready!") addEvent(doFireInArea, Fire.timeToStartEvent*1000, 1) end addEvent(CheckFireEvent, 60000, delay-1) endend]]></config><globalevent name="Storm_Fire_Start" interval="60" event="script"><![CDATA[domodlib('fire_config')function onThink(interval, lastExecution) if Fire_Days[os.date("%A")] then local hrs = tostring(os.date("%X")):sub(1, 5) if isInArray(Fire_Days[os.date("%A")], hrs) and getGlobalStorageValue(Fire.storages[2]) <= 0 then local tp = doCreateItem(1387, 1, Fire.teleport[1]) doItemSetAttribute(tp, "aid", 45111) CheckFireEvent(Fire.CheckTime) setGlobalStorageValue(Fire.storages[1], 0) end end return trueend]]></globalevent><event type="login" name="Storm_Fire_Login" event="script"><![CDATA[domodlib('fire_config')function onLogin(cid) registerCreatureEvent(cid, "FireStormBatle") if isInRange(getPlayerPosition(cid), Fire.arena[1], Fire.arena[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return trueend]]></event><event type="combat" name="FireStormBatle" event="script"><![CDATA[domodlib('fire_config')if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), Fire.arena[1], Fire.arena[2]) then doPlayerSendCancel(cid, "You may not attack this player.") return falseendreturn true]]></event><movevent type="StepIn" actionid ="45111" event="script"><![CDATA[domodlib('fire_config')function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, Fire.teleport[2]) end if getPlayerLevel(cid) < Fire.minLevel then doTeleportThing(cid, fromPosition, true) doPlayerSendCancel(cid, "You need to be at least level " .. Fire.minLevel .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end if getGlobalStorageValue(Fire.storages[1]) <= Fire.players.max then doTeleportThing(cid, Fire.teleport[2]) setGlobalStorageValue(Fire.storages[1], getGlobalStorageValue(Fire.storages[1])+1) doBroadcastMessage(getPlayerName(cid) .. " entered the fire stortm event! Currently " .. getGlobalStorageValue(Fire.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) if getGlobalStorageValue(Fire.storages[1]) == Fire.players.max then setGlobalStorageValue(Fire.storages[1], getGlobalStorageValue(Fire.storages[1])+1) removeFireTp() doBroadcastMessage("The event will start on "..Fire.timeToStartEvent.." seconds. get ready!") addEvent(doFireInArea, Fire.timeToStartEvent*1000, 1) end end return trueend]]></movevent><talkaction words="/firestart;!firestart" access="5" event="buffer"><![CDATA[domodlib('fire_config')if getGlobalStorageValue(Fire.storages[2]) > 0 then doPlayerSendCancel(cid, "The event is already starting.") return trueelseif not param or not tonumber(param) then doPlayerSendCancel(cid, "Use only numbers.") return true endlocal param = tonumber(param) <= 0 and 1 or tonumber(param)local tp = doCreateItem(1387, 1, Fire.teleport[1])doItemSetAttribute(tp, "aid", 45111)CheckFireEvent(tonumber(param))setGlobalStorageValue(Fire.storages[1], 0)setGlobalStorageValue(Fire.storages[2], 1)]]></talkaction><globalevent name="FireDebug-Start" type="start" event="buffer"><![CDATA[domodlib('fire_config')ZerarStorFire()return true]]></globalevent></mod> Baixa esse arquivo e adicione no seu servidor no respectivo lugar.! fire lua.rar fire lua.rar
-
(0.3.6-0.4]Global-events[TOP 5 FRAGS no BroadCast]
um tópico no fórum postou Crypter CreatureScripts e Movements
Oque a script faz?? Anuncio os top5 jogadores com mais frags.! Data/globalevents/script topfrags.lua function getJogadorFrags(jogador) -- essa função já existia, só modifiquei uma parte local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. jogador .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)} return size.day + size.week + size.monthendfunction onThink(interval, lastExecution) local max = 5 -- quantidade max que vai aparecer no rank local str,k, p = "TOP "..max.." Rank Frags:\n\n", 0, {} -- n mexa em nd local players = db.getResult("SELECT `id`,`name` FROM `players`") if (players:getID() ~= -1) then repeat table.insert(p, {getJogadorFrags(players:getDataInt("id")), players:getDataString("name")}) until not players:next() end table.sort(p, function(a, b) return a[1] > b[1] end) for x = 1, table.maxn(p) do k = k + 1 str = str .. "\n " .. k .. ". ".. p[x][2] .." - " .. p[x][1] .. "" if k == max then break end end doBroadcastMessage(str, 22) return trueend TAG: <globalevent name="TopFrags" interval="3600" event="script" value="topfrags.lua"/> -
È um sistema para poketibia que serio o Saffari totalmente automático. [+] O jogador não perde level(experience) ao morrer. [+] O jogador é teleportado quando acabar o tempo ou quando suas Saffari balls acabar! [+] Mostra o tempo restante num comando exclusivo !saffari time Pasta mods Saffari.xml <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Saffari" version="2.0" author="Vodkart" contact="none.com" enabled="yes"> <config name="saffari_func"><![CDATA[ config = { price = 5000, level = 50, need_premium = false, minutes = 60, saffari_positions = {enter = {x=152,y=51,z=5}, exit = {x=163,y=51,z=5}}, saffari_balls = {11445,30}, -- itemid e quantidade blocked_pokeballs = {2146, 2147, 11437, 11441, 11445}, -- pokeball, ultraball, greatball, masterball, safarriball storages = {874547,874548} -- start, time } function timeString(timeDiff) local dateFormat = { {"day", timeDiff / 60 / 60 / 24}, {"hour", timeDiff / 60 / 60 % 24}, {"minute", timeDiff / 60 % 60}, {"second", timeDiff % 60} } local out = {} for k, t in ipairs(dateFormat) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end local ret = table.concat(out) if ret:len() < 16 and ret:find("second") then local a, b = ret:find(" and ") ret = ret:sub(b+1) end return ret end ]]></config> <event type="login" name="SaffariRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "SaffariDeath") return true end]]></event> <talkaction words="/saffari;!saffari" event="buffer"><![CDATA[ domodlib('saffari_func') param = string.lower(param) if getPlayerStorageValue(cid, config.storages[1]) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not in Saffari") return true end if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, enter !saffari time or !safari leave") return true elseif isInArray({"time","tempo"}, param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, (getPlayerStorageValue(cid, config.storages[2]) - os.time() > 0 and "Left "..timeString(getPlayerStorageValue(cid, config.storages[2]) - os.time()).."" or "Time is over. Please wait a moment.").."\nTo leave enter command: !saffari leave") return true elseif isInArray({"sair","leave"},param) then doTeleportThing(cid, config.saffari_positions.exit) setPlayerStorageValue(cid, config.storages[1], 0) setPlayerStorageValue(cid, config.storages[2], 0) doPlayerSendTextMessage(cid,22,'you left the saffari zone.') return true end ]]></talkaction> <globalevent name="SaffariCheck" interval="60" event="script"><![CDATA[ domodlib('saffari_func') function onThink(interval, lastExecution) local on = getPlayersOnline() if #on > 0 then for i = 1, #on do if getPlayerStorageValue(on[i], config.storages[1]) > 0 then if getPlayerItemCount(on[i], config.saffari_balls[1]) <= 0 or getPlayerStorageValue(on[i], config.storages[2]) - os.time() <= 0 then doTeleportThing(on[i], config.saffari_positions.exit) setPlayerStorageValue(on[i], config.storages[1], 0) setPlayerStorageValue(on[i], config.storages[2], 0) doPlayerSendTextMessage(on[i],22,'you left the saffari zone.') end end end end return true end ]]></globalevent> <event type="death" name="SaffariDeath" event="script"><![CDATA[ domodlib('saffari_func') function onDeath(cid, corpse, deathList) if isPlayer(cid) and getPlayerStorageValue(cid, config.storages[1]) >= 1 then setPlayerStorageValue(cid, config.storages[1], 0) setPlayerStorageValue(cid, config.storages[2], 0) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end return true end ]]></event> </mod> NPC Saffari Man.xml <?xml version="1.0"?> <npc name="Saffari Man" script="data/npc/scripts/saffari.lua" walkinterval="50000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="95" body="116" legs="121" feet="115" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. You want to {enter} in the {saffari} zone!" /> </parameters> </npc> saffari.lua domodlib('saffari_func') local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser,msg = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid,msg:lower() if isInArray({"saffari","enter","entrar"}, msg) then npcHandler:say('you can stay in the Saffari zone by '..config.minutes..' minutes, the price is '..config.price..' gp(s), You want enter? {yes}', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then for i = 1, #config.blocked_pokeballs do if getPlayerItemCount(cid, config.blocked_pokeballs[i]) >= 1 then npcHandler:say('Keep your '..getItemNameById(config.blocked_pokeballs[i])..'!', cid) return true end end if config.need_premium and not isPremium(cid) then npcHandler:say('Sorry, you need to be premium!', cid) return true elseif getPlayerLevel(cid) < config.level then npcHandler:say('Sorry, you must be at least level '..config.level..' to enter the Saffari zone!', cid) return true elseif not doPlayerRemoveMoney(cid, config.price) then npcHandler:say('Sorry, you do not have enough money!', cid) return true end doPlayerAddItem(cid, config.saffari_balls[1], config.saffari_balls[2]) selfSay("Thanks, you've been teleported to the Saffari zone and has "..config.minutes.." minutes, if you want to leave enter {!saffari leave}.", cid) doTeleportThing(cid, config.saffari_positions.enter) setPlayerStorageValue(cid, config.storages[1], 1) setPlayerStorageValue(cid, config.storages[2], os.time()+config.minutes*60) elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("then ok.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.