Jump to content
  • 0

Item Script ( Ygg Delay )


SlashGeeGee

Question


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

Hello rA /ok

i would like to request an item script of yggdrasil berry with a 5 second delay and if spam it will display on bottom "Yggdrasil Berry cannot be spammed, There is a delay of 5 seconds between use."

i've tried search and found this :

607,Yggdrasilberry,Yggdrasil Berry,0,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ if((agitcheck() == 1) && (YggBerryLastUsed > gettimetick(2))) { dispbottom "Yggdrasil Berry cannot be spammed during WoE! There is a delay of 5 seconds between use."; end; } set YggBerryLastUsed,gettimetick(2)+5; percentheal 100,100; },{},{}

but it doesnt work and it's for woe only :D

Thanks :(

SlashGeeGeee

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

Actually item_delay.txt is already provided you don't need to bother creating a script.

In order to add more item delay go to itemdb.h and find this

#define MAX_ITEMDELAYS

then recompile the src code.

In there you can specify how many item delays you have entered on your trunk/db/item_delay.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   8
  • Joined:  02/08/12
  • Last Seen:  

607,Yggdrasilberry,Yggdrasil Berry,0,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "Delay607",5; },{},{}

function script Delay607 {
if ( agitcheck() && Delay607 > gettimetick(2) ) {
dispbottom "Yggdrasil Berry cannot be spammed during WoE! There is a delay of "+getarg(0)+" seconds between use.";
getitem 29174,1; end;}
else{set Delay607,gettimetick(2)+getarg(0); percentheal 100,100;}
return;
}

set delay at

callfunc "Delay607",5;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

607,Yggdrasilberry,Yggdrasil Berry,0,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "Delay607",5; },{},{}

function script Delay607 {
if ( agitcheck() && Delay607 > gettimetick(2) ) {
dispbottom "Yggdrasil Berry cannot be spammed during WoE! There is a delay of "+getarg(0)+" seconds between use.";
getitem 29174,1; end;}
else{set Delay607,gettimetick(2)+getarg(0); percentheal 100,100;}
return;
}

set delay at

callfunc "Delay607",5;

it doesnt work :(

Edited by SlashGeeGee
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   8
  • Joined:  02/08/12
  • Last Seen:  

really? i test already in my server but it's work

you must put function in new npc

@reloadscript and @reloaditemdb

@ 07:43pm i re test again with eddga it's work

Edited by Rozeniiz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   8
  • Joined:  02/08/12
  • Last Seen:  

he want delay in WOE only

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

he want delay in WOE only

I see. :(

Didn't saw that it is only for WoE. /ok

Try this it is based from the given by Rozeniiz

607,Yggdrasilberry,Yggdrasil Berry,0,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ if((agitcheck() || agitcheck2()) && YggBerryLastUsed > gettimetick(2)) { dispbottom "Yggdrasil Berry cannot be spammed during WoE! There is a delay of 5 seconds between use."; getitem 607,1; } else { set YggBerryLastUsed,gettimetick(2)+5; percentheal 100,100; } },{},{}

Link to comment
Share on other sites

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.

×
×
  • Create New...