Ir para conteúdo

Featured Replies

Postado

stoonkill.lua (data\creaturescripts\scripts):

local monster = 'Demon' -- Monster

function onKill(player, creature)

	if isPlayer(player) and isMonster(creature) and getCreatureName(creature):lower() == monster:lower() and getPlayerGuildId(player) ~= 0 and getGlobalStorageValue(getPlayerGuildId(player)) < 1 then
		setGlobalStorageValue(getPlayerGuildId(player), 1)
	end

	return true
end

function onLogin(player)

	registerCreatureEvent(player, 'stoOnKill')

	return true
end

Tag - creaturescripts.xml (data\creaturescripts\scripts):

<event type="kill" name="stoOnKill" event="script" value="stoonkill.lua"/>
<event type="login" name="verf_stoOnKill" event="script" value="stoonkill.lua"/>

stoMovements.lua (data\movements\scripts):

function onStepIn(player, item, position, fromPosition)

	if not getGlobalStorageValue(getPlayerGuildId(player)) == 1 then
		doTeleportThing(player, fromPosition)
	end

	return true
end
 
Tag - movements.xml (data\movements\scripts):
 
<movevent type="StepIn" actionid="7771" event="script" value="stoMovements.lua"/>

Lembre-se de colocar ACTIONID 7771 no piso pelo RME.

 

 

 

 

Vou dar uma editada* vlw luanluciano93

e demorei um pouco para entender mais entendi  :P (eu acho  -.-)


function onKill(cid, target, lastHit)
if not (isPlayer(cid) and isMonster(target)) then
   return true
end
local name = 'MONSTER'
if getCreatureName(target, name) == false then
  return true
end
local storage = 34242
if getPlayerGuildName(cid) == getGlobalStorageValue(storage, 1) then
return true
end
local guild = getPlayerGuildName(cid)
setGlobalStorageValue(34242, guild)
return true
end

 

 

seu script ficaria bem melhor assim :

local name = 'MONSTER'

function onKill(cid, target, lastHit)

	if not isPlayer(cid) and isMonster(target) then
   		return true
	end

	if getCreatureName(target):lower() == name:lower() then -- :lower() serve pra tranformar a string em letra minuscula ...
		local guild = getPlayerGuildName(cid)
		setGlobalStorageValue(guild, 1)
	end

	return true
end

ai pra verificar no stepin :

              if not getGlobalStorageValue(getPlayerGuildName(cid)) == 1 then
                     doTeleportThing(cid, fromPosition)
              end
 
 

 

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

I must not fear. Fear is the mind killer.

  • Respostas 13
  • Visualizações 1.8k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    @Vinicius Xxgamexx,  setGlobalStorageValue(cid, guild, tab[getCreatureName(target)], 1) WHAT?    <movevent type="StepOut" actionid="23424" event="script" value="exclusiveguild.lua"/> PARA

  • Tem certeza que dá pra usar setGlobalStorageValue assim? Não seria assim: setGlobalStorageValue(34242, guild) No script de movement: if getGlobalStorageValue(cid,storage) == getPlayerGuildName(cid

  • stoonkill.lua (data\creaturescripts\scripts): local monster = 'Demon' -- Monster function onKill(player, creature) if isPlayer(player) and isMonster(creature) and getCreatureName(creature):lower(

Postado
  • Autor

 

 

Tag - movements.xml (data\movements\scripts):
 
<movevent type="StepIn" actionid="7771" event="script" value="stoMovements.lua"/>

Lembre-se de colocar ACTIONID 7771 no piso pelo RME.

 

 

 

 

Fiquei meio confuso com a action, onde devo colocar ?

                                                       “Enquanto nos derem ao menos 1% de chance, seguiremos lutando.

                                                     E venceremos! Esse é o verdadeiro e único Clube da Fé! Vai São Paulo!”

                                                                                       spfc.png

Postado

Fiquei meio confuso com a action, onde devo colocar ?

 

Lembre-se de colocar ACTIONID 7771 no piso pelo RME.

 

 

no piso pelo RME (REMERES MAP EDITOR)

I must not fear. Fear is the mind killer.

Postado
  • Autor

Lembre-se de colocar ACTIONID 7771 no piso pelo RME.

 

 

no piso pelo RME (REMERES MAP EDITOR)

cara , o movements não esta pegando, não da nenhum erro no distro, somente nao impede do player de outra guild entre na area de quem matou o monstro (guild).

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

                                                       “Enquanto nos derem ao menos 1% de chance, seguiremos lutando.

                                                     E venceremos! Esse é o verdadeiro e único Clube da Fé! Vai São Paulo!”

                                                                                       spfc.png

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.8k

Informação Importante

Confirmação de Termo