Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Fala galerinha do TK, tudo bem?
Recebi alguns pedidos para fazer um evento estilo Zombie, só que no modo de Pokemon (PÍÍÍKAAAAAAAAAAAAAAAAAAACHUUUUUU)

rs.

 

 

 

Enfim, vamos a instalação, depois ensinarei a configurar.

 

 

Em data/mods crie um arquivo com o nome de pikachuevent.xml com o conteúdo:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="PikachuEvent" version="1.0" author="Absolute" contact="tibiaking.com" enabled="yes">

	<config name="config_pikachu_event">
		<![CDATA[
			configPikachuEvent = {
				storages = {
					main = 'PikachuEventMain', -- set free storage
					player = 'PikachuEventPlayer', -- set free storage
					joining = 'PikachuEventJoining', -- set free storage
					kills = 'PikachuEventKills', -- set free storage
					exhaust = 'PikachuEventExhaust', -- set free storage
					countEvent = 'PikachuEventCountEvent' -- set free storage
				},
				
				position = {x=890,y=193,z=7}, -- position to which player is teleporting
				room = {
					from = {x=678,y=980,z=7}, -- left top corner of event room
					to = {x=678,y=1089,z=7} -- right bottom corner of event room
				},				
				
				rewards = {7958, 11366}, -- reward id which player can win (reward is random)				
				players = {
					max = 50, -- max players in event
					min = 2, -- min players to event start
					minLevel = 50, -- min level to join to event
					pvpEnabled = false -- can players hit theirselfs
				},
				
				days = {
					['Tuesday'] = {'22:00:00'}, 
					['Thursday'] = {'22:00:00'}, 
					['Friday'] = {'22:00:00'}, 
					['Sunday'] = {'22:00:00'}
				},
				
				spawnDelay = 2000, -- miliseconds
				amountCreatingMonsters = 5,
				monsters = {'Pikachu', 'Ash'}, -- name of monsters which is creating in event

				delayTime = 5.0, -- time in which players who joined to event are teleporting to teleport position [miuntes]
				startEvent = 1, -- time from teleport to start event [seconds]
				stopEvent = 19200, -- [seconds]
				text = '-PL-\nAby wygrac i otrzymac nagrode, zabij jak najwieksza liczbe pikachu przez 20min lub pozostan sam na arenie.\n\n-ENG-\nTo win and get a reward, kill as many pikachus for 20 minutes or stay the same in the arena.'
			}
		]]>
	</config>
	
	<lib name="lib_pikachu_event">
		<![CDATA[
			function doStopPikachuEvent()
				if getStorage(configPikachuEvent.storages.main) > 0 then
					local playerTable, creatureTable = {}, {}

					for x = configPikachuEvent.room.from.x, configPikachuEvent.room.to.x do
						for y = configPikachuEvent.room.from.y, configPikachuEvent.room.to.y do
							local n, i = getTileInfo({x=x, y=y, z=configPikachuEvent.room.from.z}).creatures, 1
							if n ~= 0 then
								local v = getThingfromPos({x=x, y=y, z=configPikachuEvent.room.from.z, stackpos=i}).uid
								while v ~= 0 do
									if isPlayer(v) then
										table.insert(playerTable, v)
										if n == #playerTable then
											break
										end
									elseif isMonster(v) then
										table.insert(creatureTable, v)
										if n == #creatureTable then
											break
										end
									end
									i = i + 1
									v = getThingfromPos({x=x, y=y, z=configPikachuEvent.room.from.z, stackpos=i}).uid
								end
							end
						end
					end

					if #playerTable > 1 then
						table.sort(playerTable, function(a, b) return (getCreatureStorage(a, configPikachuEvent.storages.kills)) > (getCreatureStorage(b, configPikachuEvent.storages.kills)) end)
						
						local prize = math.random(#configPikachuEvent.rewards)
						
						doTeleportThing(playerTable[1], getTownTemplePosition(getPlayerTown(playerTable[1])))
						doCreatureSetStorage(playerTable[1], configPikachuEvent.storages.kills, 0)
						doPlayerAddItem(playerTable[1], configPikachuEvent.rewards[prize], 1)
						doCreatureAddHealth(playerTable[1], getCreatureMaxHealth(playerTable[1]) - getCreatureHealth(playerTable[1]))
						doCreatureAddMana(playerTable[1], getCreatureMaxMana(playerTable[1]) - getCreatureMana(playerTable[1]))
						doPlayerSendTextMessage(playerTable[1], MESSAGE_EVENT_ADVANCE, 'You win! You have received '..getItemNameById(configPikachuEvent.rewards[prize])..' as reward.')
						doBroadcastMessage('Pikachu Plague Attack has finished. The winner is '..getCreatureName(playerTable[1])..'. Congratulations!')
						doSetStorage(configPikachuEvent.storages.main, -1)
						
						db.query("INSERT INTO `events` (`event_name`, `winner_name`, `won_item`, `time_win`) VALUES (\"Pikachu\", \"" .. getCreatureName(playerTable[1]) .. "\", \"" .. getItemNameById(configPikachuEvent.rewards[prize]) .. "\", " .. getStorage(configPikachuEvent.storages.countEvent) ..");")

						for i = 2, #playerTable do
							doCreatureAddHealth(playerTable[i], getCreatureMaxHealth(playerTable[i]) - getCreatureHealth(playerTable[i]))
							doCreatureAddMana(playerTable[i], getCreatureMaxMana(playerTable[i]) - getCreatureMana(playerTable[i]))
							doTeleportThing(playerTable[i], getTownTemplePosition(getPlayerTown(playerTable[i])))
							doPlayerSendTextMessage(playerTable[i], MESSAGE_EVENT_ADVANCE, 'You loss.')
							doSendMagicEffect(getThingPos(playerTable[i]), CONST_ME_STUN)
							doCreatureSetStorage(playerTable[i], configPikachuEvent.storages.kills, 0)
						end

						for i = 1, #creatureTable do
							if isMonster(creatureTable[i]) then
								doRemoveCreature(creatureTable[i])
							end
						end
						
						doSetStorage(configPikachuEvent.storages.countEvent, getStorage(configPikachuEvent.storages.countEvent) + 1)
					elseif #playerTable == 0 then
						for i = 1, #creatureTable do
							if isMonster(creatureTable[i]) then
								doRemoveCreature(creatureTable[i])
							end
						end
					
						doBroadcastMessage('No one win in Pikachu Plague Attack.')
						doSetStorage(configPikachuEvent.storages.main, -1)
						doSetStorage(configPikachuEvent.storages.countEvent, getStorage(configPikachuEvent.storages.countEvent) + 1)
					end
				end
			end

			function doStartPikachuEvent()
				doSetStorage(configPikachuEvent.storages.joining, -1)

				if configPikachuEvent.players.min <= doCountPlayersPikachuEvent() then
					for _, cid in ipairs(getPlayersOnline()) do
						if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
							doCreatureSetStorage(cid, configPikachuEvent.storages.player, -1)
							doTeleportThing(cid, configPikachuEvent.position)
							doCreatureSetNoMove(cid, false)
							doRemoveCondition(cid, CONDITION_INFIGHT)
							
							doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Get ready. Pikachus Plague Attack starts in '..configPikachuEvent.startEvent..' seconds.')
						end
					end
					
					addEvent(doSetStorage, configPikachuEvent.startEvent * 1000, configPikachuEvent.storages.main, 1)
					addEvent(doStopPikachuEvent, configPikachuEvent.stopEvent * 1000)
					addEvent(doRepeatCheckPikachuEvent, configPikachuEvent.startEvent * 1000 + 2000)
					
					doBroadcastMessage('Pikachu Plague Attack has started. LET\'S GO!')
				else
					for _, cid in ipairs(getPlayersOnline()) do
						if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
							doCreatureSetNoMove(cid, false)
							doRemoveCondition(cid, CONDITION_INFIGHT)
						end
					end
					
					doBroadcastMessage('Pikachu Plague Attack hasn\'t started beacuse there were not enough players.')
				end
			end
			
			function doRepeatCheckPikachuEvent()
				if getStorage(configPikachuEvent.storages.main) > 0 then
					local playerTable, creatureTable, xTable, yTable = {}, {}, {}, {}

					for x = configPikachuEvent.room.from.x, configPikachuEvent.room.to.x do
						for y = configPikachuEvent.room.from.y, configPikachuEvent.room.to.y do
							local n, i = getTileInfo({x=x, y=y, z=configPikachuEvent.room.to.z}).creatures, 1
							if n ~= 0 then
								local v = getThingfromPos({x=x, y=y, z=configPikachuEvent.room.to.z, stackpos=i}).uid
								while v ~= 0 do
									if isPlayer(v) then
										table.insert(playerTable, v)
										if n == #playerTable then
											break
										end
									elseif isMonster(v) then
										table.insert(creatureTable, v)
										if n == #creatureTable then
											break
										end
									end
									i = i + 1
									v = getThingfromPos({x=x, y=y, z=configPikachuEvent.room.to.z, stackpos=i}).uid
								end
							end
							
							table.insert(xTable, x)
							table.insert(yTable, y)
						end
					end

					if #playerTable == 1 then
						local prize = math.random(#configPikachuEvent.rewards)
						
						addEvent(doTeleportThing, 200, playerTable[1], getTownTemplePosition(getPlayerTown(playerTable[1])), true)
						doPlayerAddItem(playerTable[1], configPikachuEvent.rewards[prize], 1)
						doCreatureSetStorage(playerTable[1], configPikachuEvent.storages.kills, 0)
						doCreatureAddHealth(playerTable[1], getCreatureMaxHealth(playerTable[1]) - getCreatureHealth(playerTable[1]))
						doCreatureAddMana(playerTable[1], getCreatureMaxMana(playerTable[1]) - getCreatureMana(playerTable[1]))
						doPlayerSendTextMessage(playerTable[1], MESSAGE_EVENT_ADVANCE, 'You win! You have received '..getItemNameById(configPikachuEvent.rewards[prize])..' as reward.')
						doBroadcastMessage('Pikachu Plague Attack has finished. The winner is '..getCreatureName(playerTable[1])..'. Congratulations.')
						db.query("INSERT INTO `events` (`event_name`, `winner_name`, `won_item`, `time_win`) VALUES (\"Pikachu\", \"" .. getCreatureName(playerTable[1]) .. "\", \""..getItemNameById(configPikachuEvent.rewards[prize]).."\", "..getStorage(configPikachuEvent.storages.countEvent)..");")
						
						for i = 1, #creatureTable do
							if isMonster(creatureTable[i]) then
								doRemoveCreature(creatureTable[i])
							end
						end
						
						doSetStorage(configPikachuEvent.storages.main, -1)
						doSetStorage(configPikachuEvent.storages.countEvent, getStorage(configPikachuEvent.storages.countEvent) + 1)
						return
					elseif #playerTable == 0 then
						for i = 1, #creatureTable do
							if isMonster(creatureTable[i]) then
								doRemoveCreature(creatureTable[i])
							end
						end
					
						doBroadcastMessage('No one win in Pikachu Plague Attack.')
						doSetStorage(configPikachuEvent.storages.main, -1)
						
						doSetStorage(configPikachuEvent.storages.countEvent, getStorage(configPikachuEvent.storages.countEvent) + 1)
						return
					end
				
					local pos = {x=xTable[math.random(#xTable)], y=yTable[math.random(#yTable)], z=7}				
					for i = 1, configPikachuEvent.amountCreatingMonsters do
						doCreateMonster(configPikachuEvent.monsters[math.random(#configPikachuEvent.monsters)], pos, false, false, false)
						doSendMagicEffect(pos, CONST_ME_BATS)
					end
					
					addEvent(doRepeatCheckPikachuEvent, configPikachuEvent.spawnDelay)
				end
			end
			
			function doCountPlayersPikachuEvent()
				local x = 0
				for _, cid in ipairs(getPlayersOnline()) do
					if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
						x = x + 1
					end
				end
				return x
			end
			
			function doStartCountingPikachuEvent(x)
				if configPikachuEvent.delayTime-x > 0 then
					doBroadcastMessage('Pikachu Plague Attack is going to start in '..configPikachuEvent.delayTime-x..' minutes. You can join to the event by saying "!pikachu join".')
					addEvent(doStartCountingPikachuEvent, 60*1000, x+1)
				end
			end
		]]>
	</lib>

	<talkaction words="!pikachu" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onSay(cid, words, param)
				if getStorage(configPikachuEvent.storages.joining) ~= 1 then
					return doPlayerSendCancel(cid, 'Pikachu Plague Attack hasn\'t started yet.')
				elseif param == '' then
					return doPlayerSendCancel(cid, 'Command param required (say: "!pikachu join" or "!pikachu leave.").')
				elseif getPlayerLevel(cid) < configPikachuEvent.players.minLevel then
					return doPlayerSendCancel(cid, 'You can\'t join to the event if you don\'t have a require '..configPikachuEvent.players.minLevel..' level.')
				elseif getTileInfo(getThingPos(cid)).protection ~= true then
					return doPlayerSendCancel(cid, 'You can\'t join to the event if you aren\'t in protection zone.')
				elseif exhaustion.check(cid, configPikachuEvent.storages.exhaust) ~= false then
					return doPlayerSendCancel(cid, 'You must wait '..exhaustion.get(cid, configPikachuEvent.storages.exhaust)..' seconds to use this command again.')
				end

				if param == 'join' then
					if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
						return doPlayerSendCancel(cid, 'You have arleady joined to event. Wait patiently for start.')
					elseif doCountPlayersPikachuEvent() == configPikachuEvent.players.max then
						return doPlayerSendCancel(cid, 'Max players in the event have been reached.')
					end
					
					doCreatureSetNoMove(cid, true)
					doPlayerPopupFYI(cid, configPikachuEvent.text)
					doCreatureSetStorage(cid, configPikachuEvent.storages.player, 1)
					doAddCondition(cid, createConditionObject(CONDITION_INFIGHT, -1))
					doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have joined to Pikachu Plague Attack. You can\'t move until event don\'t start. Wait patiently for the event start.')
					doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have joined to Pikachu Plague Attack.')
				elseif param == 'leave' then
					if getCreatureStorage(cid, configPikachuEvent.storages.player) <= 0 then
						return doPlayerSendCancel(cid, 'You can\'t leave from the event if you don\'t join.')
					end
					
					doCreatureSetNoMove(cid, false)
					doCreatureSetStorage(cid, configPikachuEvent.storages.player, -1)
					doRemoveCondition(cid, CONDITION_INFIGHT)
					doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have left from the Pikachu Plague Attack.')
				end
				
				exhaustion.set(cid, configPikachuEvent.storages.exhaust, 5)				
				return true
			end
		]]>
	</talkaction>
	
	<talkaction words="!startpikachu" access="5" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")
			domodlib("lib_pikachu_event")

			function onSay(cid, words, param)
				if getStorage(configPikachuEvent.storages.main) > 0 then
					return doPlayerSendCancel(cid, 'Pikachu Plague Attack is already running.')
				end
			
				doStartCountingPikachuEvent(0)

				for _, pid in ipairs(getPlayersOnline()) do
					if getCreatureStorage(pid, configPikachuEvent.storages.player) > 0 then
						doCreatureSetStorage(pid, configPikachuEvent.storages.player, -1)
						doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
						doCreatureSetStorage(pid, configPikachuEvent.storages.kills, 0)
					end
				end

				doSetStorage(configPikachuEvent.storages.joining, 1)
				addEvent(doStartPikachuEvent, configPikachuEvent.delayTime * 60 * 1000)
				return true
			end
		]]>
	</talkaction>
	
	<talkaction words="!stoppikachu" access="5" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")
			domodlib("lib_pikachu_event")

			function onSay(cid, words, param)
				if getStorage(configPikachuEvent.storages.main) > 0 then
					doStopPikachuEvent()
				else
					doPlayerSendCancel(cid, 'You can not do it if Pikachu Plague Attack is not enabled.')
				end
				return true
			end
		]]>
	</talkaction>

	<globalevent name="Pikachu_Event_Days" interval="1000" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")
			domodlib("lib_pikachu_event")
			
			local daysOpen = {}			
			for k, v in pairs(configPikachuEvent.days) do
				table.insert(daysOpen, k)
			end
			
			function onThink(interval)
				if isInArray(daysOpen, os.date('%A')) then
					if isInArray(configPikachuEvent.days[os.date('%A')], os.date('%X', os.time())) then
						if getStorage(configPikachuEvent.storages.joining) ~= 1 then
							doStartCountingPikachuEvent(0)

							for _, pid in ipairs(getPlayersOnline()) do
								if getCreatureStorage(pid, configPikachuEvent.storages.player) > 0 then
									doCreatureSetStorage(pid, configPikachuEvent.storages.player, -1)
									doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
									doCreatureSetStorage(pid, configPikachuEvent.storages.kills, 0)
								end
							end

							doSetStorage(configPikachuEvent.storages.joining, 1)
							addEvent(doStartPikachuEvent, configPikachuEvent.delayTime * 60 * 1000)
						end
					end
				end
				return true
			end
		]]>
	</globalevent>
	
	<event type="statschange" name="Pikachu_Event_Dead" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onStatsChange(cid, attacker, type, combat, value)
				if type == 1 and getCreatureHealth(cid) <= value then
					if isInRange(getThingPos(cid), configPikachuEvent.room.from, configPikachuEvent.room.to) then
						if isPlayer(cid) then
							doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
							doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
							doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
							doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You loss due to attack.')
							
							doSendAnimatedText(getThingPos(cid), value, TEXTCOLOR_RED)
							doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
							doCreatureSetStorage(cid, configPikachuEvent.storages.kills, 0)
							return false
						end
					end
				elseif configPikachuEvent.players.pvpEnabled ~= true and isInArray({1,3}, type) and isPlayer(attacker) and isPlayer(cid) then
					if isInRange(getThingPos(cid), configPikachuEvent.room.from, configPikachuEvent.room.to) then
						return false
					end
				end
				return true
			end
		]]>
	</event>

	<event type="kill" name="Pikachu_Event_Kill" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onKill(cid, target, damage, flags)
				if isInRange(getThingPos(cid), configPikachuEvent.room.from, configPikachuEvent.room.to) then
					if isInArray(configPikachuEvent.monsters, getCreatureName(target)) then
						doCreatureSetStorage(cid, configPikachuEvent.storages.kills, math.max(0, getCreatureStorage(cid, configPikachuEvent.storages.kills) + 1))
					end
				end
				return true
			end
		]]>
	</event>

	<event type="login" name="Pikachu_Event_Login" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onLogin(cid)
				if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
					doCreatureSetStorage(cid, configPikachuEvent.storages.player, -1)
					doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
					doCreatureSetNoMove(cid, false)
					doRemoveCondition(cid, CONDITION_INFIGHT)
					doCreatureSetStorage(cid, configPikachuEvent.storages.player.kills, 0)
				end

				registerCreatureEvent(cid, 'Pikachu_Event_Dead')
				registerCreatureEvent(cid, 'Pikachu_Event_Kill')
				return true
			end
		]]>
	</event>
	
	<globalevent name="Pikachu_Event_Start" type="startup" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onStartup()
				doSetStorage(configPikachuEvent.storages.main, -1)
				doSetStorage(configPikachuEvent.storages.joining, -1)
				return true
			end
		]]>
	</globalevent>
</mod>

Salve e feche.

 

sombra7.png

Em data/monsters/monster.xml adicione a linha:

<monster name="Pikachu" file="pikachu"/>

Em data/monters/scripts crie um arquivo com o nome de pikachu.xml com o conteúdo:

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Pikachu" nameDescription="Pikachu" race="undead" experience="10500" speed="800" manacost="0">
  <health now="200000" max="200000"/>
  <look type="88" head="20" body="30" legs="40" feet="50" corpse="6031"/>
	<targetchange interval="10000" chance="10"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="1"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="1"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>

  <attacks>    
     <attack name="melee" interval="1200" range="1" min="-2000" max="-5000"/>
  </attacks>


  <defenses armor="25" defense="30">
  </defenses>
  <voices interval="5000" chance="10">
    <voice sentence="PIKAAAA PIKAAAAAA CHU DE ABSOLUTE."/>
    <voice sentence="PIKACHU EU ESCOLHO VC."/>
  </voices>
  <loot>
		<item id="2160" countmax="1" chance="50000"/>
		
  </loot>
</monster>

Crie a sprite a seu gosto.

 

sombra7.png

 

Explicação básica:

position = {x=890,y=193,z=7}, -- Aqui a posição do centro da sua ARENA PIKACHU!
from = {x=678,y=980,z=7}, -- Posição do final do canto esquerdo da sua arena
to = {x=678,y=1089,z=7} -- Posição do final do canto direito da sua arena
rewards = {7958, 11366}, -- Aqui a recompensa que o último player que restar na arena vai ganhar, no caso é RANDOM (ALEATÓRIA), pode ser ou um ou outro, caso queira deixar apenas uma recompensa deixe: rewards = {7958}
players = {
max = 50, -- Máximo de players que poderão participar
min = 2, -- Mínimo de players pra começar o evento, claro 2 ou mais.
minLevel = 50, -- level mínimo pra entrar no evento
pvpEnabled = false -- PVP DESATIVADO DENTRO DA ARENA, para ativar deixe = true.
days = {
['Tuesday'] = {'22:00:00'} -- Dias e hora que ocorrerão o evento automático. (ENGLISH) - Aí no caso está para terça-feira ás 22h (Lembrando que tem de ser o horário da máquina).

Para dar inicio ao evento manualmente, basta digitar com o seu ADM: !startpikachu
Então os players irão digitar !pikachu para participar.
Observação: O Comando só pode ser executado sem battle e em área PZ (Pós usar o player ficará imóvel esperando o evento começar)
Quando começa Absolute? - Quando atingir o número máximo de players ou 5 minutos.
Observação: Crie um map do seu estilo, como quiser e comfigure com as posições.
 
sombra7.png
 
Caso tenha críticas construtivas, poste.
Lembrando que fiz este evento devido a pedidos que houve nas seções destinadas de scripting.

Qualquer dúvida não deixe de perguntar, ninguém nasceu sabendo :P
 
 
Créditos:
- Virrages (Event Base)
- Absolute (Modificação, funções, adaptações e transformação)
 
 
Espero ver este evento em vários derivados.
 
Abraços!
 
 
Absolute.
 

YDmXTU2.png

 

Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui

Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui

 

Muitos querem aquilo que você tem, 
mas vão desistir quando souberem o preço que você pagou.

 

skype-favicon.png lu.lukinha

message-16.png [email protected]

Link para o post
Compartilhar em outros sites

Não entendi muito bem como funciona, se colocasse umas imagens também ajudaria.

 

Seu pedido é uma ordem, vou providenciar algum sv, não mexo com derivados fiz a pedidos.

Explicação: É igual zombie event, se o pikachu pegou o cara é teleportado pra fora da Arena e eprde =p

YDmXTU2.png

 

Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui

Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui

 

Muitos querem aquilo que você tem, 
mas vão desistir quando souberem o preço que você pagou.

 

skype-favicon.png lu.lukinha

message-16.png [email protected]

Link para o post
Compartilhar em outros sites

Bem que poderia ter deixado um mapa para quem não sabe fazer um né?

rep+

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Link para o post
Compartilhar em outros sites
  • 4 months later...

Desculpe estar revivendo o tópico, mas preciso muito desse evento, todos que testei não deu certo, sempre dava erro. Enfim apliquei esse script no meu servidor de dragon ball, porém deixei como zombie event mesmo... Deu tudo certo, porém ele não sumona os monsters, fiquei la um bom tempo e nada dos zombies aparecerem, até tentei da goto com o ADM porém não se encontra no mapa, coloquei as cordenadas certinho... =/

 

Obs: Criei o zombie event, apliquei no monsters.xml e também alterei esta parte do script monsters = {'Zombie Event'},

Editado por bhelliip (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 1 month later...
  • Moderador

 

Fala galerinha do TK, tudo bem?

Recebi alguns pedidos para fazer um evento estilo Zombie, só que no modo de Pokemon (PÍÍÍKAAAAAAAAAAAAAAAAAAACHUUUUUU)

rs.

 

 

 

Enfim, vamos a instalação, depois ensinarei a configurar.

 

 

Em data/mods crie um arquivo com o nome de pikachuevent.xml com o conteúdo:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="PikachuEvent" version="1.0" author="Absolute" contact="tibiaking.com" enabled="yes">

	<config name="config_pikachu_event">
		<![CDATA[
			configPikachuEvent = {
				storages = {
					main = 'PikachuEventMain', -- set free storage
					player = 'PikachuEventPlayer', -- set free storage
					joining = 'PikachuEventJoining', -- set free storage
					kills = 'PikachuEventKills', -- set free storage
					exhaust = 'PikachuEventExhaust', -- set free storage
					countEvent = 'PikachuEventCountEvent' -- set free storage
				},
				
				position = {x=890,y=193,z=7}, -- position to which player is teleporting
				room = {
					from = {x=678,y=980,z=7}, -- left top corner of event room
					to = {x=678,y=1089,z=7} -- right bottom corner of event room
				},				
				
				rewards = {7958, 11366}, -- reward id which player can win (reward is random)				
				players = {
					max = 50, -- max players in event
					min = 2, -- min players to event start
					minLevel = 50, -- min level to join to event
					pvpEnabled = false -- can players hit theirselfs
				},
				
				days = {
					['Tuesday'] = {'22:00:00'}, 
					['Thursday'] = {'22:00:00'}, 
					['Friday'] = {'22:00:00'}, 
					['Sunday'] = {'22:00:00'}
				},
				
				spawnDelay = 2000, -- miliseconds
				amountCreatingMonsters = 5,
				monsters = {'Pikachu', 'Ash'}, -- name of monsters which is creating in event

				delayTime = 5.0, -- time in which players who joined to event are teleporting to teleport position [miuntes]
				startEvent = 1, -- time from teleport to start event [seconds]
				stopEvent = 19200, -- [seconds]
				text = '-PL-\nAby wygrac i otrzymac nagrode, zabij jak najwieksza liczbe pikachu przez 20min lub pozostan sam na arenie.\n\n-ENG-\nTo win and get a reward, kill as many pikachus for 20 minutes or stay the same in the arena.'
			}
		]]>
	</config>
	
	<lib name="lib_pikachu_event">
		<![CDATA[
			function doStopPikachuEvent()
				if getStorage(configPikachuEvent.storages.main) > 0 then
					local playerTable, creatureTable = {}, {}

					for x = configPikachuEvent.room.from.x, configPikachuEvent.room.to.x do
						for y = configPikachuEvent.room.from.y, configPikachuEvent.room.to.y do
							local n, i = getTileInfo({x=x, y=y, z=configPikachuEvent.room.from.z}).creatures, 1
							if n ~= 0 then
								local v = getThingfromPos({x=x, y=y, z=configPikachuEvent.room.from.z, stackpos=i}).uid
								while v ~= 0 do
									if isPlayer(v) then
										table.insert(playerTable, v)
										if n == #playerTable then
											break
										end
									elseif isMonster(v) then
										table.insert(creatureTable, v)
										if n == #creatureTable then
											break
										end
									end
									i = i + 1
									v = getThingfromPos({x=x, y=y, z=configPikachuEvent.room.from.z, stackpos=i}).uid
								end
							end
						end
					end

					if #playerTable > 1 then
						table.sort(playerTable, function(a, b) return (getCreatureStorage(a, configPikachuEvent.storages.kills)) > (getCreatureStorage(b, configPikachuEvent.storages.kills)) end)
						
						local prize = math.random(#configPikachuEvent.rewards)
						
						doTeleportThing(playerTable[1], getTownTemplePosition(getPlayerTown(playerTable[1])))
						doCreatureSetStorage(playerTable[1], configPikachuEvent.storages.kills, 0)
						doPlayerAddItem(playerTable[1], configPikachuEvent.rewards[prize], 1)
						doCreatureAddHealth(playerTable[1], getCreatureMaxHealth(playerTable[1]) - getCreatureHealth(playerTable[1]))
						doCreatureAddMana(playerTable[1], getCreatureMaxMana(playerTable[1]) - getCreatureMana(playerTable[1]))
						doPlayerSendTextMessage(playerTable[1], MESSAGE_EVENT_ADVANCE, 'You win! You have received '..getItemNameById(configPikachuEvent.rewards[prize])..' as reward.')
						doBroadcastMessage('Pikachu Plague Attack has finished. The winner is '..getCreatureName(playerTable[1])..'. Congratulations!')
						doSetStorage(configPikachuEvent.storages.main, -1)
						
						db.query("INSERT INTO `events` (`event_name`, `winner_name`, `won_item`, `time_win`) VALUES (\"Pikachu\", \"" .. getCreatureName(playerTable[1]) .. "\", \"" .. getItemNameById(configPikachuEvent.rewards[prize]) .. "\", " .. getStorage(configPikachuEvent.storages.countEvent) ..");")

						for i = 2, #playerTable do
							doCreatureAddHealth(playerTable[i], getCreatureMaxHealth(playerTable[i]) - getCreatureHealth(playerTable[i]))
							doCreatureAddMana(playerTable[i], getCreatureMaxMana(playerTable[i]) - getCreatureMana(playerTable[i]))
							doTeleportThing(playerTable[i], getTownTemplePosition(getPlayerTown(playerTable[i])))
							doPlayerSendTextMessage(playerTable[i], MESSAGE_EVENT_ADVANCE, 'You loss.')
							doSendMagicEffect(getThingPos(playerTable[i]), CONST_ME_STUN)
							doCreatureSetStorage(playerTable[i], configPikachuEvent.storages.kills, 0)
						end

						for i = 1, #creatureTable do
							if isMonster(creatureTable[i]) then
								doRemoveCreature(creatureTable[i])
							end
						end
						
						doSetStorage(configPikachuEvent.storages.countEvent, getStorage(configPikachuEvent.storages.countEvent) + 1)
					elseif #playerTable == 0 then
						for i = 1, #creatureTable do
							if isMonster(creatureTable[i]) then
								doRemoveCreature(creatureTable[i])
							end
						end
					
						doBroadcastMessage('No one win in Pikachu Plague Attack.')
						doSetStorage(configPikachuEvent.storages.main, -1)
						doSetStorage(configPikachuEvent.storages.countEvent, getStorage(configPikachuEvent.storages.countEvent) + 1)
					end
				end
			end

			function doStartPikachuEvent()
				doSetStorage(configPikachuEvent.storages.joining, -1)

				if configPikachuEvent.players.min <= doCountPlayersPikachuEvent() then
					for _, cid in ipairs(getPlayersOnline()) do
						if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
							doCreatureSetStorage(cid, configPikachuEvent.storages.player, -1)
							doTeleportThing(cid, configPikachuEvent.position)
							doCreatureSetNoMove(cid, false)
							doRemoveCondition(cid, CONDITION_INFIGHT)
							
							doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Get ready. Pikachus Plague Attack starts in '..configPikachuEvent.startEvent..' seconds.')
						end
					end
					
					addEvent(doSetStorage, configPikachuEvent.startEvent * 1000, configPikachuEvent.storages.main, 1)
					addEvent(doStopPikachuEvent, configPikachuEvent.stopEvent * 1000)
					addEvent(doRepeatCheckPikachuEvent, configPikachuEvent.startEvent * 1000 + 2000)
					
					doBroadcastMessage('Pikachu Plague Attack has started. LET\'S GO!')
				else
					for _, cid in ipairs(getPlayersOnline()) do
						if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
							doCreatureSetNoMove(cid, false)
							doRemoveCondition(cid, CONDITION_INFIGHT)
						end
					end
					
					doBroadcastMessage('Pikachu Plague Attack hasn\'t started beacuse there were not enough players.')
				end
			end
			
			function doRepeatCheckPikachuEvent()
				if getStorage(configPikachuEvent.storages.main) > 0 then
					local playerTable, creatureTable, xTable, yTable = {}, {}, {}, {}

					for x = configPikachuEvent.room.from.x, configPikachuEvent.room.to.x do
						for y = configPikachuEvent.room.from.y, configPikachuEvent.room.to.y do
							local n, i = getTileInfo({x=x, y=y, z=configPikachuEvent.room.to.z}).creatures, 1
							if n ~= 0 then
								local v = getThingfromPos({x=x, y=y, z=configPikachuEvent.room.to.z, stackpos=i}).uid
								while v ~= 0 do
									if isPlayer(v) then
										table.insert(playerTable, v)
										if n == #playerTable then
											break
										end
									elseif isMonster(v) then
										table.insert(creatureTable, v)
										if n == #creatureTable then
											break
										end
									end
									i = i + 1
									v = getThingfromPos({x=x, y=y, z=configPikachuEvent.room.to.z, stackpos=i}).uid
								end
							end
							
							table.insert(xTable, x)
							table.insert(yTable, y)
						end
					end

					if #playerTable == 1 then
						local prize = math.random(#configPikachuEvent.rewards)
						
						addEvent(doTeleportThing, 200, playerTable[1], getTownTemplePosition(getPlayerTown(playerTable[1])), true)
						doPlayerAddItem(playerTable[1], configPikachuEvent.rewards[prize], 1)
						doCreatureSetStorage(playerTable[1], configPikachuEvent.storages.kills, 0)
						doCreatureAddHealth(playerTable[1], getCreatureMaxHealth(playerTable[1]) - getCreatureHealth(playerTable[1]))
						doCreatureAddMana(playerTable[1], getCreatureMaxMana(playerTable[1]) - getCreatureMana(playerTable[1]))
						doPlayerSendTextMessage(playerTable[1], MESSAGE_EVENT_ADVANCE, 'You win! You have received '..getItemNameById(configPikachuEvent.rewards[prize])..' as reward.')
						doBroadcastMessage('Pikachu Plague Attack has finished. The winner is '..getCreatureName(playerTable[1])..'. Congratulations.')
						db.query("INSERT INTO `events` (`event_name`, `winner_name`, `won_item`, `time_win`) VALUES (\"Pikachu\", \"" .. getCreatureName(playerTable[1]) .. "\", \""..getItemNameById(configPikachuEvent.rewards[prize]).."\", "..getStorage(configPikachuEvent.storages.countEvent)..");")
						
						for i = 1, #creatureTable do
							if isMonster(creatureTable[i]) then
								doRemoveCreature(creatureTable[i])
							end
						end
						
						doSetStorage(configPikachuEvent.storages.main, -1)
						doSetStorage(configPikachuEvent.storages.countEvent, getStorage(configPikachuEvent.storages.countEvent) + 1)
						return
					elseif #playerTable == 0 then
						for i = 1, #creatureTable do
							if isMonster(creatureTable[i]) then
								doRemoveCreature(creatureTable[i])
							end
						end
					
						doBroadcastMessage('No one win in Pikachu Plague Attack.')
						doSetStorage(configPikachuEvent.storages.main, -1)
						
						doSetStorage(configPikachuEvent.storages.countEvent, getStorage(configPikachuEvent.storages.countEvent) + 1)
						return
					end
				
					local pos = {x=xTable[math.random(#xTable)], y=yTable[math.random(#yTable)], z=7}				
					for i = 1, configPikachuEvent.amountCreatingMonsters do
						doCreateMonster(configPikachuEvent.monsters[math.random(#configPikachuEvent.monsters)], pos, false, false, false)
						doSendMagicEffect(pos, CONST_ME_BATS)
					end
					
					addEvent(doRepeatCheckPikachuEvent, configPikachuEvent.spawnDelay)
				end
			end
			
			function doCountPlayersPikachuEvent()
				local x = 0
				for _, cid in ipairs(getPlayersOnline()) do
					if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
						x = x + 1
					end
				end
				return x
			end
			
			function doStartCountingPikachuEvent(x)
				if configPikachuEvent.delayTime-x > 0 then
					doBroadcastMessage('Pikachu Plague Attack is going to start in '..configPikachuEvent.delayTime-x..' minutes. You can join to the event by saying "!pikachu join".')
					addEvent(doStartCountingPikachuEvent, 60*1000, x+1)
				end
			end
		]]>
	</lib>

	<talkaction words="!pikachu" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onSay(cid, words, param)
				if getStorage(configPikachuEvent.storages.joining) ~= 1 then
					return doPlayerSendCancel(cid, 'Pikachu Plague Attack hasn\'t started yet.')
				elseif param == '' then
					return doPlayerSendCancel(cid, 'Command param required (say: "!pikachu join" or "!pikachu leave.").')
				elseif getPlayerLevel(cid) < configPikachuEvent.players.minLevel then
					return doPlayerSendCancel(cid, 'You can\'t join to the event if you don\'t have a require '..configPikachuEvent.players.minLevel..' level.')
				elseif getTileInfo(getThingPos(cid)).protection ~= true then
					return doPlayerSendCancel(cid, 'You can\'t join to the event if you aren\'t in protection zone.')
				elseif exhaustion.check(cid, configPikachuEvent.storages.exhaust) ~= false then
					return doPlayerSendCancel(cid, 'You must wait '..exhaustion.get(cid, configPikachuEvent.storages.exhaust)..' seconds to use this command again.')
				end

				if param == 'join' then
					if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
						return doPlayerSendCancel(cid, 'You have arleady joined to event. Wait patiently for start.')
					elseif doCountPlayersPikachuEvent() == configPikachuEvent.players.max then
						return doPlayerSendCancel(cid, 'Max players in the event have been reached.')
					end
					
					doCreatureSetNoMove(cid, true)
					doPlayerPopupFYI(cid, configPikachuEvent.text)
					doCreatureSetStorage(cid, configPikachuEvent.storages.player, 1)
					doAddCondition(cid, createConditionObject(CONDITION_INFIGHT, -1))
					doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have joined to Pikachu Plague Attack. You can\'t move until event don\'t start. Wait patiently for the event start.')
					doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have joined to Pikachu Plague Attack.')
				elseif param == 'leave' then
					if getCreatureStorage(cid, configPikachuEvent.storages.player) <= 0 then
						return doPlayerSendCancel(cid, 'You can\'t leave from the event if you don\'t join.')
					end
					
					doCreatureSetNoMove(cid, false)
					doCreatureSetStorage(cid, configPikachuEvent.storages.player, -1)
					doRemoveCondition(cid, CONDITION_INFIGHT)
					doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have left from the Pikachu Plague Attack.')
				end
				
				exhaustion.set(cid, configPikachuEvent.storages.exhaust, 5)				
				return true
			end
		]]>
	</talkaction>
	
	<talkaction words="!startpikachu" access="5" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")
			domodlib("lib_pikachu_event")

			function onSay(cid, words, param)
				if getStorage(configPikachuEvent.storages.main) > 0 then
					return doPlayerSendCancel(cid, 'Pikachu Plague Attack is already running.')
				end
			
				doStartCountingPikachuEvent(0)

				for _, pid in ipairs(getPlayersOnline()) do
					if getCreatureStorage(pid, configPikachuEvent.storages.player) > 0 then
						doCreatureSetStorage(pid, configPikachuEvent.storages.player, -1)
						doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
						doCreatureSetStorage(pid, configPikachuEvent.storages.kills, 0)
					end
				end

				doSetStorage(configPikachuEvent.storages.joining, 1)
				addEvent(doStartPikachuEvent, configPikachuEvent.delayTime * 60 * 1000)
				return true
			end
		]]>
	</talkaction>
	
	<talkaction words="!stoppikachu" access="5" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")
			domodlib("lib_pikachu_event")

			function onSay(cid, words, param)
				if getStorage(configPikachuEvent.storages.main) > 0 then
					doStopPikachuEvent()
				else
					doPlayerSendCancel(cid, 'You can not do it if Pikachu Plague Attack is not enabled.')
				end
				return true
			end
		]]>
	</talkaction>

	<globalevent name="Pikachu_Event_Days" interval="1000" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")
			domodlib("lib_pikachu_event")
			
			local daysOpen = {}			
			for k, v in pairs(configPikachuEvent.days) do
				table.insert(daysOpen, k)
			end
			
			function onThink(interval)
				if isInArray(daysOpen, os.date('%A')) then
					if isInArray(configPikachuEvent.days[os.date('%A')], os.date('%X', os.time())) then
						if getStorage(configPikachuEvent.storages.joining) ~= 1 then
							doStartCountingPikachuEvent(0)

							for _, pid in ipairs(getPlayersOnline()) do
								if getCreatureStorage(pid, configPikachuEvent.storages.player) > 0 then
									doCreatureSetStorage(pid, configPikachuEvent.storages.player, -1)
									doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
									doCreatureSetStorage(pid, configPikachuEvent.storages.kills, 0)
								end
							end

							doSetStorage(configPikachuEvent.storages.joining, 1)
							addEvent(doStartPikachuEvent, configPikachuEvent.delayTime * 60 * 1000)
						end
					end
				end
				return true
			end
		]]>
	</globalevent>
	
	<event type="statschange" name="Pikachu_Event_Dead" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onStatsChange(cid, attacker, type, combat, value)
				if type == 1 and getCreatureHealth(cid) <= value then
					if isInRange(getThingPos(cid), configPikachuEvent.room.from, configPikachuEvent.room.to) then
						if isPlayer(cid) then
							doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
							doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
							doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
							doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You loss due to attack.')
							
							doSendAnimatedText(getThingPos(cid), value, TEXTCOLOR_RED)
							doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
							doCreatureSetStorage(cid, configPikachuEvent.storages.kills, 0)
							return false
						end
					end
				elseif configPikachuEvent.players.pvpEnabled ~= true and isInArray({1,3}, type) and isPlayer(attacker) and isPlayer(cid) then
					if isInRange(getThingPos(cid), configPikachuEvent.room.from, configPikachuEvent.room.to) then
						return false
					end
				end
				return true
			end
		]]>
	</event>

	<event type="kill" name="Pikachu_Event_Kill" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onKill(cid, target, damage, flags)
				if isInRange(getThingPos(cid), configPikachuEvent.room.from, configPikachuEvent.room.to) then
					if isInArray(configPikachuEvent.monsters, getCreatureName(target)) then
						doCreatureSetStorage(cid, configPikachuEvent.storages.kills, math.max(0, getCreatureStorage(cid, configPikachuEvent.storages.kills) + 1))
					end
				end
				return true
			end
		]]>
	</event>

	<event type="login" name="Pikachu_Event_Login" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onLogin(cid)
				if getCreatureStorage(cid, configPikachuEvent.storages.player) > 0 then
					doCreatureSetStorage(cid, configPikachuEvent.storages.player, -1)
					doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
					doCreatureSetNoMove(cid, false)
					doRemoveCondition(cid, CONDITION_INFIGHT)
					doCreatureSetStorage(cid, configPikachuEvent.storages.player.kills, 0)
				end

				registerCreatureEvent(cid, 'Pikachu_Event_Dead')
				registerCreatureEvent(cid, 'Pikachu_Event_Kill')
				return true
			end
		]]>
	</event>
	
	<globalevent name="Pikachu_Event_Start" type="startup" event="script">
		<![CDATA[
			domodlib("config_pikachu_event")

			function onStartup()
				doSetStorage(configPikachuEvent.storages.main, -1)
				doSetStorage(configPikachuEvent.storages.joining, -1)
				return true
			end
		]]>
	</globalevent>
</mod>

Salve e feche.

 

sombra7.png

Em data/monsters/monster.xml adicione a linha:

<monster name="Pikachu" file="pikachu"/>

Em data/monters/scripts crie um arquivo com o nome de pikachu.xml com o conteúdo:

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Pikachu" nameDescription="Pikachu" race="undead" experience="10500" speed="800" manacost="0">
  <health now="200000" max="200000"/>
  <look type="88" head="20" body="30" legs="40" feet="50" corpse="6031"/>
	<targetchange interval="10000" chance="10"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="1"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="1"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>

  <attacks>    
     <attack name="melee" interval="1200" range="1" min="-2000" max="-5000"/>
  </attacks>


  <defenses armor="25" defense="30">
  </defenses>
  <voices interval="5000" chance="10">
    <voice sentence="PIKAAAA PIKAAAAAA CHU DE ABSOLUTE."/>
    <voice sentence="PIKACHU EU ESCOLHO VC."/>
  </voices>
  <loot>
		<item id="2160" countmax="1" chance="50000"/>
		
  </loot>
</monster>

Crie a sprite a seu gosto.

 

sombra7.png

 

Explicação básica:

position = {x=890,y=193,z=7}, -- Aqui a posição do centro da sua ARENA PIKACHU!
from = {x=678,y=980,z=7}, -- Posição do final do canto esquerdo da sua arena
to = {x=678,y=1089,z=7} -- Posição do final do canto direito da sua arena
rewards = {7958, 11366}, -- Aqui a recompensa que o último player que restar na arena vai ganhar, no caso é RANDOM (ALEATÓRIA), pode ser ou um ou outro, caso queira deixar apenas uma recompensa deixe: rewards = {7958}
players = {
max = 50, -- Máximo de players que poderão participar
min = 2, -- Mínimo de players pra começar o evento, claro 2 ou mais.
minLevel = 50, -- level mínimo pra entrar no evento
pvpEnabled = false -- PVP DESATIVADO DENTRO DA ARENA, para ativar deixe = true.
days = {
['Tuesday'] = {'22:00:00'} -- Dias e hora que ocorrerão o evento automático. (ENGLISH) - Aí no caso está para terça-feira ás 22h (Lembrando que tem de ser o horário da máquina).

Para dar inicio ao evento manualmente, basta digitar com o seu ADM: !startpikachu

Então os players irão digitar !pikachu para participar.
Observação: O Comando só pode ser executado sem battle e em área PZ (Pós usar o player ficará imóvel esperando o evento começar)
Quando começa Absolute? - Quando atingir o número máximo de players ou 5 minutos.
Observação: Crie um map do seu estilo, como quiser e comfigure com as posições.
 
sombra7.png
 
Caso tenha críticas construtivas, poste.

Lembrando que fiz este evento devido a pedidos que houve nas seções destinadas de scripting.

Qualquer dúvida não deixe de perguntar, ninguém nasceu sabendo :P

 
 
Créditos:
- Virrages (Event Base)

- Absolute (Modificação, funções, adaptações e transformação)

 
 
Espero ver este evento em vários derivados.
 
Abraços!
 
 
Absolute.

 

 

 

1614022_911500368902047_3454773037425968

 

fiz o mapa, vou testar :P Rep +

 

20230912_034613.png.cf49b650c34dd7d7b1f79bd49c70f53c.png

Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código.  #OpenSource #Programação #Contribuição

 

Link para o post
Compartilhar em outros sites
  • 10 months later...
  • 11 months later...

DESCULPEM POR REVIVER O TÓPICO, MAS PRECISO DE AJUDA.

 

Então @Absolute, eu tentei usar o seu script no meu servidor (PDA) e acabou dando esse error, você poderia me ajudar ou me dizer pq aconteceu isso?

Spoiler

 

> Loading pikachuevent.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/pikachuevent.xml
Line: 44, Info: Input is not proper UTF-8, indicate encoding !
Bytes: 0xE7 0x6F 0x75 0x2C


failed!

 

 

@login12, @Subyth se algum de vocês poderem me ajudar também agradeço <3 

Editado por Arthasz Walker (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Alladdin
      ESTÁ A PROCURA DE UM DESIGNER?
       
      A Identidade Visual de um OT é o ponto chave para o seu sucesso!
      Um OTServer com sua identidade visual formada consegue gerar:
      - Mais atenção para as belezas visuais do servidor.
      - Um ponto de vista positivo para novos jogadores.
      - A identidade de seu servidor.
      - Boas impressões à primeira vista.
      - Permite seu OTServer ser reconhecido e lembrado.
      - Um melhor posicionamento artístico.
      - Rentabilidade, lhe poupando dinheiro de designs futuros.
      - Apresentação, um ponto chave para um bom início na carreira de otservers.
      --------------------------------------------------------------------------
      Peça agora mesmo sua logo personalizada ou compre um template pré-definido!
      Não trabalhamos apenas com logos, temos experiências em criação de capas, posts.
      templates de sites, e muito mais!
      Trabalhamos com qualquer tipo de OTServer, como: Narutibia, Wodbo, Poketibia, Bleachtibia,
      Tibia Global ou Baiak e muitos outros servidores derivados!
      NÃO PERCA TEMPO, ME MANDE MENSAGEM AGORA MESMO!
      --------------------------------------------------------------------------
      Entre em contato agora:
      > Discord: vinny#9460
      > Facebook: https://www.facebook.com/VinnyArtz
      > Contatos opcionais: Me chame no messenger.
       
       
      UM POUCO DO MEU PORTFÓLIO ABAIXO \/









       

      “Se o seu ódio fosse transformado em eletricidade, ele seria capaz de acender todo o planeta” - Nikola Tesla.
       
      PS: NÃO CONSEGUI MOVER MEU TÓPICO PARA A ÁREA DE DESIGNS, PEÇO PARA QUE ALGUM MODERADOR O FAÇA, OBRIGADO.
       
    • Por Wend II
      Olá vi que os zombie events de tibia funciona da seguinte forma, quando o zombie bate no player o player é teleportado para o templo certo? 
      queria que esse sistema fosse modificado para poketibia da seguinte forma:  o zombi no caso ia ser um picachu e quando o pikachu tocasse nos players os players fossem teleportados para o templo.   só que o ultimo player que fica na sala ganhase um item e fosse anunciado o nome dele para todos    facil não ?
       
      alguém porfavor responda se é possivel fazer isso ?
    • Por xWhiteWolf
      Fala galera, hoje vim trazer o projeto pronto do Magnus Challenger pra vocês instalarem no servidor de vocês!   

      Pra quem não conhece é um sistema de Tasks baseado no Zezenia onde você pode escolher entre tasks de matar monstros ou de coletar certos items para o npc Magnus, um guerreiro famoso da cidade que está atolado de tarefas e precisa da sua ajuda!

      Peguei os aspectos que eu julguei serem os principais do modelo do Zezenia e editei com algumas coisas que eu achei que ficariam melhores.
      Quem quiser pode ver um vídeo comentado de como o sistema funciona:




      Dito isso vou ensinar vocês como instalar isso no server:
      Pra começar vá em data\creaturescripts\scripts e procure login.lua, agora vá até o final do arquivo e antes do último return true coloque essas linhas abaixo

      ainda em creaturescripts procure creaturescripts.xml e adicione essa linha junto com as outras que já estão lá (seguindo o padrão)
      <!-- TASK SYSTEM --> <event type="kill" name="tasksystem" script="tasksystem.lua"/> Agora crie um arquivo em creaturescripts\scripts com o nome de tasksystem.lua e adicione o seguinte à ele:




      Terminada a parte da contagem de kill vamos ao NPC em si.
      Crie um arquivo chamado Magnus.xml em data\npc e coloque isso dentro dele:




      Agora em data\npc\scripts crie um arquivo chamado zezeniaa.lua e adicione esse conteúdo dentro do arquivo:





      ~~~~~~~~~~~~~~~~ FEITO ISSO ESTÁ TERMINADO ~~~~~~~~~~~~~~~~~~

      Agora aprendendo a configurar:
       
      No tasksystem vc pode editar isso daqui:
      Eu fiz um sistema onde se vc estiver em party com alguém e a pessoa matar os bixos conta como se você tivesse matado; Assim incentiva o pessoal a ir numa cave de Dragon e ao invés de matar quem está lá pra ficar sozinho na cave, eles vão chamar party pra fazerem a task juntos.. assim fazer amigos fica mais fácil e com maiores laços é maior a chance do povo não abandonar o seu server.

      Apenas digite "true" ou "false" pra ativar/desativar esse sistema e em baixo temos a distancia máxima pro monstro estar do cara que está fazendo a task pra contar o kill. Se a distancia entre o monstro e a pessoa for maior que 7 não vai contar pra ele a kill.


      No zezeniaa.lua as coisas que dão pra configurar são maiores mas são igualmente simples:
      Toda vez que vc pedir uma task short (curta) vc vai ter de 100 a 400 monstros pra matar, ele gera um número de 0 a 6 e multiplica por 5 e soma com os 100 iniciais.. o mesmo vale pra todos os outros valores.

      levelcollect é o level mínimo pra fazer tasks do tipo collect.
      time é o tempo em segundos que você vai ficar sem poder falar com o npc caso desista de alguma task, o padrão é 8 * 60 * 60 (8 horas)
      bonus é por quanto vai multiplicar caso vc permita que o npc escolha aleatoriamente entre todas as opções.. o padrão é 20% de bonus (1.2)
      multiplicador é uma coisa que eu adicionei pra ficar mais fácil mexer na fórmula sem cometer cagadas, se vc tá ganhando 10% de exp e quer ganhar 80% é só colocar 8 no multiplicador.

       
      Isso daqui é o banco de dados principal do sistema de kill, toda vez que vc escolher uma task do tipo fácil, médio, dificil ele vai acessar essas tabelas contendo o nome das criaturas.. vc pode facilmente adicionar novos nomes, o npc já está programado pra lidar com isso, apenas siga o padrão e mantenha sempre o último sem vírgula!

      Ex: adicionando Morgaroth na tabela de hard
      local hard = { [1] = "Giant Spider", [2] = "Dragon Lord", [3] = "Grim Reaper", [4] = "Demon", [5] = "Crystal Spider", [6] = "Demon Skeleton", [7] = "Juggernaut", [8] = "Destroyer", [9] = "Hand of Cursed Fate", [10] = "Morgaroth" } atente-se também pra não repetir o número no index.. se o anterior era [9] use [10].

      O restante das tabelas são separadas para o banco de dados das tasks de collect:
       
      segue a mesma lógica da de kill só que aqui você tem o id dos itens que serão usados... aquela count não tem nada a ver com o item pois ele vai gerar tanto o item aleatoriamente quanto à count;
      Ex: 
      [1] = {id = 5880, count = 20}, -- iron ore isso não significa que se cair iron ore (id 5880) irá cair sempre 20.. até porque eu poderia escolher uma task long e easy e pegar a task de trazer até 50 iron ores, apenas tente manter os padrões que são os intervalos definidos.
      No easy ele varia de 10 a 20, no medium ele varia de 20 a 35 e no hard de 40 a 50.



      Espero que vocês tenham curtido, é um sistema grande mas bem simples de se mexer... se tiverem quaisquer problemas podem comentar aqui. Deu trabalho fazer isso então se você gostou deixe o seu comentário aí e o seu "Gostei" que vai me incentivar a trazer mais coisas desse tipo pra cá. Abraços do lobo.


      PS: Pra sumonar o npc digite com o GOD: /n Magnus ou coloque ele pelo map editor.
    • Por Fausto32
      Script/Tutorial+ Php +Map +Talkaction +Portal.
      Ps: Antes de falar q o topico já existe no forum teste os outros scripts
      Então começando por informações basícas :
      Para abrir o evento : /zombiestart numero de players . exemplo : /zombiestart 2
      Para Iniciar o evento sem o numero maximo de players: /zombiestart force.
      Apos aberto sempre q um player ente no portal do evento e avisado por broadcast quem
      entrou na arena e o numero de players restantes para o evento ser iniciado.
      Apos o evento ser iniciado um zombie e sumonado a cada 20 segundos, o player que for infectado e teleportado para o templo vence o ultimo player restante na arena.
      Ao terminar o evento e anuciado por broadcast o nome do player vencedor tempo q durou na arena e por quantos zombies ele sobreviveu, entrega de premio automatica, premio configuravel.
      Garantia de funcionabilidade perfeita em TFS 0.4 se configurado corretamente, não testado em outras versões de distros.
      Creditos: Me .. não criei mais montei peguei de varios servers/topicos e corigi os varios bugs de distro colocaria os creditos de onde peguei a maioria do script mais foi de um server sem creditos q nem era pra ter sido postado.
      Enfim Vamos ao Evento !
      Primeiro vou estar postando a pagina classica do Zombie event no Gesior que seria a parte PHP para informar os players sobre o evento.
      Pagina PHP + Tutorial de como implementar ela no seu site.
      Agora alguns mapas para o zombie event:
      Então Agora vamos ao script !
      data\creaturescripts\scripts\zombie – A pasta ‘zombie’ deve ser criada no diretorio citado.
      \data\creaturescripts\scripts\Zombie\onattack.lua
        function loseOnZombieArena(cid) kickPlayerFromZombiesArea(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "BOOM! You are dead.") local players = getZombiesEventPlayers() if(#players <= 1) then local winner = players[1] if(winner) then doPlayerAddItem(winner, 2157, 5, true) doPlayerAddItem(winner, 6119, 1, true) doPlayerSendTextMessage(winner, MESSAGE_STATUS_CONSOLE_BLUE, "You won zombies arena event.") doBroadcastMessage("After " .. os.time() - getPlayerZombiesEventStatus(winner) .. " seconds of fight " .. getCreatureName(winner) .. " won Zombie Arena Event in game versus " .. getStorage(ZE_ZOMBIES_SPAWNED) .. " zombies!") kickPlayerFromZombiesArea(winner) else doBroadcastMessage("Zombie arena event finished! No one win?!?!?! WTF!") end doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) local width = (math.max(ZE_spawnFromPosition.x, ZE_spawnToPosition.x) - math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)) / 2 + 1 local height = (math.max(ZE_spawnFromPosition.y, ZE_spawnToPosition.y) - math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)) / 2 + 1 local centerPos = {x=math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)+width,y=math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)+height,z=ZE_spawnFromPosition.z} for z = math.min(ZE_spawnFromPosition.z, ZE_spawnToPosition.z), math.max(ZE_spawnFromPosition.z, ZE_spawnToPosition.z) do centerPos.z = z for i, uid in pairs(getSpectators(centerPos, width, height, false)) do if(isMonster(uid)) then doRemoveCreature(uid) end end end end end function onStatsChange(target, cid, changetype, combat, value) if((cid and isMonster(cid) and getCreatureName(cid) == "Zombie Event") or (isInRange(getThingPosition(target), ZE_spawnFromPosition, ZE_spawnToPosition) and changetype == STATSCHANGE_HEALTHLOSS and math.abs(value) >= getCreatureHealth(target))) then doCreatureAddHealth(target, getCreatureMaxHealth(target)) loseOnZombieArena(target) return false end return true end \data\creaturescripts\scripts\Zombie\ondeath.lua
        function onDeath(cid) setZombiesToSpawnCount(getZombiesToSpawnCount() + 2) doCreatureSay(cid, "I'll be back!", 19) return true end \data\creaturescripts\scripts\Zombie\onthink.lua
        function onThink(cid) local target = getCreatureTarget(cid) if(target ~= 0 and not isPlayer(target)) then doRemoveCreature(target) end return true end \data\globalevents\scripts\zombie\ onstartup.lua
        function onstartup() db.executeQuery("UPDATE `player_storage` SET `value` = 0 WHERE `key` = " .. ZE_isOnZombieArea .. ";") doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) addZombiesEventBlockEnterPosition() return true end \data\globalevents\scripts\zombie\onthink.lua
        function onThink(interval, lastExecution, thinkInterval) if(getStorage(ZE_STATUS) == 2) then setZombiesToSpawnCount(getZombiesToSpawnCount()+1) local players = getZombiesEventPlayers() for i=1, getZombiesToSpawnCount() * 2 do if(getZombiesToSpawnCount() > 0 and spawnNewZombie()) then setZombiesToSpawnCount(getZombiesToSpawnCount()-1) end end end return true end \data\lib\zombie_event.lua
        -- CONFIG ZE_DEFAULT_NUMBER_OF_PLAYERS = 20 ZE_ACCESS_TO_IGNORE_ARENA = 4 -- POSITIONS ZE_blockEnterItemPosition = {x=32341, y=32213, z=7} -- onde nasce o teleport? ZE_enterPosition = {x=32154, y=32578, z=7} -- onde os players nascem dentro da arena zombie? ZE_kickPosition = {x=32368, y=32241, z=7} -- quando morre vai para onde? ZE_spawnFromPosition = {x=32140,y=32566,z=7} -- para sumonar zombie (de) ZE_spawnToPosition = {x=32168,y=32590,z=7} -- para sumonar zombie (ate) -- ITEM IDS --ZE_blockEnterItemID = 2700 ZE_blockEnterItemID = 1387 -- STORAGES -- - player ZE_isOnZombieArea = 34370 -- - global ZE_STATUS = 34370 -- =< 0 - off, 1 - waiting for players, 2 - is running ZE_PLAYERS_NUMBER = 34371 ZE_ZOMBIES_TO_SPAWN = 34372 ZE_ZOMBIES_SPAWNED = 34373 -- FUNCTION function setZombiesEventPlayersLimit(value) doSetStorage(ZE_PLAYERS_NUMBER, value) end function getZombiesEventPlayersLimit() return getStorage(ZE_PLAYERS_NUMBER) end function addPlayerToZombiesArea(cid) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, ZE_enterPosition, true) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) if(getPlayerAccess(cid) < ZE_ACCESS_TO_IGNORE_ARENA) then setPlayerZombiesEventStatus(cid, os.time()) end end function kickPlayerFromZombiesArea(cid) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, ZE_kickPosition, true) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) setPlayerZombiesEventStatus(cid, 0) end function getPlayerZombiesEventStatus(cid) return getCreatureStorage(cid, ZE_isOnZombieArea) end function setPlayerZombiesEventStatus(cid, value) doCreatureSetStorage(cid, ZE_isOnZombieArea, value) end function getZombiesEventPlayers() local players = {} for i, cid in pairs(getPlayersOnline()) do if(getPlayerZombiesEventStatus(cid) > 0) then table.insert(players, cid) end end return players end function getZombiesCount() return getStorage(ZE_ZOMBIES_SPAWNED) end function addZombiesCount() doSetStorage(ZE_ZOMBIES_SPAWNED, getStorage(ZE_ZOMBIES_SPAWNED)+1) end function resetZombiesCount() doSetStorage(ZE_ZOMBIES_SPAWNED, 0) end function getZombiesToSpawnCount() return getStorage(ZE_ZOMBIES_TO_SPAWN) end function setZombiesToSpawnCount(count) doSetStorage(ZE_ZOMBIES_TO_SPAWN, count) end function addZombiesEventBlockEnterPosition() -- remove tp -- remove o TP local item = getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID) if(item.uid ~= 0) then doRemoveItem(item.uid) end --doRemoveItem(getThingFromPos(Castle.desde).uid) --[[ if(getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID).uid == 0) then doCreateItem(ZE_blockEnterItemID, 1, ZE_blockEnterItemPosition) end ]]-- end function removeZombiesEventBlockEnterPosition() -- add tp if(getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID).uid == 0) then --doCreateItem(ZE_blockEnterItemID, 1, ZE_blockEnterItemPosition) local tp = doCreateTeleport(ZE_blockEnterItemID, ZE_enterPosition, ZE_blockEnterItemPosition) doItemSetAttribute(tp, "aid", "5555") end --[[ local item = getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID) if(item.uid ~= 0) then doRemoveItem(item.uid) end ]]-- end function spawnNewZombie() local posx = {} local posy = {} local posz = {} local pir = {} for i=1, 5 do local posx_tmp = math.random(ZE_spawnFromPosition.x ,ZE_spawnToPosition.x) local posy_tmp = math.random(ZE_spawnFromPosition.y ,ZE_spawnToPosition.y) local posz_tmp = math.random(ZE_spawnFromPosition.z ,ZE_spawnToPosition.z) local pir_tmp = 0 local spec = getSpectators({x=posx_tmp, y=posy_tmp, z=posz_tmp}, 3, 3, false) if(spec and #spec > 0) then for z, pid in pairs(spec) do if(isPlayer(pid)) then pir_tmp = pir_tmp + 1 end end end posx[i] = posx_tmp posy[i] = posy_tmp posz[i] = posz_tmp pir[i] = pir_tmp end local lowest_i = 1 for i=2, 5 do if(pir[i] < pir[lowest_i]) then lowest_i = i end end local ret = doCreateMonster("Zombie Event", {x=posx[lowest_i], y=posy[lowest_i], z=posz[lowest_i]}, false) if type(ret) == "number" then addZombiesCount() setGlobalStorageValue(201201051801, ret) end return type(ret) == "number" end \data\movements\scripts\zombie\ onenter.lua
        function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if(not isPlayer(cid)) then return true end if(getPlayerAccess(cid) >= ZE_ACCESS_TO_IGNORE_ARENA) then addPlayerToZombiesArea(cid) elseif(#getZombiesEventPlayers() < getZombiesEventPlayersLimit() and getStorage(ZE_STATUS) == 1) then addPlayerToZombiesArea(cid) local players_on_arena_count = #getZombiesEventPlayers() if(players_on_arena_count == getZombiesEventPlayersLimit()) then addZombiesEventBlockEnterPosition() -- removeTP doSetStorage(ZE_STATUS, 2) doBroadcastMessage("Zombie Arena Event started.") else doBroadcastMessage(getCreatureName(cid) .. " has entered a Zombie Arena. We still need " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players.") end else doTeleportThing(cid, fromPosition, true) addZombiesEventBlockEnterPosition() end return true end \data\talkactions\scripts\zombie\ onsay.lua
        function onSay(cid, words, param, channel) if(getStorage(ZE_STATUS) ~= 2) then local players_on_arena_count = #getZombiesEventPlayers() if(param == 'force') then if(players_on_arena_count > 0) then setZombiesEventPlayersLimit(players_on_arena_count ) addZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 2) doBroadcastMessage("Zombie Arena Event started.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event started.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cannot start Zombies event. There is no players on arena.") end else if(param ~= '' and tonumber(param) > 0) then setZombiesEventPlayersLimit(tonumber(param)) end removeZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Event started.") doPlayerBroadcastMessage(cid, "Zombie Arena Event teleport is opened. We are waiting for " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players to start.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event is already running.") end return true end data\monster\zombie_event.xml
        <monster name="Zombie Event" nameDescription="an event zombie" race="undead" experience="480" speed="170" manacost="0"> <health now="20000" max="20000"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <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="1000" min="-1500" max="-2350"/> </attacks> <defenses armor="0" defense="0"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> <immunity fire="1"/> <immunity energy="1"/> <immunity poison="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <script> <event name="ZombieThink"/> <event name="ZombieDeath"/> </script> <loot> </loot> </monster> Agora as Tags nos xml’s . /data/creaturescripts/creaturescripts.xml
        <event type="think" name="ZombieThink" event="script" value="zombie/onthink.lua"/> <event type="statschange" name="ZombieAttack" event="script" value="zombie/onattack.lua"/> <event type="death" name="ZombieDeath" event="script" value="zombie/ondeath.lua"/> /data/globalevents/globalevents.xml
        <globalevent name="ZombieGlobalThink" interval="5000" event="script" value="zombie/onthink.lua"/> <globalevent name="ZombieGlobalStartup" type="start" event="script" value="zombie/onstartup.lua"/> /data/movements/movements.xml
        <movevent type="StepIn" actionid="5555" event="script" value="zombie/onenter.lua"/> /data/talkactions/talkactions.xml
        <talkaction log="yes" words="/zombiestart" access="4" event="script" value="zombie/onsay.lua"/> /data/monster/monsters.xml
        <monster name="Zombie Event" file="zombie_event.xml"/> Script Terminado ! Next: Tutorial de como configurar o zombie event ! Estarei postando apenas as partes q podem ou devem ser editadas em cada script. data\creaturescripts\scripts\zombiez\onattack.lua
      Next: \data\lib\zombie_event.lua
      Então galera eh isso ai .-. meu primeiro post não mim crucifiquem k Duvidas, reclamações elogios chigamentos u.u só comentar como dizia o mestre o topico ta explicado nos minimos detalhes e ''de forma bem entendida'' (entendedoresentenderam) então eh isso vlw ai a todos q mim ajudaram nisso e nem sabem ?
    • Por samuelbs
      Saudações, Equipe e Membros TibiaKing.    (Caso o assunto não venha ser criado na área correta, mova por favor.)
       
      Venho através deste tópico, apresentar um futuro Ot Server de Narutibia, já está quase pronto, porém preciso de uma pequena equipe, não mais que 3 pessoas, para finalizar-mos juntos, sendo elas:
       
      1 Mapper 1 Spriter 1 Scripter.  
      Quem tiver interessado, preencha este pequeno formulário que estarei entrando em contato com vocês.
       
      Nome:
      Idade:
      Cargo:
      Experiências:
      Contato(Skype, Whatsapp):
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo