ccjosh Posted July 20, 2013 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 66 Reputation: 6 Joined: 11/13/12 Last Seen: November 17, 2014 Share 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 Link to comment Share on other sites More sharing options...
Jaburak Posted July 20, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted July 20, 2013 Change 300000 to 180000. Quote Link to comment Share on other sites More sharing options...
ccjosh Posted July 22, 2013 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 66 Reputation: 6 Joined: 11/13/12 Last Seen: November 17, 2014 Author Share Posted July 22, 2013 Thanks! But for some reason, that doesn't work. I used gettime(2) + 3 instead. Solved. Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share 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 Link to comment Share on other sites More sharing options...
ccjosh Posted July 30, 2013 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 66 Reputation: 6 Joined: 11/13/12 Last Seen: November 17, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
Capuche Posted July 30, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share 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 Link to comment Share on other sites More sharing options...
ccjosh Posted August 2, 2013 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 66 Reputation: 6 Joined: 11/13/12 Last Seen: November 17, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
Xynvaroth Posted August 2, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 254 Reputation: 72 Joined: 07/10/13 Last Seen: October 9, 2017 Share 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 Link to comment Share on other sites More sharing options...
Capuche Posted August 4, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share 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 Link to comment Share on other sites More sharing options...
Question
ccjosh
Hi,
Can anyone modify this script? I need to set it to 3minute delay
Link to comment
Share on other sites
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.