Ir para conteúdo
  • Cadastre-se

Posts Recomendados

  • 3 months later...
  • Respostas 42
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hello nação TK, de um tempo pra cá eu e o membro ViitinG resolvemos trabalhar em cima de um novo evento para vocês, é o FireStorm event!   Eu vim trabalhando no script do evento em MODS e o Victor n

Desculpa reviver o tópico, mas tenho o mesmo problema.   Cheio de erros para OT 8.6 Rev 3777 ... CONSEGUI RESOLVER ! PARA QUEM QUER O MOD PARA OT 8.6 AQUI ESTÁ:  

Posted Images

Ja que vazou está ai o Script 100%

 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Fire_Storm_Event" version="3.0" author="CollocorpuseK" contact="otland.net" enabled="yes">

	<config name="config_fire_storm_event">
		<![CDATA[
			configFireStormEvent = {
				storages = {
					main = 'fireStormEventMain', -- set free storage
					player = 'fireStormEventPlayer', -- set free storage
					joining = 'fireStormEventJoining', -- set free storage
					exhaust = 'fireStormEventExhaust', -- set free storage
					countEvent = 'fireStormEventCountEvent' -- set free storage
				},
				
				position = {x=890 ,y=993,z=7}, -- posiotion to which player is teleporting
				room = {
					from = {x=736,y=933,z=7}, -- left top corner of event room
					to = {x=781,y=955,z=7} -- right bottom corner of event room
				},

				rewards = {8858, 2346, 2538, 2437}, -- reward id which player can win (reward is random)
				players = {
					max = 50,
					min = 9,
					minLevel = 100
				},

				days = {
					['Tuesday'] = {'19:59:20'}, 
					['Thursday'] = {'19:59:20'}, 
					['Sunday'] = {'19:59:20'}
				},

				fireStormDelay = 1000, -- milisecond
				
				delayTime = 5.0, -- time in which players who joined to event are teleporting to teleport position
				startEvent = 1, -- time from teleport to start event
				text = '-PL-\nAby wygrac i otrzymac nagrode, utrzymaj sie jak najdluzej na arenie.\n\n-ENG-\nTo win and get a Rewards, to stay as long as possible in the arena.'
			}

			y, x = 1, 1 -- don't change it
		]]>
	</config>
	
	<lib name="lib_fire_storm_event">
		<![CDATA[
			function doStartFireStormEvent()
				doSetStorage(configFireStormEvent.storages.joining, -1)
				
				if configFireStormEvent.players.min <= doCountPlayersFireStormEvent() then		
					for _, cid in ipairs(getPlayersOnline()) do
						if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
							doCreatureSetNoMove(cid, false)
							doRemoveCondition(cid, CONDITION_INFIGHT)
							doTeleportThing(cid, configFireStormEvent.position)
							doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
							
							doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Get ready. Fire Storm Event start in '..configFireStormEvent.startEvent..' seconds.')
						end
					end
					
					addEvent(doSetStorage, configFireStormEvent.startEvent * 1000, configFireStormEvent.storages.main, 1)
					addEvent(doRepeatCheckFireStorm, configFireStormEvent.startEvent * 1000 + 2000)
					
					doBroadcastMessage('Fire Storm Event has started. LET\'S GO!')
				else
					for _, cid in ipairs(getPlayersOnline()) do
						if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
							doCreatureSetNoMove(cid, false)
							doRemoveCondition(cid, CONDITION_INFIGHT)
						end
					end
					
					doBroadcastMessage('Fire Storm hasn\'t started beacuse there were not enough players.')
				end
			end
			
			function doRepeatCheckFireStorm()
				if getStorage(configFireStormEvent.storages.main) > 0 then
					local xTable, yTable, playerTable = {}, {}, {}

					for x = configFireStormEvent.room.from.x, configFireStormEvent.room.to.x do
						for y = configFireStormEvent.room.from.y, configFireStormEvent.room.to.y do
							table.insert(xTable, x)
							table.insert(yTable, y)

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

					if #playerTable == 1 then
						local prize = math.random(#configFireStormEvent.rewards)
						doCreatureAddHealth(playerTable[1], getCreatureMaxHealth(playerTable[1]) - getCreatureHealth(playerTable[1]))
						doCreatureAddMana(playerTable[1], getCreatureMaxMana(playerTable[1]) - getCreatureMana(playerTable[1]))
						doTeleportThing(playerTable[1], getTownTemplePosition(getPlayerTown(playerTable[1])), true)
						doPlayerAddItem(playerTable[1], configFireStormEvent.rewards[prize], 1)
						doPlayerSendTextMessage(playerTable[1], MESSAGE_EVENT_ADVANCE, 'You win! You have received ' .. getItemNameById(configFireStormEvent.rewards[prize]) .. ' as reward.')
						doBroadcastMessage('Fire Storm Event has finished. The winner is ' .. getCreatureName(playerTable[1]) .. '. Congratulations.')
						doSetStorage(configFireStormEvent.storages.main, -1)
						
						db.query("INSERT INTO `events` (`event_name`, `winner_name`, `won_item`, `time_win`) VALUES (\"Fire\", \"" .. getCreatureName(playerTable[1]) .. "\", \"" .. getItemNameById(configFireStormEvent.rewards[prize]) .. "\", " .. getStorage(configFireStormEvent.storages.countEvent) ..");")
						doSetStorage(configFireStormEvent.storages.countEvent, getStorage(configFireStormEvent.storages.countEvent) + 1)
						
						x, y = 1, 1
					elseif #playerTable > 1 then
						for a = 1, y do
							addEvent(
								function()
									local pos = {x=xTable[math.random(#xTable)], y=yTable[math.random(#yTable)], z=7}

									for _, player in ipairs(playerTable) do
										local pPos = getThingPos(player)
										if pPos.x == pos.x and pPos.y == pos.y and pPos.z == pos.z then
											doCreatureAddHealth(player, - getCreatureMaxHealth(player))
										end
									end
									doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE)

									addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE)
									addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA)
								end,
								math.random(100,1000)
							)
						end
						if x == 5 * y then
							y = y + 1
						end
						
						x = x + 1
					else
						doBroadcastMessage('No one have won in Fire Storm Event.')
						doSetStorage(configFireStormEvent.storages.main, -1)						
						doSetStorage(configFireStormEvent.storages.countEvent, getStorage(configFireStormEvent.storages.countEvent) + 1)
						x, y = 1, 1
					end
					
					addEvent(doRepeatCheckFireStorm, configFireStormEvent.fireStormDelay)
				end
			end
			
			function doCountPlayersFireStormEvent()
				local x = 0
				for _, cid in ipairs(getPlayersOnline()) do
					if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
						x = x + 1
					end
				end
				return x
			end
			
			function doStartCountingFireStormEvent(x)
				if configFireStormEvent.delayTime-x > 0 then
					doBroadcastMessage('Fire Storm Event will start in '..configFireStormEvent.delayTime-x..' minutes. You can join to the event by say "!fire join".')
					addEvent(doStartCountingFireStormEvent, 60*1000, x+1)
				end
			end
		]]>
	</lib>

	<talkaction words="!fire" event="script">
		<![CDATA[
			domodlib("config_fire_storm_event")

			function onSay(cid, words, param)
				if getStorage(configFireStormEvent.storages.joining) ~= 1 then
					return doPlayerSendCancel(cid, 'Fire Storm Event hasn\'t started yet.')
				elseif param == '' then
					return doPlayerSendCancel(cid, 'Command param required (say: "!fire join" or "!fire leave.").')
				elseif getPlayerLevel(cid) < configFireStormEvent.players.minLevel then
					return doPlayerSendCancel(cid, 'You can\'t join to the event if you don\'t have a require '..configFireStormEvent.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, configFireStormEvent.storages.exhaust) ~= false then
					return doPlayerSendCancel(cid, 'You must wait '..exhaustion.get(cid, configFireStormEvent.storages.exhaust)..' seconds to use this command again.')
				end

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

			function onSay(cid, words, param)
				if getStorage(configFireStormEvent.storages.main) > 0 then
					return doPlayerSendCancel(cid, 'Fire Storm Event is already running.')
				end
			
				doStartCountingFireStormEvent(0)
				
				for _, pid in ipairs(getPlayersOnline()) do
					if getCreatureStorage(pid, configFireStormEvent.storages.player) > 0 then
						doCreatureSetStorage(pid, configFireStormEvent.storages.player, -1)
						doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
					end
				end
				
				doSetStorage(configFireStormEvent.storages.joining, 1)
				addEvent(doStartFireStormEvent, configFireStormEvent.delayTime * 60 * 1000)
				return true
			end
		]]>
	</talkaction>

	<globalevent name="Fire_Storm_Event_Days" interval="1000" event="script">
		<![CDATA[
			domodlib("config_fire_storm_event")
			domodlib("lib_fire_storm_event")

			local daysOpen = {}			
			for k, v in pairs(configFireStormEvent.days) do
				table.insert(daysOpen, k)
			end
			
			function onThink(interval)
				if isInArray(daysOpen, os.date('%A')) then
					if isInArray(configFireStormEvent.days[os.date('%A')], os.date('%X', os.time())) then
						if getStorage(configFireStormEvent.storages.joining) ~= 1 then
							doStartCountingFireStormEvent(0)
							
							for _, pid in ipairs(getPlayersOnline()) do
								if getCreatureStorage(pid, configFireStormEvent.storages.player) > 0 then
									doCreatureSetStorage(pid, configFireStormEvent.storages.player, -1)
									doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
								end
							end
							
							doSetStorage(configFireStormEvent.storages.joining, 1)
							addEvent(doStartFireStormEvent, configFireStormEvent.delayTime * 60 * 1000)
						end
					end
				end
				return true
			end
		]]>
	</globalevent>

	<event type="statschange" name="Fire_Storm_Event_Dead" event="script">
		<![CDATA[
			domodlib("config_fire_storm_event")

			function onStatsChange(cid, attacker, type, combat, value)
				if type == 1 and getCreatureHealth(cid) <= value then
					if isInRange(getThingPos(cid), configFireStormEvent.room.from, configFireStormEvent.room.to) 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.')
						return false
					end
				end
				return true
			end
		]]>
	</event>
	
	<event type="login" name="Fire_Storm_Event_Login" event="script">
		<![CDATA[
			domodlib("config_fire_storm_event")
		
			function onLogin(cid)
				if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
					doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
					doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
					doCreatureSetNoMove(cid, false)
					doRemoveCondition(cid, CONDITION_INFIGHT)
				end

				registerCreatureEvent(cid, 'Fire_Storm_Event_Dead')
				return true
			end
		]]>
	</event>
	
	<globalevent name="Fire_Storm_Event_Start" type="startup" event="script">
		<![CDATA[
			domodlib("config_fire_storm_event")

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

 

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

o comando da talkaction ta bugado tbm ....

ta dando isso quando vai abrir o ot... essa posição aonde importei o mapa, ja peguei os arquivo items.otb ja copiei pro rme e etc não da =.=

> FATAL: OTBM Loader - [x:1314, y:1786, z:7] Failed to create item.
 

Editado por OtFunEX (veja o histórico de edições)

OT PURA DIVERSÃO | IP: otfun.servegame.com | 8.60 | Port: 7171

 

1584817_1.png

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 Thiagodsw
      Olá galera do Tibia King !
      Venho por meio deste tópico, publicar a ultima versão do meu servidor derivado de Tibia NTO Battle.
       
      deixei para brincarem e verem sistemas, as sources não disponibilizarei nem o site. afinal é um projeto que fiz com carinho e está a venda as sources. Thogo#9713
       
      O que tem de diferente no NTO Battle ? 
       
      Aura System e Wings Healthbar Monster Bar Healthbar vocation Sistema Raridade Shaders Dungeons e Tasks Game Shop Entre outros Veja algumas Imagens !
       
       
      O que tem nesse Pacote de Arquivos NTO Battle? 
       
      Datapack mais recente e completa do servidor. ( compilada pra windows Client Compilado SQL
      ACC GOD - god/god


      QUALQUER MSG NO DISCORD Thogo#9713
      -source client e otserv e site.
       
      DOWNLOAD  &  SCAN


       
      Client:
      https://mega.nz/file/hbgnSDRJ#xQT-qQHWLUV2Dn8jalwMGblCWnmL0_s3rZfqbxO7znw
      Server:
      https://mega.nz/file/sSZXlZ6a#gow-Db6diNVrnnPIH7qyBqP8WmVLFxWy85-yub_f32Y


       
      Scan
      Client
      https://www.virustotal.com/gui/file/86da72135d75d826c2665bb572084c30288eea843c2cfe2f7a405cfe1ea2f59c/detection
      Servidor
      https://www.virustotal.com/gui/file/cfa4d83c8b6c12fa0daf28cefd6762a053aee7245e6be8f5c02594825a2e2c1e?nocache=1
    • Por Ocrux
      Procuro equipe pra abrir um OT Rookgaard. 
      To terminando o mapa, acho que ta bonito e pouco grandinho.
       
      RookSmart
      Continente único, na base de Rookgaard & com cidades de referencias as do Tibia.
      Por hora tem 4 cidades Prontas: Rookgaard, Carlore, Liadahar e Akuahmun.
      Estou terminando a 5ª cidade: Dahlia (de gelo) & já to achando uma boa ideia colocar Roshamuul (já providenciei).
      O servidor ta em TFS 0.4, com sources & na versão 8.6 (creio eu que parado no tempo).
       
      Quem quiser formar uma equipe pra botar on & terminar o que falta, whatsapp: 15 935001689

      Mapa Mundi
       
       
    • Por Fir3element
      Reporte qualquer bug encontrado.
       
      - Mudanças:
      * opcode adicionado
      * Monstros andando em cima de corpos
      * War system arrumado
      * Anti-divulgação melhorado
      * Cast system arrumado
      * Crash bugs arrumados
      * Adicionado exhaust ao comprar/vender items
      * Account manager com opção para cidades
      * /ghost stacking arrumado
      * !disband arrumado
      * Erros no linux arrumado
      * Aleta som arrumado
      * Bug nos rings arrumado
      * Adicionado suporte para Visual Studio
      * Remover battle ao entrar em PZ
      * Não pode jogar lixo em casas
      * Salt removido
       
      - Downloads:
      * Distro (x32): https://github.com/Fir3element/binaries/raw/master/x32-windows.zip
      * Distro (x64): https://github.com/Fir3element/binaries/raw/master/x64-windows.zip
      * Requisitos: Microsoft Visual C++ Redistributable Package
      * Source + datapack: https://github.com/Fir3element/3777/archive/refs/heads/main.zip
       
      - Scans:
      * Distro (x32): https://virustotal.com/pt/file/6683a91273b848a39ac21288da9d3abde341436744d6846e35a477c8e7c8f5f7/analysis/1480675335/
      * Distro (x64): https://virustotal.com/pt/file/21028857bb1124f19e0353e7f5775c8f66afc4f87f29df9cf4ab8ca1a046b816/analysis/1480675394/
      * Source + datapack: https://virustotal.com/pt/file/3761b48ee19f3f540d4c4a48c35c73c89a85615876307073494b1dcfed464d36/analysis/1480675473/
    • Por rhuandiego21
      Boa tarde galera tudo joia ?
      Estou abrindo um server 8.6, so que ja fiz de tudo para deixar ele on, so que nao abre pros outros de jeito nenhum, ja abri as portas no moldem, e no pc, alguem me ajuda por favor obrigado 
    • Por Morg
      Wake Baiak [8.6]
       
                                                                                        
       
      • Versão 8.6 • Exp 99999x • Rolate Donate • Cidade Modificada Para PVP • Addons por alavanca • Autoloot System • Alguns Eventos • Old Dodge And Critical • Quests Exclusivias • Monstros editados • Vip 1 And 2 • Baixei e descubra mais...  
       
      O servidor Foi testado em OTX.
      Não Estarei dando suporte pois não sou o desenvolvedor do Otserver, Apenas estou disponibilizando caso alguém queira usar em algum projeto.
       
       
                                                                                           
                                                                                                                                                             Imagens
       
                                                                                                                            
       
                                                                                                                            
       
       
                                                                                                                            
       
       
                                                                                                                            
       
       
                                                                                                                            
       
                                                                                              
       
      • A DataPack é um pouco antiga então pode estar desatualizada comparada aos servidores atuais, no momento não estou com tempo pra atualizar mas futuramente quem sabe. • O servidor pode conter alguns bugs então aconselho a testar muito bem pois eu nunca coloquei esse servidor on para um grande publico. • Em breve estarei disponibilizando o WebSite para vocês. • Provavelmente estarei disponibilizando tambem psd para crianção de social midia. • Será um de varios topicos que irei trazer para o forum.  
      Creditos: WakeBaiak Por criar o datapack e @Morg Por estar disponibilizando.
                                                                                              
                                                                                                                   DOWNLOAD   /   ScanVirus
       
       
       



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo