Jump to content
  • 0

Question

Posted

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

6 answers to this question

Recommended Posts

Posted

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

Posted

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;
Posted (edited)

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
Posted (edited)

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
Posted

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; } },{},{}

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