Histórico de Curtidas
-
Smart Maxx recebeu reputação de DarkRed em [GlobalEvents] Perfect Zombie Event 100% automaticoPrimeiramente o evento foi testado num servidor 8.6, TFS 0.4, sem apresentar nenhum problema.
Em data/creaturescripts/scripts crie o arquivo zombieevent.lua :
local config = { playerCount = 2001, -- Storage dos players que entram e sai do evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 2152, 2160}, -- Recompensas. moneyReward = {2160, 10, 1}, -- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} -- Area que o zumbi vai spawnar fromPosition = {x = 543, y = 578, z = 7}, -- top de fromPosition até toPosition = {x = 577, y = 600, z = 7} -- em baixo toPostion } function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isMonster(attacker) then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then if getGlobalStorageValue(config.playerCount) >= 2 then doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) elseif getGlobalStorageValue(config.playerCount) == 1 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end end for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end return true end Na mesma pasta em login.lua antes do ultimo return true adicione :
registerCreatureEvent(cid, "zombieevent") Agora em data/creaturescripts adicione em creturescripts.XML :
<!-- ZOMBIE EVENT --> <event type="statschange" name="zombieevent" event="script" value="zombieevent.lua"/> Agora vamos em data/monster crie uma pasta com o nome ZombieEvent e dentro dessa pasta crie o arquivo chamado event zombie.XML :
<?xml version="1.0" encoding="UTF-8"?><monster name="Event Zombie" nameDescription="an event zombie" race="undead" experience="280" speed="100" manacost="0"> <health now="500" max="500"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="0"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="-35000" max="-35000"/> </attacks> <defenses armor="15" defense="10"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <loot> <item id="2148" countmax="1" chance="100000"/><!-- gold coin --> </loot> </monster> voltando pra pasta data/monster abra o arquivo monsters.XML e adicione :
<!-- ZombieEvent --> <monster name="event zombie" file="ZombieEvent/event zombie.xml"/> tudo ok até aqui ... então vamos pra pasta data/movements/scripts crie zombieevent.lua :
local config = { playerCount = 2001, -- Storage do players do evento maxPlayers = 20, -- Maximo de players pra partiparem do evento minLevel = 17 -- Level minimo pra entrar no evento } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getPlayerLevel(cid) < config.minLevel then addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "You need to be at least level " .. config.minLevel .. ".") return false end if getGlobalStorageValue(config.playerCount) < config.maxPlayers then setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1) if getGlobalStorageValue(config.playerCount) == config.maxPlayers then doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(config.playerCount) .. " players]! The event will soon start.") else doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(config.playerCount) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) end else addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "The event is full. There is already " .. config.maxPlayers .. " players participating in the quest.") return false end print(getStorage(config.playerCount) .. " Players in the zombie event.") return true end function tpBack(cid, fromPosition) doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end voltando pra data/movements abra o arquivo movements.XML e adicione :
<!-- ZOMBIE event --> <movevent type="StepIn" actionid="2008" event="script" value="zombieevent.lua"/> agora vamos pra parte mais importante e que devemos mais prestar atenção...
em data/globalevents/scripts crie zombieevent.lua :
local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 2152, 2160}, -- Recompensas. moneyReward = {2160, 10, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 652, y = 1020, z = 7, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 559, y = 589, z = 7}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 2, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "event zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 3, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x = 543, y = 578, z = 7}, -- top de fromPosition até toPosition = {x = 577, y = 600, z = 7} -- -- em baixo toPostion } function onTime() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUE end function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Good luck in the zombie event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. config.timeBetweenSpawns .. " seconds! Good luck!") pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) else local fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doBroadcastMessage(getCreatureName(cid)..' has survived at zombie event!') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") elseif isMonster(cid) then doRemoveCreature(cid) end end end end end end function pvgaylord() local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0 for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) then p = p+1 elseif isMonster(cid) then m = m+1 end end end end if p ~= getGlobalStorageValue(config.playerCount) then setGlobalStorageValue(config.playerCount, p) end if p < 2 then return true end addEvent(pvgaylord,100,nil) end na mesma pasta crie o arquivo fechazombie.lua :
local teleportPos = {x = 652, y = 1020, z = 7, stackpos = 1} -- Posição em que se abre o teleport local teleportId = 1387 function onTimer() for i = 1, 255 do teleportPos.stackpos = i if getThingFromPos(teleportPos).itemid == teleportId then doRemoveItem(getThingFromPos(teleportPos).uid, 1) end end return true end agora em data/globalevents abra o arquivo globalevents.XML e adicione :
<globalevent name="zombieevent" time="23:41" event="script" value="zombieevent.lua"/> <globalevent name="zombieventt" time="23:43" event="script" value="fechazombie.lua"/> Importante : time="Horário que irá acontecer o evento" e no fechazombie coloque 2 minutos a mais da hora que vc colocou pra iniciar, para assim fechar o teleport na hora em que o evento é startado (configuração padrão do script, se alterar lá terá que alterar aqui tb)
Agora só abrir e desfrutar do seu novo sistema...
Download de mapas :
http://tibiaking.com...apa-modificado/ - tiago.bordin1988
http://tibiaking.com...mbie-event-v10/ - ricardo3
http://tibiaking.com...map-86-inovado/ - OhGod
http://www.speedysha...ombieEvent.otbm
Créditos...
Fausto32
Sociopata
Orochi Elf
Phowned
Smart Maxx
-
Smart Maxx recebeu reputação de fabao em [GlobalEvents] Perfect Zombie Event 100% automaticoPrimeiramente o evento foi testado num servidor 8.6, TFS 0.4, sem apresentar nenhum problema.
Em data/creaturescripts/scripts crie o arquivo zombieevent.lua :
local config = { playerCount = 2001, -- Storage dos players que entram e sai do evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 2152, 2160}, -- Recompensas. moneyReward = {2160, 10, 1}, -- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} -- Area que o zumbi vai spawnar fromPosition = {x = 543, y = 578, z = 7}, -- top de fromPosition até toPosition = {x = 577, y = 600, z = 7} -- em baixo toPostion } function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isMonster(attacker) then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then if getGlobalStorageValue(config.playerCount) >= 2 then doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) elseif getGlobalStorageValue(config.playerCount) == 1 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end end for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end return true end Na mesma pasta em login.lua antes do ultimo return true adicione :
registerCreatureEvent(cid, "zombieevent") Agora em data/creaturescripts adicione em creturescripts.XML :
<!-- ZOMBIE EVENT --> <event type="statschange" name="zombieevent" event="script" value="zombieevent.lua"/> Agora vamos em data/monster crie uma pasta com o nome ZombieEvent e dentro dessa pasta crie o arquivo chamado event zombie.XML :
<?xml version="1.0" encoding="UTF-8"?><monster name="Event Zombie" nameDescription="an event zombie" race="undead" experience="280" speed="100" manacost="0"> <health now="500" max="500"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="0"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="-35000" max="-35000"/> </attacks> <defenses armor="15" defense="10"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <loot> <item id="2148" countmax="1" chance="100000"/><!-- gold coin --> </loot> </monster> voltando pra pasta data/monster abra o arquivo monsters.XML e adicione :
<!-- ZombieEvent --> <monster name="event zombie" file="ZombieEvent/event zombie.xml"/> tudo ok até aqui ... então vamos pra pasta data/movements/scripts crie zombieevent.lua :
local config = { playerCount = 2001, -- Storage do players do evento maxPlayers = 20, -- Maximo de players pra partiparem do evento minLevel = 17 -- Level minimo pra entrar no evento } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getPlayerLevel(cid) < config.minLevel then addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "You need to be at least level " .. config.minLevel .. ".") return false end if getGlobalStorageValue(config.playerCount) < config.maxPlayers then setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1) if getGlobalStorageValue(config.playerCount) == config.maxPlayers then doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(config.playerCount) .. " players]! The event will soon start.") else doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(config.playerCount) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) end else addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "The event is full. There is already " .. config.maxPlayers .. " players participating in the quest.") return false end print(getStorage(config.playerCount) .. " Players in the zombie event.") return true end function tpBack(cid, fromPosition) doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end voltando pra data/movements abra o arquivo movements.XML e adicione :
<!-- ZOMBIE event --> <movevent type="StepIn" actionid="2008" event="script" value="zombieevent.lua"/> agora vamos pra parte mais importante e que devemos mais prestar atenção...
em data/globalevents/scripts crie zombieevent.lua :
local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 2152, 2160}, -- Recompensas. moneyReward = {2160, 10, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 652, y = 1020, z = 7, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 559, y = 589, z = 7}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 2, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "event zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 3, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x = 543, y = 578, z = 7}, -- top de fromPosition até toPosition = {x = 577, y = 600, z = 7} -- -- em baixo toPostion } function onTime() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUE end function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Good luck in the zombie event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. config.timeBetweenSpawns .. " seconds! Good luck!") pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) else local fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doBroadcastMessage(getCreatureName(cid)..' has survived at zombie event!') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") elseif isMonster(cid) then doRemoveCreature(cid) end end end end end end function pvgaylord() local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0 for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) then p = p+1 elseif isMonster(cid) then m = m+1 end end end end if p ~= getGlobalStorageValue(config.playerCount) then setGlobalStorageValue(config.playerCount, p) end if p < 2 then return true end addEvent(pvgaylord,100,nil) end na mesma pasta crie o arquivo fechazombie.lua :
local teleportPos = {x = 652, y = 1020, z = 7, stackpos = 1} -- Posição em que se abre o teleport local teleportId = 1387 function onTimer() for i = 1, 255 do teleportPos.stackpos = i if getThingFromPos(teleportPos).itemid == teleportId then doRemoveItem(getThingFromPos(teleportPos).uid, 1) end end return true end agora em data/globalevents abra o arquivo globalevents.XML e adicione :
<globalevent name="zombieevent" time="23:41" event="script" value="zombieevent.lua"/> <globalevent name="zombieventt" time="23:43" event="script" value="fechazombie.lua"/> Importante : time="Horário que irá acontecer o evento" e no fechazombie coloque 2 minutos a mais da hora que vc colocou pra iniciar, para assim fechar o teleport na hora em que o evento é startado (configuração padrão do script, se alterar lá terá que alterar aqui tb)
Agora só abrir e desfrutar do seu novo sistema...
Download de mapas :
http://tibiaking.com...apa-modificado/ - tiago.bordin1988
http://tibiaking.com...mbie-event-v10/ - ricardo3
http://tibiaking.com...map-86-inovado/ - OhGod
http://www.speedysha...ombieEvent.otbm
Créditos...
Fausto32
Sociopata
Orochi Elf
Phowned
Smart Maxx
-
Smart Maxx recebeu reputação de Gui Lima em (Resolvido)Como editar account manager?no config.lua :
accountManager = "yes" namelockManager = "no" newPlayerChooseVoc = "yes" newPlayerSpawnPosX = 159 -- Configura posição que ele nasce, Pos x newPlayerSpawnPosY = 51 -- Pos y newPlayerSpawnPosZ = 7 -- Pos z newPlayerTownId = 1 newPlayerLevel = 10 -- Level que ele nasce newPlayerMagicLevel = 0 generateAccountNumber = "no" addonsOnlyPremium = false Já o do nascer com X outfit, primeiro que ao criar acc todas as outfit são liberadas, logo então teria que mudar bastante coisa até chegar onde tu quer.Estou se baseando nos tibia que mecho não sei se esse Fox Wolrd, é diferente;
-
Smart Maxx recebeu reputação de Hugoo222222 em [TFS 1.0] VIP SystemLérigou ...
-- SYSTEM --
MySQL queries
-execute em sua database :
ALTER TABLE `accounts` ADD COLUMN `viplastday` int(10) NOT NULL DEFAULT 0 AFTER `lastday`, ADD COLUMN `vipdays` int(11) NOT NULL DEFAULT 0 AFTER `lastday`; login.lua
- procure o arquivo em data/creaturescripts/scripts/
- adicione logo após local player = Player(cid) :
player:loadVipData() player:updateVipTime() global.lua
- procure o arquivo em data/
- adicione este código em baixo dofile('data/compat.lua')
dofile('data/vip-system.lua') vip-system.lua
- crie este arquivo em data/
- adicione esse código nele :
if not VipData then VipData = { } end function Player.getVipDays(self) return VipData[self:getId()].days end function Player.getLastVipDay(self) return VipData[self:getId()].lastDay end function Player.isVip(self) return self:getVipDays() > 0 end function Player.addInfiniteVip(self) local data = VipData[self:getId()] data.days = 0xFFFF data.lastDay = 0 db.query(string.format('UPDATE `accounts` SET `vipdays` = %i, `viplastday` = %i WHERE `id` = %i;', 0xFFFF, 0, self:getAccountId())) end function Player.addVipDays(self, amount) local data = VipData[self:getId()] local amount = math.min(0xFFFE - data.days, amount) if amount > 0 then if data.days == 0 then local time = os.time() db.query(string.format('UPDATE `accounts` SET `vipdays` = `vipdays` + %i, `viplastday` = %i WHERE `id` = %i;', amount, time, self:getAccountId())) data.lastDay = time else db.query(string.format('UPDATE `accounts` SET `vipdays` = `vipdays` + %i WHERE `id` = %i;', amount, self:getAccountId())) end data.days = data.days + amount end return true end function Player.removeVipDays(self, amount) local data = VipData[self:getId()] if data.days == 0xFFFF then return false end local amount = math.min(data.days, amount) if amount > 0 then db.query(string.format('UPDATE `accounts` SET `vipdays` = `vipdays` - %i WHERE `id` = %i;', amount, self:getAccountId())) data.days = data.days - amount end return true end function Player.removeVip(self) local data = VipData[self:getId()] data.days = 0 data.lastDay = 0 db.query(string.format('UPDATE `accounts` SET `vipdays` = 0, `viplastday` = 0 WHERE `id` = %i;', self:getAccountId())) end function Player.loadVipData(self) local resultId = db.storeQuery(string.format('SELECT `vipdays`, `viplastday` FROM `accounts` WHERE `id` = %i;', self:getAccountId())) if resultId then VipData[self:getId()] = { days = result.getDataInt(resultId, 'vipdays'), lastDay = result.getDataInt(resultId, 'viplastday') } result.free(resultId) return true end VipData[self:getId()] = { days = 0, lastDay = 0 } return false end function Player.updateVipTime(self) local save = false local data = VipData[self:getId()] local days, lastDay = data.days, data.lastDay if days == 0 or days == 0xFFFF then if lastDay ~= 0 then lastDay = 0 save = true end elseif lastDay == 0 then lastDay = os.time() save = true else local time = os.time() local elapsedDays = math.floor((time - lastDay) / 86400) if elapsedDays > 0 then if elapsedDays >= days then days = 0 lastDay = 0 else days = days - elapsedDays lastDay = time - ((time - lastDay) % 86400) end save = true end end if save then db.query(string.format('UPDATE `accounts` SET `vipdays` = %i, `viplastday` = %i WHERE `id` = %i;', days, lastDay, self:getAccountId())) data.days = days data.lastDay = lastDay end end -- Talkactions (/vip command ) --
- Modos de usar :
- /vip adddays, PlayerName, 5
--> Adiciona 5 dias de vip ao PlayerName.
- /vip removedays, PlayerName, 5
--> Remove 5 dias de vip do PlayerName.
- /vip remove, PlayerName
--> Remove todos dias de vip do PlayerName.
- /vip check, PlayerName
--> Checa quando dias de vip tem o PlayerName .
- /vip addinfinite, PlayerName
--> Add infinite vip time ao PlayerName.
talkactions.xml
- procure em data/talkactions/
- adicione o seguinte código :
<talkaction words="/vip" separator=" " script="vipcommand.lua" /> vipcommand.lua
- crie o arquivo em data/talkactions/scripts
- cole este código dentro :
function onSay(cid, words, param)local player = Player(cid) if not player:getGroup():getAccess() then return true end local params = param:split(',') if not params[2] then player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('Player is required.\nUsage:\n%s <action>, <name>, [, <value>]\n\nAvailable actions:\ncheck, adddays, addinfinite, removedays, remove', words)) return false end local targetName = params[2]:trim() local target = Player(targetName) if not target then player:sendCancelMessage(string.format('Player (%s) is not online. Usage: %s <action>, <player> [, <value>]', targetName, words)) return false end local action = params[1]:trim():lower() if action == 'adddays' then local amount = tonumber(params[3]) if not amount then player:sendCancelMessage('<value> has to be a numeric value.') return false end target:addVipDays(amount) player:sendCancelMessage(string.format('%s received %s vip day(s) and now has %s vip day(s).', target:getName(), amount, target:getVipDays())) elseif action == 'removedays' then local amount = tonumber(params[3]) if not amount then player:sendCancelMessage('<value> has to be a numeric value.') return false end target:removeVipDays(amount) player:sendCancelMessage(string.format('%s lost %s vip day(s) and now has %s vip day(s).', target:getName(), amount, target:getVipDays())) elseif action == 'addinfinite' then target:addInfiniteVip() player:sendCancelMessage(string.format('%s now has infinite vip time.', target:getName())) elseif action == 'remove' then target:removeVip() player:sendCancelMessage(string.format('You removed all vip days from %s.', target:getName())) elseif action == 'check' then local days = target:getVipDays() player:sendCancelMessage(string.format('%s has %s vip day(s).', target:getName(), (days == 0xFFFF and 'infinite' or days))) else player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('Action is required.\nUsage:\n%s <action>, <name>, [, <value>]\n\nAvailable actions:\ncheck, adddays, addinfinite, removedays, remove', words)) end return false end Créditos...
Printer
Summ
Eu
-
Smart Maxx recebeu reputação de Mathias Kenfi em (Resolvido)[PEDIDO] Aumentando o level de 717217. para 2000000Rsrsrsrs isso é algo bem complicado de fazer, primeiramente que não é por script é nas sources :
em player.h :
static uint64_t getExpForLevel(uint32_t lv) troque por :
static uint64_t getExpForLevel(uint32_t lv) { static std::map<uint32_t, uint64_t> cache; lv--; std::map<uint32_t, uint64_t>::iterator it = cache.find(lv); if(it != cache.end()) return it->second; uint64_t exp = ((50ULL * (lv+1ULL) / 3ULL - 100ULL) * (lv+1ULL) + 850ULL / 3ULL) * (lv+1ULL) - 200ULL; cache[lv] = exp; return exp; } em protocolgame.cpp :
if(experience > 0x7FFFFFFF) // client debugs after 2,147,483,647 exp msg->put<uint32_t>(0x7FFFFFFF); troque por :
if(experience > 2147483647) // client debugs after 2,147,483,647 exp msg->put<uint32_t>(2147483647); Dps dou as explicações que vou dormir agr;
-
Smart Maxx recebeu reputação de Gabrielk em [Original] Azeroth RPGAzeroth Server
Versão: 8.60
Distro: TFS 0.4
Mapa Base: Yourots Edited e Mix Yourots
Esse mapa particularmente foi um dos mais divertidos e legais que já gostei de editar...
Hoje venho trazer a versão que podemos talvez chamar de v2.0 desse magnfico serve focado em rpg.
Não tem como eu citar tudo que foi acrescentado e editado porque foi muitas coisas mesmo é só consigo lembrar das recentes ...
Inicialmente o mapa contem 7 cidades que são elas :
Azeroth Avalon Zatur Liberty Bay Gloria Sand Trap Tiquanda Estou trabalhando com um amigo em um mapa, que seria o novo continente desse serve com mais 9 cidades... talvez mais em breve eu posto algo relacionado à isso.
> Mapa RPG bem detalhado para Ots Low e Mid rate.
> Inúmeras invasões automáticas, Low e High lvl (ou iniciadas pelo comando /raid "nome").
> NPCs de Travel/Boat diferentes para cada cidade.
> Mais de 70 quests (além das principais) espalhadas pelo mapa.
> Quests especiais com NPCs
> Arena PvP sem perda de items.
> Sistema de Guerras pelo Castelo [entre guilds]
> Sistema de Refinamento e Slot (mais detalhes abaixo).
> Sistema de Mineração
> Scripts e sistemas aprimorados para o servidor
> Distro SEM erro algum
> Principais Quests:
Annihilator
Blue Legs
Pits of Inferno
MMS
The Inquisition
The Death
FireWalker Boots
Demon Helmet
Draken
Hell Conquer
______________________________________________________________________________________________________________________
V2.0
> Muitas correções no mapa
> Ajustes nos scripts de Slot
> Ajustes nos scripts de Mineração
> Ajustes em alguns npcs
> Adicionado mais 4 npcs pro futuro novo continente
> Adicionado Battlefield Evento funcionado 100% (comando /battlefield "numero de players")
> Adicionado Evento Zombie 100% automatico
> Pequenas alterações no Castle of Honor
> Balanceado sistemas de minério
> Mais de 40 Quest adicionadas
> Adicionado comando de expulsar player inativo da house
> Corrigido muitos bugs encontrados ao decorrer da edição do serve
> Adicionada muitas hunts (Hunts do nosso querido @Daniel implementadas)
> e muito mais ...
Edição e postagem(leia):
É Autorizado edições e repostagens do Azeroth Server (aliás, não posso proibir isso) mas peço a vocês que pelo menos respeitem o estilo do mapa. Eu não sei se poderei dar continuidade a ele, mas trata-se de um projeto RPG.
Pensa só, Vmspk teve um trabalhão pra editar o server, ele fez tudo com mais amor do que o arroz que sua mãe faz com sazón, e você vai baixar, encher de teleportes e hunts quadradas, colocar armas com atk de 350000, sistemas VIPs sem propósito algum, vai copiar o tópico, retirar meus créditos e postar novamente? Reconsidere, pois não há nada mais desmotivador para um desenvolvedor do que isso, ver seu trabalho cair em desuso, como aconteceu com o Styller YourOts, Vancini e Baiak, que agora é um monstro sem pé nem cabeça (alguns gostam desse tipo de server, tudo bem, mas essa não é a proposta deste servidor).
Se teve boas ideias e quer editar o servidor para postar, fique à vontade, mas não nos decepcione. !
Não há teleports diretos para hunts ou quests.
Não há items ou monstros editados(além dos trainers).
Não há sistema VIP, VIP 2, VIP 3, VIP 345456364.
Não há raids com monstros excessivamente fortes nas cidades iniciais.
Créditos
< Unknow YourOts Edited >
< Mix Yourots Team >
< Crystal Server Team >
< Tryller >
< Mock >
< TFS Team >
< TonyHanks >
< Centera World >
< Vmspk >
<EddyHavoc>
<Smart Maxx>
<Daniel>
<White Wolf>
<Absolute>
< e muitos outros ... >
Otserv : http://www.mediafire.com/download/43t9eh6te2e1v7c/otserv.rar
Scan : https://www.virustotal.com/pt/file/7a4ae609b0dda80af75d6ff6aefa122e0f42c067983c353baa55cece17ad0c55/analysis/1416407066/
Db : https://www.mediafire.com/?xwj5piwca7ff2xz
-
Smart Maxx recebeu reputação de Cicuta Verde em Ajuda Não consigo deixar meu wodbo onlineno seu config.lua troque :
sqlHost = "localhost" por
sqlHost = "127.0.0.1" ou
sqlHost = "seu ip" -
Smart Maxx recebeu reputação de CabralChoi em [GlobalEvents] Perfect Zombie Event 100% automaticoPrimeiramente o evento foi testado num servidor 8.6, TFS 0.4, sem apresentar nenhum problema.
Em data/creaturescripts/scripts crie o arquivo zombieevent.lua :
local config = { playerCount = 2001, -- Storage dos players que entram e sai do evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 2152, 2160}, -- Recompensas. moneyReward = {2160, 10, 1}, -- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} -- Area que o zumbi vai spawnar fromPosition = {x = 543, y = 578, z = 7}, -- top de fromPosition até toPosition = {x = 577, y = 600, z = 7} -- em baixo toPostion } function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isMonster(attacker) then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then if getGlobalStorageValue(config.playerCount) >= 2 then doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) elseif getGlobalStorageValue(config.playerCount) == 1 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end end for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end return true end Na mesma pasta em login.lua antes do ultimo return true adicione :
registerCreatureEvent(cid, "zombieevent") Agora em data/creaturescripts adicione em creturescripts.XML :
<!-- ZOMBIE EVENT --> <event type="statschange" name="zombieevent" event="script" value="zombieevent.lua"/> Agora vamos em data/monster crie uma pasta com o nome ZombieEvent e dentro dessa pasta crie o arquivo chamado event zombie.XML :
<?xml version="1.0" encoding="UTF-8"?><monster name="Event Zombie" nameDescription="an event zombie" race="undead" experience="280" speed="100" manacost="0"> <health now="500" max="500"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="0"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="-35000" max="-35000"/> </attacks> <defenses armor="15" defense="10"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <loot> <item id="2148" countmax="1" chance="100000"/><!-- gold coin --> </loot> </monster> voltando pra pasta data/monster abra o arquivo monsters.XML e adicione :
<!-- ZombieEvent --> <monster name="event zombie" file="ZombieEvent/event zombie.xml"/> tudo ok até aqui ... então vamos pra pasta data/movements/scripts crie zombieevent.lua :
local config = { playerCount = 2001, -- Storage do players do evento maxPlayers = 20, -- Maximo de players pra partiparem do evento minLevel = 17 -- Level minimo pra entrar no evento } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getPlayerLevel(cid) < config.minLevel then addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "You need to be at least level " .. config.minLevel .. ".") return false end if getGlobalStorageValue(config.playerCount) < config.maxPlayers then setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1) if getGlobalStorageValue(config.playerCount) == config.maxPlayers then doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(config.playerCount) .. " players]! The event will soon start.") else doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(config.playerCount) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) end else addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "The event is full. There is already " .. config.maxPlayers .. " players participating in the quest.") return false end print(getStorage(config.playerCount) .. " Players in the zombie event.") return true end function tpBack(cid, fromPosition) doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end voltando pra data/movements abra o arquivo movements.XML e adicione :
<!-- ZOMBIE event --> <movevent type="StepIn" actionid="2008" event="script" value="zombieevent.lua"/> agora vamos pra parte mais importante e que devemos mais prestar atenção...
em data/globalevents/scripts crie zombieevent.lua :
local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 2152, 2160}, -- Recompensas. moneyReward = {2160, 10, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 652, y = 1020, z = 7, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 559, y = 589, z = 7}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 2, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "event zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 3, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x = 543, y = 578, z = 7}, -- top de fromPosition até toPosition = {x = 577, y = 600, z = 7} -- -- em baixo toPostion } function onTime() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUE end function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Good luck in the zombie event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. config.timeBetweenSpawns .. " seconds! Good luck!") pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) else local fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doBroadcastMessage(getCreatureName(cid)..' has survived at zombie event!') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") elseif isMonster(cid) then doRemoveCreature(cid) end end end end end end function pvgaylord() local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0 for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) then p = p+1 elseif isMonster(cid) then m = m+1 end end end end if p ~= getGlobalStorageValue(config.playerCount) then setGlobalStorageValue(config.playerCount, p) end if p < 2 then return true end addEvent(pvgaylord,100,nil) end na mesma pasta crie o arquivo fechazombie.lua :
local teleportPos = {x = 652, y = 1020, z = 7, stackpos = 1} -- Posição em que se abre o teleport local teleportId = 1387 function onTimer() for i = 1, 255 do teleportPos.stackpos = i if getThingFromPos(teleportPos).itemid == teleportId then doRemoveItem(getThingFromPos(teleportPos).uid, 1) end end return true end agora em data/globalevents abra o arquivo globalevents.XML e adicione :
<globalevent name="zombieevent" time="23:41" event="script" value="zombieevent.lua"/> <globalevent name="zombieventt" time="23:43" event="script" value="fechazombie.lua"/> Importante : time="Horário que irá acontecer o evento" e no fechazombie coloque 2 minutos a mais da hora que vc colocou pra iniciar, para assim fechar o teleport na hora em que o evento é startado (configuração padrão do script, se alterar lá terá que alterar aqui tb)
Agora só abrir e desfrutar do seu novo sistema...
Download de mapas :
http://tibiaking.com...apa-modificado/ - tiago.bordin1988
http://tibiaking.com...mbie-event-v10/ - ricardo3
http://tibiaking.com...map-86-inovado/ - OhGod
http://www.speedysha...ombieEvent.otbm
Créditos...
Fausto32
Sociopata
Orochi Elf
Phowned
Smart Maxx
-
Smart Maxx recebeu reputação de Zaruss em [Original] Azeroth RPGAzeroth Server
Versão: 8.60
Distro: TFS 0.4
Mapa Base: Yourots Edited e Mix Yourots
Esse mapa particularmente foi um dos mais divertidos e legais que já gostei de editar...
Hoje venho trazer a versão que podemos talvez chamar de v2.0 desse magnfico serve focado em rpg.
Não tem como eu citar tudo que foi acrescentado e editado porque foi muitas coisas mesmo é só consigo lembrar das recentes ...
Inicialmente o mapa contem 7 cidades que são elas :
Azeroth Avalon Zatur Liberty Bay Gloria Sand Trap Tiquanda Estou trabalhando com um amigo em um mapa, que seria o novo continente desse serve com mais 9 cidades... talvez mais em breve eu posto algo relacionado à isso.
> Mapa RPG bem detalhado para Ots Low e Mid rate.
> Inúmeras invasões automáticas, Low e High lvl (ou iniciadas pelo comando /raid "nome").
> NPCs de Travel/Boat diferentes para cada cidade.
> Mais de 70 quests (além das principais) espalhadas pelo mapa.
> Quests especiais com NPCs
> Arena PvP sem perda de items.
> Sistema de Guerras pelo Castelo [entre guilds]
> Sistema de Refinamento e Slot (mais detalhes abaixo).
> Sistema de Mineração
> Scripts e sistemas aprimorados para o servidor
> Distro SEM erro algum
> Principais Quests:
Annihilator
Blue Legs
Pits of Inferno
MMS
The Inquisition
The Death
FireWalker Boots
Demon Helmet
Draken
Hell Conquer
______________________________________________________________________________________________________________________
V2.0
> Muitas correções no mapa
> Ajustes nos scripts de Slot
> Ajustes nos scripts de Mineração
> Ajustes em alguns npcs
> Adicionado mais 4 npcs pro futuro novo continente
> Adicionado Battlefield Evento funcionado 100% (comando /battlefield "numero de players")
> Adicionado Evento Zombie 100% automatico
> Pequenas alterações no Castle of Honor
> Balanceado sistemas de minério
> Mais de 40 Quest adicionadas
> Adicionado comando de expulsar player inativo da house
> Corrigido muitos bugs encontrados ao decorrer da edição do serve
> Adicionada muitas hunts (Hunts do nosso querido @Daniel implementadas)
> e muito mais ...
Edição e postagem(leia):
É Autorizado edições e repostagens do Azeroth Server (aliás, não posso proibir isso) mas peço a vocês que pelo menos respeitem o estilo do mapa. Eu não sei se poderei dar continuidade a ele, mas trata-se de um projeto RPG.
Pensa só, Vmspk teve um trabalhão pra editar o server, ele fez tudo com mais amor do que o arroz que sua mãe faz com sazón, e você vai baixar, encher de teleportes e hunts quadradas, colocar armas com atk de 350000, sistemas VIPs sem propósito algum, vai copiar o tópico, retirar meus créditos e postar novamente? Reconsidere, pois não há nada mais desmotivador para um desenvolvedor do que isso, ver seu trabalho cair em desuso, como aconteceu com o Styller YourOts, Vancini e Baiak, que agora é um monstro sem pé nem cabeça (alguns gostam desse tipo de server, tudo bem, mas essa não é a proposta deste servidor).
Se teve boas ideias e quer editar o servidor para postar, fique à vontade, mas não nos decepcione. !
Não há teleports diretos para hunts ou quests.
Não há items ou monstros editados(além dos trainers).
Não há sistema VIP, VIP 2, VIP 3, VIP 345456364.
Não há raids com monstros excessivamente fortes nas cidades iniciais.
Créditos
< Unknow YourOts Edited >
< Mix Yourots Team >
< Crystal Server Team >
< Tryller >
< Mock >
< TFS Team >
< TonyHanks >
< Centera World >
< Vmspk >
<EddyHavoc>
<Smart Maxx>
<Daniel>
<White Wolf>
<Absolute>
< e muitos outros ... >
Otserv : http://www.mediafire.com/download/43t9eh6te2e1v7c/otserv.rar
Scan : https://www.virustotal.com/pt/file/7a4ae609b0dda80af75d6ff6aefa122e0f42c067983c353baa55cece17ad0c55/analysis/1416407066/
Db : https://www.mediafire.com/?xwj5piwca7ff2xz
-
Smart Maxx recebeu reputação de Axion Nitron em [GlobalEvents] Perfect Zombie Event 100% automaticoPrimeiramente o evento foi testado num servidor 8.6, TFS 0.4, sem apresentar nenhum problema.
Em data/creaturescripts/scripts crie o arquivo zombieevent.lua :
local config = { playerCount = 2001, -- Storage dos players que entram e sai do evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 2152, 2160}, -- Recompensas. moneyReward = {2160, 10, 1}, -- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} -- Area que o zumbi vai spawnar fromPosition = {x = 543, y = 578, z = 7}, -- top de fromPosition até toPosition = {x = 577, y = 600, z = 7} -- em baixo toPostion } function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isMonster(attacker) then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then if getGlobalStorageValue(config.playerCount) >= 2 then doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) elseif getGlobalStorageValue(config.playerCount) == 1 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end end for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end return true end Na mesma pasta em login.lua antes do ultimo return true adicione :
registerCreatureEvent(cid, "zombieevent") Agora em data/creaturescripts adicione em creturescripts.XML :
<!-- ZOMBIE EVENT --> <event type="statschange" name="zombieevent" event="script" value="zombieevent.lua"/> Agora vamos em data/monster crie uma pasta com o nome ZombieEvent e dentro dessa pasta crie o arquivo chamado event zombie.XML :
<?xml version="1.0" encoding="UTF-8"?><monster name="Event Zombie" nameDescription="an event zombie" race="undead" experience="280" speed="100" manacost="0"> <health now="500" max="500"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="0"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="-35000" max="-35000"/> </attacks> <defenses armor="15" defense="10"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <loot> <item id="2148" countmax="1" chance="100000"/><!-- gold coin --> </loot> </monster> voltando pra pasta data/monster abra o arquivo monsters.XML e adicione :
<!-- ZombieEvent --> <monster name="event zombie" file="ZombieEvent/event zombie.xml"/> tudo ok até aqui ... então vamos pra pasta data/movements/scripts crie zombieevent.lua :
local config = { playerCount = 2001, -- Storage do players do evento maxPlayers = 20, -- Maximo de players pra partiparem do evento minLevel = 17 -- Level minimo pra entrar no evento } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getPlayerLevel(cid) < config.minLevel then addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "You need to be at least level " .. config.minLevel .. ".") return false end if getGlobalStorageValue(config.playerCount) < config.maxPlayers then setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1) if getGlobalStorageValue(config.playerCount) == config.maxPlayers then doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(config.playerCount) .. " players]! The event will soon start.") else doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(config.playerCount) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) end else addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "The event is full. There is already " .. config.maxPlayers .. " players participating in the quest.") return false end print(getStorage(config.playerCount) .. " Players in the zombie event.") return true end function tpBack(cid, fromPosition) doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end voltando pra data/movements abra o arquivo movements.XML e adicione :
<!-- ZOMBIE event --> <movevent type="StepIn" actionid="2008" event="script" value="zombieevent.lua"/> agora vamos pra parte mais importante e que devemos mais prestar atenção...
em data/globalevents/scripts crie zombieevent.lua :
local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 5805, -- Troféu que vai pro vencedor do evento rewards = {2195, 2152, 2160}, -- Recompensas. moneyReward = {2160, 10, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 652, y = 1020, z = 7, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 559, y = 589, z = 7}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 2, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "event zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 3, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x = 543, y = 578, z = 7}, -- top de fromPosition até toPosition = {x = 577, y = 600, z = 7} -- -- em baixo toPostion } function onTime() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUE end function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Good luck in the zombie event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. config.timeBetweenSpawns .. " seconds! Good luck!") pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) else local fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doBroadcastMessage(getCreatureName(cid)..' has survived at zombie event!') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") elseif isMonster(cid) then doRemoveCreature(cid) end end end end end end function pvgaylord() local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0 for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) then p = p+1 elseif isMonster(cid) then m = m+1 end end end end if p ~= getGlobalStorageValue(config.playerCount) then setGlobalStorageValue(config.playerCount, p) end if p < 2 then return true end addEvent(pvgaylord,100,nil) end na mesma pasta crie o arquivo fechazombie.lua :
local teleportPos = {x = 652, y = 1020, z = 7, stackpos = 1} -- Posição em que se abre o teleport local teleportId = 1387 function onTimer() for i = 1, 255 do teleportPos.stackpos = i if getThingFromPos(teleportPos).itemid == teleportId then doRemoveItem(getThingFromPos(teleportPos).uid, 1) end end return true end agora em data/globalevents abra o arquivo globalevents.XML e adicione :
<globalevent name="zombieevent" time="23:41" event="script" value="zombieevent.lua"/> <globalevent name="zombieventt" time="23:43" event="script" value="fechazombie.lua"/> Importante : time="Horário que irá acontecer o evento" e no fechazombie coloque 2 minutos a mais da hora que vc colocou pra iniciar, para assim fechar o teleport na hora em que o evento é startado (configuração padrão do script, se alterar lá terá que alterar aqui tb)
Agora só abrir e desfrutar do seu novo sistema...
Download de mapas :
http://tibiaking.com...apa-modificado/ - tiago.bordin1988
http://tibiaking.com...mbie-event-v10/ - ricardo3
http://tibiaking.com...map-86-inovado/ - OhGod
http://www.speedysha...ombieEvent.otbm
Créditos...
Fausto32
Sociopata
Orochi Elf
Phowned
Smart Maxx
-
Smart Maxx recebeu reputação de Bluetooth em [TFS 1.0] VIP SystemLérigou ...
-- SYSTEM --
MySQL queries
-execute em sua database :
ALTER TABLE `accounts` ADD COLUMN `viplastday` int(10) NOT NULL DEFAULT 0 AFTER `lastday`, ADD COLUMN `vipdays` int(11) NOT NULL DEFAULT 0 AFTER `lastday`; login.lua
- procure o arquivo em data/creaturescripts/scripts/
- adicione logo após local player = Player(cid) :
player:loadVipData() player:updateVipTime() global.lua
- procure o arquivo em data/
- adicione este código em baixo dofile('data/compat.lua')
dofile('data/vip-system.lua') vip-system.lua
- crie este arquivo em data/
- adicione esse código nele :
if not VipData then VipData = { } end function Player.getVipDays(self) return VipData[self:getId()].days end function Player.getLastVipDay(self) return VipData[self:getId()].lastDay end function Player.isVip(self) return self:getVipDays() > 0 end function Player.addInfiniteVip(self) local data = VipData[self:getId()] data.days = 0xFFFF data.lastDay = 0 db.query(string.format('UPDATE `accounts` SET `vipdays` = %i, `viplastday` = %i WHERE `id` = %i;', 0xFFFF, 0, self:getAccountId())) end function Player.addVipDays(self, amount) local data = VipData[self:getId()] local amount = math.min(0xFFFE - data.days, amount) if amount > 0 then if data.days == 0 then local time = os.time() db.query(string.format('UPDATE `accounts` SET `vipdays` = `vipdays` + %i, `viplastday` = %i WHERE `id` = %i;', amount, time, self:getAccountId())) data.lastDay = time else db.query(string.format('UPDATE `accounts` SET `vipdays` = `vipdays` + %i WHERE `id` = %i;', amount, self:getAccountId())) end data.days = data.days + amount end return true end function Player.removeVipDays(self, amount) local data = VipData[self:getId()] if data.days == 0xFFFF then return false end local amount = math.min(data.days, amount) if amount > 0 then db.query(string.format('UPDATE `accounts` SET `vipdays` = `vipdays` - %i WHERE `id` = %i;', amount, self:getAccountId())) data.days = data.days - amount end return true end function Player.removeVip(self) local data = VipData[self:getId()] data.days = 0 data.lastDay = 0 db.query(string.format('UPDATE `accounts` SET `vipdays` = 0, `viplastday` = 0 WHERE `id` = %i;', self:getAccountId())) end function Player.loadVipData(self) local resultId = db.storeQuery(string.format('SELECT `vipdays`, `viplastday` FROM `accounts` WHERE `id` = %i;', self:getAccountId())) if resultId then VipData[self:getId()] = { days = result.getDataInt(resultId, 'vipdays'), lastDay = result.getDataInt(resultId, 'viplastday') } result.free(resultId) return true end VipData[self:getId()] = { days = 0, lastDay = 0 } return false end function Player.updateVipTime(self) local save = false local data = VipData[self:getId()] local days, lastDay = data.days, data.lastDay if days == 0 or days == 0xFFFF then if lastDay ~= 0 then lastDay = 0 save = true end elseif lastDay == 0 then lastDay = os.time() save = true else local time = os.time() local elapsedDays = math.floor((time - lastDay) / 86400) if elapsedDays > 0 then if elapsedDays >= days then days = 0 lastDay = 0 else days = days - elapsedDays lastDay = time - ((time - lastDay) % 86400) end save = true end end if save then db.query(string.format('UPDATE `accounts` SET `vipdays` = %i, `viplastday` = %i WHERE `id` = %i;', days, lastDay, self:getAccountId())) data.days = days data.lastDay = lastDay end end -- Talkactions (/vip command ) --
- Modos de usar :
- /vip adddays, PlayerName, 5
--> Adiciona 5 dias de vip ao PlayerName.
- /vip removedays, PlayerName, 5
--> Remove 5 dias de vip do PlayerName.
- /vip remove, PlayerName
--> Remove todos dias de vip do PlayerName.
- /vip check, PlayerName
--> Checa quando dias de vip tem o PlayerName .
- /vip addinfinite, PlayerName
--> Add infinite vip time ao PlayerName.
talkactions.xml
- procure em data/talkactions/
- adicione o seguinte código :
<talkaction words="/vip" separator=" " script="vipcommand.lua" /> vipcommand.lua
- crie o arquivo em data/talkactions/scripts
- cole este código dentro :
function onSay(cid, words, param)local player = Player(cid) if not player:getGroup():getAccess() then return true end local params = param:split(',') if not params[2] then player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('Player is required.\nUsage:\n%s <action>, <name>, [, <value>]\n\nAvailable actions:\ncheck, adddays, addinfinite, removedays, remove', words)) return false end local targetName = params[2]:trim() local target = Player(targetName) if not target then player:sendCancelMessage(string.format('Player (%s) is not online. Usage: %s <action>, <player> [, <value>]', targetName, words)) return false end local action = params[1]:trim():lower() if action == 'adddays' then local amount = tonumber(params[3]) if not amount then player:sendCancelMessage('<value> has to be a numeric value.') return false end target:addVipDays(amount) player:sendCancelMessage(string.format('%s received %s vip day(s) and now has %s vip day(s).', target:getName(), amount, target:getVipDays())) elseif action == 'removedays' then local amount = tonumber(params[3]) if not amount then player:sendCancelMessage('<value> has to be a numeric value.') return false end target:removeVipDays(amount) player:sendCancelMessage(string.format('%s lost %s vip day(s) and now has %s vip day(s).', target:getName(), amount, target:getVipDays())) elseif action == 'addinfinite' then target:addInfiniteVip() player:sendCancelMessage(string.format('%s now has infinite vip time.', target:getName())) elseif action == 'remove' then target:removeVip() player:sendCancelMessage(string.format('You removed all vip days from %s.', target:getName())) elseif action == 'check' then local days = target:getVipDays() player:sendCancelMessage(string.format('%s has %s vip day(s).', target:getName(), (days == 0xFFFF and 'infinite' or days))) else player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('Action is required.\nUsage:\n%s <action>, <name>, [, <value>]\n\nAvailable actions:\ncheck, adddays, addinfinite, removedays, remove', words)) end return false end Créditos...
Printer
Summ
Eu
-
Smart Maxx recebeu reputação de Pinduca da RBC em (Resolvido)Base WebsiteAlguém saberia me dizer qual é base mais perto pra deixar o site dessa forma >http://ntosync.no-ip.biz/register&action=createaccount<
-
Smart Maxx deu reputação a Bruno Carvalho em Entrevista com Rato (dono do otPokemon e OTBR)Fala galera do Tibia King, hoje vou postar uma entrevista no TibiaKing, ela é com o Rato, dono do otPokémon e da OTBR, famoso no ramo do otserv!
Entrevistador: Comedinhass
Entrevistado: Rato
Perguntas particulares:
Está nervoso para a entrevista?
Não, hehehe
Vamos começar, primeiro nos diga seu nome completo.. ._.
Felipe Augusto
Sua idade..
22 Anos
Onde você mora?
Sou de Visconde do Rio Branco, Minas Gerais
Você faz o que da vida?
Estudante, Sistemas de Informação; e Administrador do otPokemon.com e OTBR(Tibia-OT.com)
Perguntas publicas:
Bom, no mundo otserv você é conhecido como um grande administrador de otservs. Você gosta desse título?
Bom, isso é legal, nem sabia desse "reconhecimento", mas já tenho anos que administro servidores, já sou velho aqui heheheheh...
kk, para mim você é ._.
Obrigado
Quais são seus projetos atuais?
otPokemon.com e OTBR(Tibia-OT.com)
Algum plano para eles?
Reestruturar o OTBR que antes tinha 3 servidores e hoje tem apenas 1, e continuar crescendo e lançando coisas novas com o otPokémon que tem muita coisa boa por vir
Ok, vamos falar um pouco sobre o OTBR
Foi o seu primeiro grande servidor?
Sim, foi ele e bem antigo
Como nasceu o OTBR?
E uma historia um pouco longa, mas vou tentar da uma resumida, o OTBR.com.br nasceu a alguns anos nem sei quantos direito, quando eu ainda mexia no mIRC tinha um grupo que mexia com OTSERV, eu já tinha experiência em servidores dedicado e comecei a montar junto com essa equipe, que tinha o programador Sabotage e um amigo era o Morientes (eu nem sei por onde anda eles hoje em dia hehehe), era um servidor apenas 4fun e era bem hosteado na epoca não tinha muito essa de cobrar por vips e itens, era so por diversão, a nossa equipe em pouco mais de 5 dias conseguiu colocar ele em primeiro lugar no otservlist isso deu um boom muito grande, infelizmente foi alvo de ataques DDoS e tive que parar com ele, mais tarde alguns anos depois quando eu cursava o Terceiro Ano eu já tinha mais experiência em Linux e Dedicados e resolvi reabrir o OTBR com um amigo no seu Auge chegamos a ter 3 servidores os 3 era lotado e frequentemente era numero 1 na otservlist, infelizmente por algumas desavenças e tempo a gente uniu os servidores apenas no Tibia-OT.com e o OTBR passou a se chamar Tibia-OT.
Qual o atual objetivo do servidor?
Voltar a ser como antes
Alguma grande novidade para ele?
Em breve vamos lançar versões mais nova 9.x, com a estabilidade de sempre
Vamos falar agora sobre o OTPokémon
otPokémon é minha menina dos olhos azuis
Como nasceu o OTPókemon?
O otPokémon nasceu de um sonho meu em ter um servidor alternativo, eu fui apresentado a uma equipe que se chamava Pokemon Phoenix por você (Comedinha), dessa equipe eu conheci o Fernando e o Jake na qual apresentei meu projeto, o Pokemon Phoenix tinha pouco players, e eu não gostava do nome então eu mudei para otPokémon e reestruturei o servidor junto com o Fernando, e deu certo HEHEHEHEHE
Alguma grande novidade para ele?
Muitas, mas vai demorar um pouco pra sair, por ser bem complexo, os players do otPokémon ficam inquietos por novidades, mas dividindo:
Mapa: Vai ter um grande update novas cidades do continente de johto novas áreas.
Pokemons: Inclusão da Quarta Geração.
Cliente: Cliente todo reformulado, com barras personalizadas e o cliente é exclusivo. O cliente quem está trabalhando com a gente é o Mock, ele é um grande programador, coisas boa estão por vir...
Achei o novo cliente lindo, e ele ainda é feito baseado no otclient ._. (http://twitpic.com/b5tf2a)
Qual o objetivo atual do OTPokémon?
O objetivo e crescer cada vez mais, somos "novos" apenas 2 anos e já conquistamos muitas coisas, queremos crescer cada vez mais.
E com certeza irão crescer muito mais ainda =D
Você disse que o OTPokémon é a "menina dos olhos azuis", porque esse titulo?
Porque e onde eu mais gosto de "estar", eu gosto muito dele.. E gosto muito do publico do otPokémon, são pessoas legais de toda a equipe ingame e programadores.
Alguém em especial?
Cara, em especial mesmo o Marcos(Beaver) ele e uma grande pessoa, ele também ama o otPokémon HEHEHEHE (Meio Gay isso né? mas ta valendo)
kkk
Algo mais para falar sobre o servidor?
Hahaha, queria dizer que também cresceu muito por conta da paciência da minha ex-namorada era muitaaas noites virada, muitos bug, muitos ataques DDoS e quem sempre me apoiou foi ela... Acho que 70% do que consegui fazer no otPokémon eu devo a ela!
Pergunta sobre OTServ:
Vamos falar um pouco sobre OTServ agora, qual o servidor que você mais admira? (Os seus não conta ._.)
O antigo Empire.
Qual o cara que você considera o "cabeça" dos otservs?
Bom, eu sempre vi muitas coisas do Mock. Mas o cabeça pra mim era o Sabotagem lá na época do mIRC ele que compilava os otserv hehehehe nem era TFS, eu achava ele bom...
Qual o sistema mais bem bolado que você ja viu em algum otserv?
O LimitPoke que o otPokémon fez do 0, ele trabalha muito bem com a source e tals, acho que ele.
Qual o mapa que mais te marcou?
YuriOTS, incrível como ele era simples e eficaz.
Qual foi o seu melhor momento em um servidor?
No otPokémon cada dia que passa e no OTBR quando a gente tinha os 3 servidores em meados de 2011
Você tem um mapa global, o que acha dessa nova moda que está de mapas globais?
Bom, mapa global e legal porque o cara que parou de jogar no servidor global não sente tanto quando passa a jogar um otserv, e eu conheci várias áreas através dos mapas globais em otserv (obs: nunca fui bom em Tibia).
Voltando aquela velha pergunta, Windowns x Linux. Qual você prefere?
MacOSX hehehehe, mas pra servidores, LINUX sem duvida, é onde meus servidores estão hospedados. Windows e horrível para servidores!
Perguntas sobre Tibia Global:
Vamos falar um pouco de Tibia Global agora, qual o seu character preferido no Tibia Global?
Cachero e o Ethernal Oblivion também mais tarde.
O que você acha das ultimas atualizações do Tibia Global?
Tá ficando legal, achei interessante, mas só vi por imagens não joguei, não jogo Tibia Global a anos, acho que desde 8.1 hehehehe...
Qual foi seu level máximo?
Sozinho acho que foi 70~80.
Qual sua cidade preferida?
Thais, onde comecei.
Qual sua hunt preferida?
DL, curtia matar DL..
Qual foi o momento que mais te deixou feliz no Tibia Global?
Minha primeira BOH.
Qual foi o momento que te deixou mais triste/bravo?
Quando morri e perdi minha GS.
Alguma história?
Quando eu comecei a jogar não sabia como ganhar dinheiro, jogava eu e um vizinho "Tuin", eu aprendi a runnar e fiz uma BP de GFB e vendi, ganhei 1.5k na época, quando mostrei pra ele, ele ficou louco correu la em casa pra ensinar ele como ficava "rico" hehehehe
Época de internet discada, ele até deixou o PC ligado.
Perguntas sobre o TibiaKing:
Vamos falar um pouco sobre o TibiaKing.
Eu acho que fui um dos primeiro a patrocinar o TibiaKing
quando ele ainda era bem feinho, hoje o fórum e bonito e estruturado hehehe
Como você conheceu o TibiaKing?
Assim como nos outros sites, de BOT de Tibia, eu que tive essa idéia de patrocinar os sites, e comprar keys para eles.
Conheci procurando fãsites para patrocinar. Infelizmente não somos mais parceiros, por discordância de valores.
O que você acha do atual fórum?
Ficou muito bom o fórum do TibiaKing, adoro o Designer. o TibiaKing conseguiu crescer muito, parabéns para o Matheus.
Bom, separei algumas perguntas que os membros da equipe fizeram aqui.
O Vittu perguntou: Quantos você arrecada mensalmente no otpokemon?
Sem essa pergunta hehehe próxima...
O Vittu perguntou: Diga algo que você fez no otPokemon que você se arrependeu.
Ter usado ModernACC enquanto o site próprio ficava pronto, não ter esperado.
O Vittu perguntou: Você joga de vez em quanto o otPokemon, ou nem entra com o god?
Jogo, tenho meu personagem, é uma boa maneira de achar alguns bugs!
O Vittu perguntou: Você encara o pokexgames como um rival? O que você acha deles?
Não, tem público pra todo mundo, eles são mais antigos.
O WarW0lf perguntou: Rato, you like a cheese?
Yes, very very.
O WarW0lf perguntou: Você é a favor do Open Source?
Sim, vivemos disso.
O WarW0lf perguntou: Por que o otPokemon não está nas listas de OTServList?
Segundo o Luksz não e permitido servidores de Pokémon.
Perguntas rápidas:
Um sonho?
Ser um grande empresário.
Um pesadelo?
Não ser, um grande empresário.
Uma pessoa?
Pai
Um pensamento?
Nunca se preocupe demais.
Um momento?
Quando eu era mais novo e fiquei com a garota que gostava, hehehehehe
Uma realidade?
Tudo muda.
Uma surpresa?
Surpresa? Ter o Mock trabalhando conosco hehehe, ele era bem chato! =x
Finais:
Ok, vamos as perguntas finais, gostou da entrevista?
Sim,
Quer mandar um salve para alguém especial?
Um salve pra galera do TibiaKing pelo bom trabalho.
Bom galera, essa foi a entrevista com o Felipe (Rato), administrador do OTPokémon e do OTBR.
Valeu pessoal e até a próxima!!
Bom galera, essa foi a minha primeira entrevista e eu gostaria de saber o que vocês acharam.
Envie também sugestões para as perguntas das próximas entrevistas...
-
Smart Maxx deu reputação a Natanael Beckman em DISTRO - TFS 0.3.7-r5969 - ANTI CLONE - CAST SYSTEM !
-
Smart Maxx recebeu reputação de s2dieginho em oque falta?Seu server é versão 10.55 tem que usar TFS 1.0 ou até a nova TFS 1.1...
Aqui está o link para baixar a TFS 1.0 Compilada pra 64 bits, 32, bits e as sources caso queira compilar no Linux tb ;
-
Smart Maxx deu reputação a f.silva em (Resolvido)[PEDIDO] Exemplo de NPC barqueiroalgum erro no console tem certeza que adicionou uma pos correta ?
-
Smart Maxx deu reputação a f.silva em (Resolvido)[PEDIDO] Exemplo de NPC barqueirodata/npcs/scripts/captain.lua :
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 npcHandler:addModule(FocusModule:new()) data/npcs/Captain Edward.xml :
<?xml version="1.0" encoding="UTF-8"?><npc name="Captain Edward" script="data/npc/scripts/captain.lua" walkinterval="0" floorchange="0"> <health now="144" max="150"/> <look type="128" head="95" body="100" legs="35" feet="100" addons="3" corpse="2212"/> <parameters> <parameter key="module_travel" value="1"/> <parameter key="message_greet" value="Hello |PLAYERNAME|. If you don't know where to flow, say travel."/> <parameter key="travel_destinations" value="goroma volcano,1812,391,6,350;night island,464,791,7,350"/> </parameters> </npc> Explicações :
<parameter key="travel_destinations" value="goroma volcano,1812,391,6,350;night island,464,791,7,350"/> value= "nome do local, posição x, posição y, posição z, preço do teleport"
; -- Usado pra adicionar mais locais, basta adicionar no fim do preço do teleport;
Fiz baseado em tibia TFS 0.4 ... acho que até meu cachorro entenderia;
Editei um negócio numa desatenção minha.
-
Smart Maxx deu reputação a f.silva em Todo menu que crio ja aparece aberto AJUDAATestei aqui e tava normal;
-
Smart Maxx recebeu reputação de f.silva em Efeito Snow no GesiorUsa esse :
em baixo do primeiro <head>
<script src="http://static.tumblr.com/8l2gpxb/lcllulgcn/snowstorm.js"></script> -
Smart Maxx recebeu reputação de f.silva em Efeito Snow no GesiorUm colega meu pediu esse efeito de nevar > desse site aqui < ... então resolvi compartilhar com vcs tb, para colacarem em seus gesior nessa época natalina.
vá no seu layout.php :
em cima da primeira tag <head> cole esse código ...
<script type="text/javascript"> //Configure below to change URL path to the snow image var snowsrc= "http://2.ii.gl/byGz__HJK.gif" // Configure below to change number of snow to render var no = 250; // Configure whether snow should disappear after x seconds (0=never): var hidesnowtime = 0; // Configure how much snow should drop down before fading ("windowheight" or "pageheight") var snowdistance = "pageheight"; ///////////Stop Config////////////////////////////////// var ie4up = (document.all) ? 1 : 0; var ns6up = (document.getElementById&&!document.all) ? 1 : 0; function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 600; if (ns6up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = iecompattest().clientWidth; doc_height = iecompattest().clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc for (i = 0; i < no; ++ i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random()*(doc_width-50); // set position variables yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // set amplitude variables stx[i] = 0.02 + Math.random()/10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ie4up||ns6up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>"); } } } function snowIE_NS6() { // IE and NS6 main animation function doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10; doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight; for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); } dx[i] += stx[i]; document.getElementById("dot"+i).style.top=yp[i]+"px"; document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px"; } snowtimer=setTimeout("snowIE_NS6()", 10); } function hidesnow(){ if (window.snowtimer) clearTimeout(snowtimer) for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden" } if (ie4up||ns6up){ snowIE_NS6(); if (hidesnowtime>0) setTimeout("hidesnow()", hidesnowtime*1000) } </script> Abrçs
-
Smart Maxx recebeu reputação de Beeki em [Ajuda] CPU 100% em Uso - LinuxFalou o "Programmer" HEUEHUEHEUHEUHEUH que não coda 2 linha de .lua sozinho ahsuahs
-
Smart Maxx deu reputação a Percy em EvoBR - Um Evolutions mais que perfeito. (8.60)• EvoBR - Um Evolutions mais que perfeito. (8.60) •
Servidor feito pelo Baiak e Editado por mim
Fala galera estou aqui para apresentar EvoBR, Eu Trabalhei muito tempo neste servidor.Ele Custava cerca de 30 Euros na Loja da Vapus, Mas Foi Liberado de Graça e eu o melhorei bastante. Este servidor é um dos Evolutions mais Completos, Possui Sistemas inovadores e já vem o TFS 0.4.Então, tá esperando o que? Confira logo!
• Cidades:
├ Delyria
├ Lumina
├ Daret
└ Manhattan
• O Que Contêm no Servidor:
├ Sistemas Exclusivos
├Várias Quests
├ Fast Pass System para Tp's
├ Cidades Detalhadas
├ Sistema de Train, a Cada 45 minutos o player que está treinando terá que digitar um código, se errar será kickado.
├ Cassino
├ Mapa Compacto. Pesa Apenas 10mb
├ Novos NPC'S
└ TFS 0.4 DEV Rev: 3884 Já Compilado.
• Fotos do EvoRPG •
SS #1 - Templo
• Fotos do EvoRPG •
SS #2 - Novos Teleports
• Fotos do EvoRPG •
SS #3 - Quests
• Fotos do EvoRPG •
SS #4 - Goblin Hunt
• Opções de Download do OTserver •
MediaFire
4shared
• Scan via VirusTotal •
• Créditos:
5mok3r
Percy
Equipe Delyria Evolutions
TFS Team
-
Smart Maxx deu reputação a Beeny em harleyPSD
qnt tempo que eu não fazia nada no ps, hue
-
Smart Maxx recebeu reputação de NewCore em (Resolvido)Potions estão infinitas!TFS 1.0 :
potions.lua :
local ultimateHealthPot = 8473 local greatHealthPot = 7591 local greatManaPot = 7590 local greatSpiritPot = 8472 local strongHealthPot = 7588 local strongManaPot = 7589 local healthPot = 7618 local manaPot = 7620 local smallHealthPot = 8704 local antidotePot = 8474 local greatEmptyPot = 7635 local strongEmptyPot = 7634 local emptyPot = 7636 local antidote = Combat() antidote:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) antidote:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) antidote:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true) antidote:setParameter(COMBAT_PARAM_AGGRESSIVE, false) antidote:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON) local exhaust = Condition(CONDITION_EXHAUST_HEAL) exhaust:setParameter(CONDITION_PARAM_TICKS, (configManager.getNumber(configKeys.EX_ACTIONS_DELAY_INTERVAL) - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) if itemEx.itemid ~= 1 or itemEx.type ~= THING_TYPE_PLAYER then return true end local player = Player(cid) if player:getCondition(CONDITION_EXHAUST_HEAL) then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED)) return true end if item.itemid == antidotePot then if not doCombat(cid, antidote, numberToVariant(cid)) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(emptyPot, 1) elseif item.itemid == smallHealthPot then if not doTargetCombatHealth(0, cid, COMBAT_HEALING, 60, 90, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(emptyPot, 1) elseif item.itemid == healthPot then if not doTargetCombatHealth(0, cid, COMBAT_HEALING, 125, 175, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(emptyPot, 1) elseif item.itemid == manaPot then if not doTargetCombatMana(0, cid, 75, 125, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(emptyPot, 1) elseif item.itemid == strongHealthPot then if(not isInArray({3,4,7,8}, player:getVocation():getId()) or player:getLevel() < 50) and not(player:getGroup():getId() >= 2) then player:say("This potion can only be consumed by paladins and knights of level 50 or higher.", TALKTYPE_MONSTER_SAY) return true end if not doTargetCombatHealth(0, cid, COMBAT_HEALING, 250, 350, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(strongEmptyPot, 1) elseif item.itemid == strongManaPot then if(not isInArray({1,2,3,5,6,7}, player:getVocation():getId()) or player:getLevel() < 50) and not(player:getGroup():getId() >= 2) then player:say("This potion can only be consumed by sorcerers, druids and paladins of level 50 or higher.", TALKTYPE_MONSTER_SAY) return true end if not doTargetCombatMana(0, cid, 115, 185, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(strongEmptyPot, 1) elseif item.itemid == greatSpiritPot then if(not isInArray({3, 7}, player:getVocation():getId()) or (player:getLevel() < 80)) and not(player:getGroup():getId() >= 2) then player:say("This potion can only be consumed by paladins of level 80 or higher.", TALKTYPE_MONSTER_SAY) return true end if not doTargetCombatHealth(0, cid, COMBAT_HEALING, 250, 350, CONST_ME_MAGIC_BLUE) or not doTargetCombatMana(0, cid, 100, 200, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(greatEmptyPot, 1) elseif item.itemid == greatHealthPot then if(not isInArray({4, 8}, player:getVocation():getId()) or player:getLevel() < 80) and not(player:getGroup():getId() >= 2) then player:say("This potion can only be consumed by knights of level 80 or higher.", TALKTYPE_MONSTER_SAY) return true end if not doTargetCombatHealth(0, cid, COMBAT_HEALING, 425, 575, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(greatEmptyPot, 1) elseif item.itemid == greatManaPot then if(not isInArray({1,2,5,6}, player:getVocation():getId()) or player:getLevel() < 80) and not(player:getGroup():getId() >= 2) then player:say("This potion can only be consumed by sorcerers and druids of level 80 or higher.", TALKTYPE_MONSTER_SAY) return true end if not doTargetCombatMana(0, cid, 150, 250, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(greatEmptyPot, 1) elseif item.itemid == ultimateHealthPot then if(not isInArray({4, 8}, player:getVocation():getId()) or player:getLevel() < 130) and not(player:getGroup():getId() >= 2) then player:say("This potion can only be consumed by knights of level 130 or higher.", TALKTYPE_MONSTER_SAY) return true end if not doTargetCombatHealth(0, cid, COMBAT_HEALING, 650, 850, CONST_ME_MAGIC_BLUE) then return false end player:addCondition(exhaust) player:say("Aaaah...", TALKTYPE_MONSTER_SAY) Item(item.uid):remove(1) player:addItem(greatEmptyPot, 1) end return true end actions.xml :
<action itemid="7588" script="other/potions.lua"/> <action itemid="7589" script="other/potions.lua"/> <action itemid="7590" script="other/potions.lua"/> <action itemid="7591" script="other/potions.lua"/> <action itemid="7618" script="other/potions.lua"/> <action itemid="7620" script="other/potions.lua"/> <action itemid="8472" script="other/potions.lua"/> <action itemid="8473" script="other/potions.lua"/> <action itemid="8474" script="other/potions.lua"/> <action itemid="8704" script="other/potions.lua"/>
@Orochi e partir do 1.1 só tende a piorar rsrsrs
-
Smart Maxx deu reputação a Beeny em (Resolvido)Base Websitehttp://getbootstrap.com/