Ir para conteúdo

Posts Recomendados

Bom, fiz uma pequena edição no Sistema de Checkpoints v1.0 e coloquei um mod pra otclient.

lILteVz.png


Simples de instalar...

No Servidor


Na pasta mods de seu servidor, crie um arquivo chamado Checkpoint.xml e adicione o seguinte código

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Checkpoint" version="1.1" author="Caronte & Hopus" enabled="yes">
	<talkaction log="no" access="0" words="/checkpoint" event="script"><![CDATA[
		local parceiro = true -- false vai tirar o teleporte que o player deixa de rastro
		local tempo = 24*60*60 -- 24 h em segundos

		function onSay(cid, words, param)
			local cidpos = getThingPos(cid)
			if not getTileInfo(cidpos).protection then
				return  doPlayerSendCancel(cid,"You need stay in a protect zone ( PZ ).")
			end 
			if param == 'save'
				if not(tonumber(getPlayerStorageValue(cid,"Checkpoint"))) then
					doPlayerSendTextMessage(cid, 27, "You already saved a checkpoint.")
				end
				setPlayerStorageValue(cid,"Checkpoint", "{x = "..cidpos.x..", y = "..cidpos.y..", z = "..cidpos.z..", stackpos = "..cidpos.stackpos.."}")  
				doPlayerSendTextMessage(cid, 27, "You put a checkpoint here.")
				doSendMagicEffect(cidpos, 9)
			elseif param == "go" then
				if(tonumber(getPlayerStorageValue(cid,"Checkpoint"))) then
					doPlayerSendTextMessage(cid, 27, "You haven't saved a checkpoint.")
				else
					local str = "return "..getPlayerStorageValue(cid, "Checkpoint")
					local pos = loadstring(str)()

					if not (tonumber(getPlayerStorageValue(cid,"Checkpoint"))) and getCreatureStorage(cid, 10001) - os.time() < 0 then
						setPlayerStorageValue(cid,10001, os.time() + tempo)
					else 
						return doPlayerSendCancel(cid,"You can't do this now, please wait " .. getCreatureStorage(cid, 10001) - os.time() .." seconds.") 
					end
					doTeleportThing(cid, pos, TRUE)
					if "{x = "..cidpos.x..", y = "..cidpos.y..", z = "..cidpos.z..", stackpos = "..cidpos.stackpos.."}" == "{x = "..pos.x..", y = "..pos.y..", z = "..pos.z..", stackpos = "..pos.stackpos.."}" then	
						return doPlayerSendCancel(cid,"You can't do this, please choose another position to come back") and doSendMagicEffect(cidpos, 2)
					end
					if parceiro then 
						doCreateTeleport(1387, pos, cidpos)
						doSendAnimatedText(cidpos, "Removing", 221)
						local t = { [500] = "in", 
							[1000] = "3",
							[1500] = "2",
							[2000] = "1",
						}
						for q, w in pairs(t) do
							addEvent(doSendAnimatedText,q,cidpos, w, 221)
						end
						addEvent(function()
									doRemoveItem(getTileItemById(cidpos, 1387).uid)
									doSendMagicEffect(cidpos, 2)
								end,2700)
					end
					doCreatureSay(cid, "You reached your destiny.", MESSAGE_EVENT_ORANGE)
					doPlayerSendTextMessage(cid, 27, "You reached your destiny.")
					setPlayerStorageValue(cid,"Checkpoint", 0) 
					doSendMagicEffect(cidpos, 67)
				end
			end
			return true
		end
	]]></talkaction>
</mod>

 

No Client

1. Faça o download do arquivo;
.
2. Extraia os arquivos na pasta mods do seu CLIENT;


Créditos
[member=Caronte] ~ pela ideia e pelo desenvolvimento do sistema
[member=david0703] ~ pelo mod no OTC.



DOWNLOAD
SCAN

Editado por david0703
Link para o comentário
Compartilhar em outros sites

  • 5 years later...
Em 03/05/2015 em 16:20, david0703 disse:

Bom, fiz uma pequena edição no Sistema de Checkpoints v1.0 e coloquei um mod pra otclient.

