Ir para conteúdo
  • Cadastre-se

Posts Recomendados

O @vyctor17 tem razão. Porque o 'talkaction' é desencadeado pela vontade individual, já o 'globalevent' é automático. Por isto a inconsistência da pergunta.

 

Mas o que você queria?  Explica o que você queria que, talvez, possa ser criada uma função diferente.

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites

Obrigado aos 2 pelo esclarecimento, então reformulo minha petição de ajuda nesse caso.

 

 

O meu objetivo é fazer com que o esse script (MOD) execute em tal hora do dia, pois a função que já vem no script não está funcionando...

 

El nao inicia nos dias e horas previsto

days = {
					['Tuesday'] = {'22:00:00'}, 
					['Thursday'] = {'22:00:00'}, 
					['Friday'] = {'22:00:00'}, 
					['Sunday'] = {'22:00:00'}
				},

 

 

Todo o script

 

<?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>

 

Link para o post
Compartilhar em outros sites

Olá, bom dia.

 

A princípio você deveria observar dentro da pasta 'globalevents' um arquivo chamado 'globalevents.xml' e, além dele, uma pasta denominada de 'scripts'.

 

Assim, dentro da pasta 'scripts' você deve inserir o 'script' do segundo bloco deste seu último post (para a explicação abaixo irei usá-lo como 'pikachuevent.lua'). Ao passo que deverá inserir, dentro do 'script' 'global events', o seguinte texto:

<globalevent name="evento_1" time="22:00:00" day="Tuesday" event="script" value="pikachuevent.lua"/>

<globalevent name="evento_2" time="22:00:00" day="Thursday" event="script" value="pikachuevent.lua"/>

<globalevent name="evento_3" time="22:00:00" day="Friday" event="script" value="pikachuevent.lua"/>

<globalevent name="evento_4" time="22:00:00" day="Sunday" event="script" value="pikachuevent.lua"/>

Veja lá se deu certo.

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites

Entao, até ai eu to ciente... mas o script que eu compartilhei ai encima é um MOD. Está tudo no mod entende ? a parte responsavel do inicio na data prevista é esa que vc pode encontrar no script acima...

 

 

days = {
					['Tuesday'] = {'22:00:00'}, 
					['Thursday'] = {'22:00:00'}, 
					['Friday'] = {'22:00:00'}, 
					['Sunday'] = {'22:00:00'}
				},

 

 

 

<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>

 

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 Jaurez
      .
    • Por willian646
      O evento é totalmente baseado no Foxy Quiz proveniente do GLA, no entanto é apenas uma base para vocês alterarem como acharem melhor.
      Para começar será necessario que você crie um arquivo em talkactions>scripts para entrar no evento, como por exemplo : participar.lua
      e entao colocar sua tag em talkactions.xml, como por exemplo: 
      <talkaction words="!participar;/participar" script="!participar.lua"/> Tendo feito isso você irá colar esse codigo dentro desse arquivo: 
      function onSay(cid, words, param)pos = {x=1236, y=1125, z=15} --POSIÇAO QUE O PLAYER IRÁ COM O COMANDO if getGlobalStorageValue(88788) == 1 then doSendMagicEffect(getPlayerPosition(cid),19) doTeleportThing(cid,pos) else doPlayerSendCancel(cid, "Desculpe mas o evento esta fechado !") end return true end Agora iremos para o script principal, vá em global events>scripts e crie o arquivo pokequiz.lua em seguida coloque sua tag em globalevents.xml como por exemplo: 
      <globalevent name="Pokequiz" interval="10" event="script" value="pokequiz.lua"/> Lembrando que o intervalo de inicio do evento é com vcs, Tendo feito isso abra o arquivo e cole o  seguinte código dentro : 
      quizstrg = 88788 local wave = 0 local CPpos = {x=1051, y=1047, z=7} --POSIÇAO QUE O PLAYER IRÁ SE ERRAR function wave_acresc() wave = wave + 1 addEvent(Quiz, 5000) end function Quiz() if wave == 1 then doBroadcastMessage("Na serie pokemon RAYQUAZA possui mega evolucao ?", RED) addEvent(Resposta, 10000) elseif wave == 2 then doBroadcastMessage("Na serie pokemon ARCEUS e considerado um pokemon RARO ?", RED) addEvent(Resposta, 10000) elseif wave == 3 then doBroadcastMessage("Na serie pokemon MEW criou os 3 caes lendarios ?", RED) addEvent(Resposta, 10000) elseif wave == 4 then doBroadcastMessage("Na serie pokemon ARCEUS tem o poder de mudar de tipo livremente ?", RED) addEvent(Resposta, 10000) elseif wave == 5 then doBroadcastMessage("Na serie pokemon GIRATINA possui 2 formas sendo elas alterada e fantasma ?", RED) addEvent(Resposta, 10000) elseif wave == 6 then doBroadcastMessage("Na serie pokemon DIALGA e PALKIA sao rivais ?", RED) addEvent(Resposta, 10000) elseif wave == 7 then doBroadcastMessage("Na serie pokemon CELEBI possui a habilidade de viajar entre dimensoes ?", RED) addEvent(Resposta, 10000) elseif wave == 8 then doBroadcastMessage("Na serie pokemon SOLGALEO e a primeira evolucao de cosmog ?", RED) addEvent(Resposta, 10000) elseif wave == 9 then doBroadcastMessage("Na serie pokemon MAGEARNA e uma das ultra beasts ?", RED) addEvent(Resposta, 10000) elseif wave == 10 then doBroadcastMessage("Na serie pokemon a cor original de MAGEARNA e laranja ?", RED) addEvent(Resposta, 10000) elseif wave == 11 then doBroadcastMessage("O evento Quiz terminou !", RED) addEvent(winPlayers, 5000) end end function Resposta() if wave == 1 then addEvent(TPFalso, 5000) elseif wave == 2 then addEvent(TPVerdadeiro, 5000) elseif wave == 3 then addEvent(TPVerdadeiro, 5000) elseif wave == 4 then addEvent(TPFalso, 5000) elseif wave == 5 then addEvent(TPVerdadeiro, 5000) elseif wave == 6 then addEvent(TPFalso, 5000) elseif wave == 7 then addEvent(TPVerdadeiro, 5000) elseif wave == 8 then addEvent(TPVerdadeiro, 5000) elseif wave == 9 then addEvent(TPVerdadeiro, 5000) elseif wave == 10 then addEvent(TPFalso, 5000) end end function TPFalso() for _, sid in ipairs(getPlayersOnline()) do local posi = {x=1236, y=1122, z=15} local posf = {x=1243, y=1128, z=15} local pos = getPlayerPosition(sid) if isInArea(pos, posi, posf) then doTeleportThing(sid,CPpos) end addEvent(wave_acresc, 5000) end end function TPVerdadeiro() for _, sid in ipairs(getPlayersOnline()) do local posi = {x=1228, y=1122, z=15} local posf = {x=1235, y=1128, z=15} local pos = getPlayerPosition(sid) if isInArea(pos, posi, posf) then doTeleportThing(sid,CPpos) end addEvent(wave_acresc, 5000) end end function winPlayers() for _, sid in ipairs(getPlayersOnline()) do local posi = {x=1228, y=1122, z=15} local posf = {x=1243, y=1128, z=15} local pos = getPlayerPosition(sid) if isInArea(pos, posi, posf) then doTeleportThing(sid,CPpos) doPlayerAddItem(sid,2159, 10) end wave = 0 setGlobalStorageValue(88788, 0) end end --AVISOS DE INICIO function finalEventWarning() if getGlobalStorageValue(quizstrg) == 1 then setGlobalStorageValue(88788, 2) doBroadcastMessage("O evento Quiz fechou, a primeira pergunta surgira em 30 segundos.", RED) addEvent(wave_acresc, 30000) end end function secondEventWarning() if getGlobalStorageValue(quizstrg) == 1 then doBroadcastMessage("O evento Quiz ira iniciar em 1 minuto, usem o comando !participar ou /participar.", RED) addEvent(finalEventWarning, 60000) end end function firstEventWarning() if getGlobalStorageValue(quizstrg) == 1 then doBroadcastMessage("O evento Quiz ira iniciar em 3 minutos, usem o comando !participar ou /participar.", RED) addEvent(secondEventWarning, 120000) end end function onThink(interval, lastExecution) if getGlobalStorageValue(quizstrg) == 0 then setGlobalStorageValue(88788, 1) doBroadcastMessage("O evento Quiz ira iniciar em 5 minutos, usem o comando !participar ou /participar.", RED) addEvent(firstEventWarning, 120000) end return true end Já ia me esquecendo, a unica coisa ao qual vocês devem mudar de acordo com as coordenadas do seu mapa e área do evento são as funções TPVerdadeiro , TPFalso, winPlayers , elas servem para indicar qual área é a errada e teleportar quem tiver nessa área pro cp, caso o lado errado seja o esquerdo então será usado a função  TPVerdadeiro, e é a msm coisa para o outro lado, no caso da winPlayers é toda a área do evento.
       
      Aqui vai um exemplo: 
       
      E é isso rapaziada, não sei se já possui algum evento parecido por essas bandas, mas eu não encontrei ,então fiz  e resolvi contribuir com a comunidade, peço que se for repostar em algum outro lugar dê os devidos créditos, obg e até a próxima.
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por Sphynx1
      Olá comunidade.
      Eu criei um script a madrugada passada para tentar ajudar um amigo que usa 'OTX' porém dá um erro bizarro no 'lib/compat.lua' e a função 'doAddPlayerOutfit' retorna valor 'NIL'. Eu não sei como resolver, mas está funcionando perfeitamente no 'TFS 0.4'. Espero que alguém em algum lugar do tempoespaço possa se beneficiar desse script já que os que encontrei estão todos muito feios e confusos.

      1. Acesse a pasta 'data/talkactions/scripts' e crie um novo 'arquivo.lua' chamado 'addonpresent.lua', dentro adicione o conteúdo abaixo.
      function onSay(cid, words, param, channel) local maleOutfits = {["citizen"] = {128}, ["mage"] = {130}, ["knight"] = {131}, ["nobleman"] = {132}, ["summoner"] = {133}, ["warrior"] = {134} } local femaleOutfits = {["citizen"] = {136}, ["mage"] = {138}, ["knight"] = {139}, ["nobleman"] = {140}, ["summoner"] = {141}, ["warrior"] = {142} } local mensagens = {"Você recebeu o seu addon e consumiu o item bônus para isto.", "Verifique o que você digitou e tente novamente, parametros inválidos.", "Você não possui o item necessário para receber um addon.", "Certifique-se que você digitou o nome do addon corretamente e tente mais uma vez."} local efeitinga = {[1] = {name = CONST_ME_POFF}, [2] = {name = CONST_ME_CAKE}, [3] = {name = CONST_ME_HEARTS}, [4] = {name = CONST_ME_GIFT_WRAPS} -- efeitos que seram exibidos } local param = string.lower(param) if not isPremium(cid) then doCreatureSay(cid, "Você não possui Premium Account, portanto não poderá utilizar o item de addon.", TALKTYPE_ORANGE_1) -- MSG que será exibida p/ o nao premium return true end if getPlayerItemCount(cid, 6497) > 0 then -- 6497 é o ID do item que será usado por você, se for maior que 0 a quanidade na sua bag então if param ~= "" and maleOutfits[param] and femaleOutfits[param] then doPlayerRemoveItem(cid, 6497, 1) -- o item 6497 será consumido doCreatureSay(cid, mensagens[1], TALKTYPE_ORANGE_1) for k, v in pairs(efeitinga) do doSendMagicEffect(getCreaturePosition(cid), v.name) end if getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, femaleOutfits[param][1], 3) elseif getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, maleOutfits[param][1], 3) end else doCreatureSay(cid, mensagens[2], TALKTYPE_ORANGE_1) end else doCreatureSay(cid, mensagens[3], TALKTYPE_ORANGE_1) end return true end  
      2. Regresse até 'data/talkactions' e abra o arquivo 'talkactions.xml', dentro adicione o conteúdo abaixo.
      <talkaction words="!addon" event="script" value="addonpresent.lua"/>  
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo