Jump to content
  • 0

Set Expiration on item effect


Question

Posted

Hi all !

Im trying to make a item wich has effect, that expire after 5 days ( the effect need to expire after 5 days )

this is my item code 
{ bonus bAllStats, 3; bonus bHPGainValue,100; bonus bSPGainValue,100; },{},{}

(All Stats +3, HP/SP +100, effects expire 5 days after opening the package)
Can anyone help me out on this ?

Thanks in advance

7 answers to this question

Recommended Posts

  • 0
Posted (edited)

Hi all

I have managed what i wanted to do.
Also i'll share what i have done.

The hats i wanted, i created seperately
Then i made a box for each hat, wich would use the "rentitem" instead of the "getitem".
This would give the hats with its effects and a expiration time.

Thanks for all the help!

Edited by BFPkiller
  • 0
Posted (edited)
30 minutes ago, BFPkiller said:

Thanks for your reply.

Do i add that in the item script ?

 

U add in the npc give's dat item.

 

*rentitem <item id>,<time>;
*rentitem "<item name>",<time>;

 

for example

 

Quote

rentitem 5013, 30000;

give Kaho's for 5 min

Edited by Serken
  • 0
Posted
11 minutes ago, Serken said:

U add in the npc give's dat item.

 

*rentitem <item id>,<time>;
*rentitem "<item name>",<time>;

 

for example

 

give Kaho's for 5 min

We dont have a npc that gives the item.

Its a item we give as reward.

Anything possible on that ?

 

  • 0
Posted
1 hour ago, BFPkiller said:

We dont have a npc that gives the item.

Its a item we give as reward.

Anything possible on that ?

 

The easiest way is put a npc who give's package only one time per char/account 

  • 0
Posted (edited)

Hi @BFPkiller

You can make a script to set a player variable and get the effects if variable is active.

for exemple: 

40003,teste,Teste,4,30000,,500,,3,,1,0xFFFFFFFE,7,2,32,,65,1,4,{ if (bonus_teste == 1) { bonus bAllStats, 3; bonus bHPGainValue,100; bonus bSPGainValue,100;} },{},{}

 

To finish the effect make like ''vip script'' that remove the ''vip days'' .. in this case remove the player variable "bonus_teste".

i dont know if is a clean way to do that, but it works ?

 

Edited by rafanews

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...