ccjosh Posted July 20, 2013 Posted July 20, 2013 Hi, Can anyone modify this script? I need to set it to 3minute delay - script at_ecall -1,{ OnInit: bindatcmd("@ec","at_ecall::OnEcall"); bindatcmd("@ecall","at_ecall::OnEcall"); end; OnEcall: if( !getcharid(2) ){dispbottom "You are not apart of a guild."; end;} if( getguildmasterid( getcharid(2) ) != getcharid(0) ){dispbottom "Can only be used by guild leader."; end;} if( gettimetick(2) < getd(".guild"+ getcharid(2) +"") ){dispbottom "Command Failed. Still on cooldown."; end;} progressbar "0x00FF00",5; //5 seconds is how the skill acts. getmapxy(.@m$,.@x,.@y,0); warpguild .@m$,.@x,.@y,getcharid(2); setd ".guild"+ getcharid(2) +"", gettimetick(2) + 300000; end; } Quote
ccjosh Posted July 22, 2013 Author Posted July 22, 2013 Thanks! But for some reason, that doesn't work. I used gettime(2) + 3 instead. Solved. Quote
Capuche Posted July 22, 2013 Posted July 22, 2013 It may be because of your big delay. gettimetick(2) is in secs so your delay 300000 is in secs. 300000 secs = 5000 mins ~ 4 days 180000 secs = 3000 mins ~ 2 days Quote
ccjosh Posted July 30, 2013 Author Posted July 30, 2013 It may be because of your big delay. gettimetick(2) is in secs so your delay 300000 is in secs. 300000 secs = 5000 mins ~ 4 days 180000 secs = 3000 mins ~ 2 days I see.. Is there by any chance you know how to reload this script when the player logs out? Thanks Quote
Capuche Posted July 30, 2013 Posted July 30, 2013 What do you mean? This script save the guild id of the leader in a variable attached to the npc (variable reseted when @reload script) Quote
ccjosh Posted August 2, 2013 Author Posted August 2, 2013 What do you mean? This script save the guild id of the leader in a variable attached to the npc (variable reseted when @reload script) What I meant was, when a guild master disconnects after he/she casts an e-call. The variable will reset and he can use e-call again. Is this possible? Quote
Xynvaroth Posted August 2, 2013 Posted August 2, 2013 I am not sure whether I understood your demand properly. Nevertheless - if any guild master logs out, this will reset the cooldown for his or her guild: OnPCLogoutEvent: if( getcharid( 2 ) != 0 && getguildmasterid( getcharid( 2 ) ) == getcharid( 0 ) && getd( ".guild" + getcharid( 2 ) ) != 0 ) setd ".guild" + getcharid( 2 ), 0; end; Quote
Capuche Posted August 4, 2013 Posted August 4, 2013 or - script at_ecall -1,{ OnInit: bindatcmd("@ec","at_ecall::OnEcall"); bindatcmd("@ecall","at_ecall::OnEcall"); end; OnEcall: if( !getcharid(2) ){dispbottom "You are not apart of a guild."; end;} if( getguildmasterid( getcharid(2) ) != getcharid(0) ){dispbottom "Can only be used by guild leader."; end;} if( gettimetick(2) < @delay_ecall ){dispbottom "Command Failed. Still on cooldown."; end;} progressbar "0x00FF00",5; //5 seconds is how the skill acts. getmapxy(.@m$,.@x,.@y,0); warpguild .@m$,.@x,.@y,getcharid(2); @delay_ecall = gettimetick(2) + 180; end; } if he logs out log in, he can use @ecall again without delay Quote
Question
ccjosh
Hi,
Can anyone modify this script? I need to set it to 3minute delay
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.