LU
pedido

[Pedido] Valendo Rep+

Por lukas13on, 20 de jul. de 2012 em Scripts

script
10
1.1k
lukas13onL
20 de julho de 2012 às 15:11

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 '-'

TchubakaT
20 de julho de 2012 às 15:21

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 Julho 20 por Tchubaka

lukas13onL
20 de julho de 2012 às 16:31

o item ta sumindo quando morre

TchubakaT
20 de julho de 2012 às 16:33

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>

lukas13onL
20 de julho de 2012 às 16:39

<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 @

TchubakaT
20 de julho de 2012 às 16:43

piso e so voce pelo mapa editor.

clikar 2x e em actionID botar 13500 ^^

 

 

 

REP+?

lukas13onL
20 de julho de 2012 às 16:52

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 Julho 20 por HarpiaLOOK

TchubakaT
20 de julho de 2012 às 16:55

atah esqueci disso.

 

 

Duvida Sanada.

lukas13onL
20 de julho de 2012 às 16:57

mando rep amanha ja usei o de Hoje 'kkkkkkk

TchubakaT
20 de julho de 2012 às 16:59

hahahahah blz ^^