lILteVz.png

 

 

 


Simples de instalar...

No Servidor


Na pasta mods de seu servidor, crie um arquivo chamado Checkpoint.xml e adicione o seguinte código

 

  Ocultar conteúdo

 



<?xml version="1.0" encoding="UTF-8"?>
<mod name="Checkpoint" version="1.1" author="Caronte & Hopus" enabled="yes">
	<talkaction log="no" access="0" words="/checkpoint" event="script"><![CDATA[
		local parceiro = true -- false vai tirar o teleporte que o player deixa de rastro
		local tempo = 24*60*60 -- 24 h em segundos

		function onSay(cid, words, param)
			local cidpos = getThingPos(cid)
			if not getTileInfo(cidpos).protection then
				return  doPlayerSendCancel(cid,"You need stay in a protect zone ( PZ ).")
			end 
			if param == 'save'
				if not(tonumber(getPlayerStorageValue(cid,"Checkpoint"))) then
					doPlayerSendTextMessage(cid, 27, "You already saved a checkpoint.")
				end
				setPlayerStorageValue(cid,"Checkpoint", "{x = "..cidpos.x..", y = "..cidpos.y..", z = "..cidpos.z..", stackpos = "..cidpos.stackpos.."}")  
				doPlayerSendTextMessage(cid, 27, "You put a checkpoint here.")
				doSendMagicEffect(cidpos, 9)
			elseif param == "go" then
				if(tonumber(getPlayerStorageValue(cid,"Checkpoint"))) then
					doPlayerSendTextMessage(cid, 27, "You haven't saved a checkpoint.")
				else
					local str = "return "..getPlayerStorageValue(cid, "Checkpoint")
					local pos = loadstring(str)()

					if not (tonumber(getPlayerStorageValue(cid,"Checkpoint"))) and getCreatureStorage(cid, 10001) - os.time() < 0 then
						setPlayerStorageValue(cid,10001, os.time() + tempo)
					else 
						return doPlayerSendCancel(cid,"You can't do this now, please wait " .. getCreatureStorage(cid, 10001) - os.time() .." seconds.") 
					end
					doTeleportThing(cid, pos, TRUE)
					if "{x = "..cidpos.x..", y = "..cidpos.y..", z = "..cidpos.z..", stackpos = "..cidpos.stackpos.."}" == "{x = "..pos.x..", y = "..pos.y..", z = "..pos.z..", stackpos = "..pos.stackpos.."}" then	
						return doPlayerSendCancel(cid,"You can't do this, please choose another position to come back") and doSendMagicEffect(cidpos, 2)
					end
					if parceiro then 
						doCreateTeleport(1387, pos, cidpos)
						doSendAnimatedText(cidpos, "Removing", 221)
						local t = { [500] = "in", 
							[1000] = "3",
							[1500] = "2",
							[2000] = "1",
						}
						for q, w in pairs(t) do
							addEvent(doSendAnimatedText,q,cidpos, w, 221)
						end
						addEvent(function()
									doRemoveItem(getTileItemById(cidpos, 1387).uid)
									doSendMagicEffect(cidpos, 2)
								end,2700)
					end
					doCreatureSay(cid, "You reached your destiny.", MESSAGE_EVENT_ORANGE)
					doPlayerSendTextMessage(cid, 27, "You reached your destiny.")
					setPlayerStorageValue(cid,"Checkpoint", 0) 
					doSendMagicEffect(cidpos, 67)
				end
			end
			return true
		end
	]]></talkaction>
</mod>

 

 

 

No Client

 

1. Faça o download do arquivo;
.
2. Extraia os arquivos na pasta mods do seu CLIENT;


Créditos
[member=Caronte] ~ pela ideia e pelo desenvolvimento do sistema
[member=david0703] ~ pelo mod no OTC.

 


DOWNLOAD
SCAN

 

 

OtClient Nao Tenhe Pasta MOD..

 

 

a base ¨PDA d error..

 

[07/06/2020 12:13:44] > Loading Checkpoint.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/Checkpoint.xml
[07/06/2020 12:13:44] Line: 2, Info: xmlParseEntityRef: no name

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...