15

2 scriptes (hiper faceis)

Por 1579091, 03 de jan. de 2013 em Archived

pedido
script
9
671
15790911
03 de janeiro de 2013 às 01:05

1- Ao pisar no tile receber um item..

 

2- Ao atingir level 55, ser teleportado automaticamente para o templo.

 

Rapidex!

fodimF
03 de janeiro de 2013 às 01:12

Bom eu fiz so q nao testei o do tile tenta ae

tileitem.lua:

function onStepIn(cid, item, position, fromPosition)

doPlayerAddItem(cid,id,quantidade)

end

movements.xml

<movevent type="StepIn" actionid="19456" event="script" value="itemtile.lua"/>

 

edite conforme seu server

Editado Janeiro 3 por Fodim

KyoshiK
03 de janeiro de 2013 às 01:20
function onAdvance(cid, oldLevel, newLevel)

local tempo = 15 -- Tempo em segundos

local level = 55 -- Level

 

if newLevel == level then

addEvent(doTeleportThing, tempo*1000, cid, getTownTemplePosition(getPlayerTown(cid))

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você atingiu o level "..newLevel..". Você será mandado para o templo em "..tempo.." segundos.")

end

return true

end

 

Tempo = Tempo em segundos para o player ser teleportado para o templo.

 

 

 

Créditos: LuckOake

Editado Janeiro 3 por Kyoshi

15790911
03 de janeiro de 2013 às 01:20

Kyoshi o seu bugo (a formatação aki no forum)

Editado Janeiro 3 por GuizitoG

fodimF
03 de janeiro de 2013 às 01:21

Kyoshi, o code nao tem suporte de cor

KyoshiK
03 de janeiro de 2013 às 01:25

Mas eu não tinha posto cores e mesmo assim bugou, deixei em quote mesmo.

SkymagnumS
03 de janeiro de 2013 às 01:57

function onAdvance(cid, skill, oldLevel, newLevel)

local toPos = {x = x, y = y, z = z}

if skill == 8 then
  if newLevel == 55 then
	   if getPlayerStorageValue(cid, 367221) < 1 then
			   addEvent(doTeleportThing, 2 * 1000, cid, toPos)
					   doPlayerSendTextMessage(cid, 27, "You advanced to level 55 and now has been teleported.")
							  setPlayerStorageValue(cid, 367221, 1)
							 end
					  end
			   end
  return true
end

tag:

<event type="advance" name="advanceLev" event="script" value="nome_do_script.lua"/>

 

login.lua

registerCreatureEvent(cid, "advanceLev")

 

 


function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

local itemId, quant = 2160, 10

if isPlayer(cid) then
if getPlayerStorageValue(cid, 327116) < 0 then
	  doPlayerAddItem(cid, itemId, quant)
		  doPlayerSendTextMessage(cid, 27, "You win " .. quant .. "x " .. getItemNameById(itemId) .. ".")
			 setPlayerStorageValue(cid, 327116, 1)
			 end
		end
return true
end

 

<movevent type="StepIn" actionid="X" event="script" value="nome_do_script.lua"/>

Editado Janeiro 3 por Skymagnum

15790911
03 de janeiro de 2013 às 02:36

sky, passa as tags... e poe pra teleportar por posição (no primeiro), porque n eh exatamente no templo que quero.

SkymagnumS
03 de janeiro de 2013 às 02:43

Pronto.

 

 

AFF BUGO TODA IDENTAÇÃO