Ir para conteúdo
  • 0

[Pedido] Valendo Rep+


Pergunta

Bem eu presiso que esse item vire um amuleto

<item id="2353" article="a" name="burning heart">
 <attribute key="description" value="It is still beating with unholy life. It seems to be rotting rapidly." />
 <attribute key="weight" value="400" />
 <attribute key="decayTo" value="0" />
 <attribute key="duration" value="86400" />
</item>

Esse amuleto terá as mesmas funções de um amulet of loss

quando morrer ele não pode sumir, ele vai dar vip por duration

ex:432000 Segundos = 5 dias / só vai consumir vip quando usado.

 

Preciso de um sistema vip por item no caso por esse item.

e presiso do "uniqueid" para "pisos vips" (somente vip pode pisar)

que emite uma mensagem "bem vindo", "você não tem vip".

 

Obrigado a quem me ajudar '-'

Link para o comentário
https://xtibia.com/forum/topic/190129-pedido-valendo-rep/
Compartilhar em outros sites

9 respostass a esta questão

Posts Recomendados

  • 0

amuleto.



<item id="2353" article="a" name="burning heart">
 <attribute key="description" value="It is still beating with unholy life. It seems to be rotting rapidly." />
 <attribute key="weight" value="400" />
 <attribute key="decayTo" value="0" />
<attribute key="preventDrop" value="1"/>
<attribute key="slotType" value="necklace"/>
 <attribute key="duration" value="86400" />
</item>

 

vip por iten.

vai em actions>script crie 1arquivo com nome sistemavip.lua e cole isso.


function onUse(cid, item, fromPosition, itemEx, toPosition)

local config={
removeOnUse = "yes" -- remover quando usar ("yes" or "no")
}

local days = 30 -- coloque os dias que serão a VIP!
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 13500)
local timenow = os.time()

if getPlayerStorageValue(cid, 13500) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 13500, time)
local quantity = math.floor((getPlayerStorageValue(cid, 13500) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end

return TRUE
end

agora em actions.xml cole isso.

<action itemid="2353" script="sistemavip.lua"/>

 

 

 

AJudei?REP+

Editado por Tchubaka
Link para o comentário
https://xtibia.com/forum/topic/190129-pedido-valendo-rep/#findComment-1296753
Compartilhar em outros sites

  • 0

tena isso.


<item id="2353" article="a" name="burning heart">
 <attribute key="description" value="It is still beating with unholy life. It seems to be rotting rapidly." />
 <attribute key="weight" value="400" />
 <attribute key="decayTo" value="0" />
<attribute key="charges" value="0"/>
<attribute key="preventDrop" value="1"/>
<attribute key="slotType" value="necklace"/>
 <attribute key="duration" value="86400" />
</item>

Link para o comentário
https://xtibia.com/forum/topic/190129-pedido-valendo-rep/#findComment-1296822
Compartilhar em outros sites

  • 0

<item id="2353" article="a" name="burning heart">
   <attribute key="description" value="Garanti 5 Dias vip, podendo pausar desequipando-a." />
   <attribute key="weight" value="400" />
   <attribute key="decayTo" value="0" />
   <attribute key="preventDrop" value="1"/>
   <attribute key="stopduration" value="1" />
   <attribute key="showduration" value="1" />
   <attribute key="slotType" value="necklace"/>
   <attribute key="charges" value="10000" />
   <attribute key="showcharges" value="1" />
   <attribute key="duration" value="432000" />
</item>

 

Agora sim :) falta testar o pisoja atualizo @

Link para o comentário
https://xtibia.com/forum/topic/190129-pedido-valendo-rep/#findComment-1296829
Compartilhar em outros sites

  • 0

Tive que add essa nova linha

 

<!-- Sistema Vip de armia -->
	<action itemid="2353" script="sistemavip.lua"/>
       <action actionid="13500" script="sistemavip.lua"/> -- ESSA <<

Acho que está correto obrigaDo REP+ !

Editado por HarpiaLOOK
Link para o comentário
https://xtibia.com/forum/topic/190129-pedido-valendo-rep/#findComment-1296848
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...