Jump to content
  • 0

@ec or @ecall


Question

Posted

Hi, im having problem with my EC sometimes players can use it sometimes they cant but on my GM account i can use it with no problem, so i thought suddenly that is it possible to add a @command for ecall? like @ec or @ecall that players can use during WOE but it has also a delay when using it.. is this possible?

thanks to those who can help with this.. /no1

22 answers to this question

Recommended Posts

Posted (edited)

Have you check your skill.conf?

I also having problems with Emergency Call. But after setting it to these :

// Emergency Recall Guild Skill setting (add as appropiate).
// Note that for the skill to be usable at all,
// you need at least one of 1/2 and 4/8
// 1: Skill is usable outside of woe.
// 2: Skill is usable during woe.
// 4: Skill is usable outside of GvG grounds
// 8: Skill is usable on GvG grounds
//16: Disable skill from "nowarpto" maps
//	(it will work on GVG castles even if they are set to nowarpto, though)
emergency_call: 10

// 2: Skill is usable during woe.

// 8: Skill is usable on GvG grounds

My problems fixed..

Edited by uDe
Posted (edited)

Yes, it is possible. We can even expand beyond that and make the requirements / benefits even better.

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

*Note - This is the simple way of doing it, so the caster will also be warped upon completion. It can be coded so that, only the caster's guild members will be warped, but, this would require usage of sql, and a loop or 2.*

So, aside from the caster (guild master) getting warped there should be no issues.

Edit: Additionally, i can force them to use in it's existence, but meh. I like this way :D

Edited by GmOcean
Posted

Yes, it is possible. We can even expand beyond that and make the requirements / benefits even better.

- script at_ecall -1,{

OnInit:

bindatcmd("@ec","at_ecall::OnEcall");

bindatcmd("@ecall","at_ecall::OnEcall");

So, you can use both. ^-^

Posted

Yes, as White Eagle said, you are able to use both. @ec or @ecall. I don't know if the bindatcmd script command allows me to pass information on, because if it does, then I could also make a GM type one, where they can recall a guild using something like: @ec(all) guild name. But that's only if I can and there isn't already an existing command lol.

Posted

hi, there's an error can anyone check this out..


[Error]:  Loading NPC file: npc/jigs-script/at-ec.txt
script error on npc/jigs-script/at-ec.txt line 3
   parse_line: expect command, missing function name or calling undeclared func                                                 tion
    1 : {
    2 : OnInit:
*    3 : 'b'indatcmd("@ec","at_ecall::OnEcall");
    4 : bindatcmd("@ecall","at_ecall::OnEcall");
    5 : end;
    6 : OnEcall:
    7 : if( !getcharid(2) ){dispbottom "You are not apart of a guild."; end;}
    8 : if( getguildmasterid( getcharid(2) ) != getcharid(0) ){dispbottom "Can only be used by guild leader."; end;}

Posted

Yes, it is possible. We can even expand beyond that and make the requirements / benefits even better.

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

*Note - This is the simple way of doing it, so the caster will also be warped upon completion. It can be coded so that, only the caster's guild members will be warped, but, this would require usage of sql, and a loop or 2.*

So, aside from the caster (guild master) getting warped there should be no issues.

Edit: Additionally, i can force them to use in it's existence, but meh. I like this way :D

Working I'm using eathena with ToastOfDoom patch.

Posted

Yes, it is possible. We can even expand beyond that and make the requirements / benefits even better.

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

*Note - This is the simple way of doing it, so the caster will also be warped upon completion. It can be coded so that, only the caster's guild members will be warped, but, this would require usage of sql, and a loop or 2.*

So, aside from the caster (guild master) getting warped there should be no issues.

Edit: Additionally, i can force them to use in it's existence, but meh. I like this way :D

how can i turn it as npc for some guild event for leader to call his/her member?

Posted (edited)

mapname,x,y,z	script	at_ecall	123,{
goto OnEcall;
end;
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;
}

Edit: You know i just realized that there is an exiting command like this in rAthena, @guildrecall ... so this script is really, just a waste of space if you have the existing command in your svn.

Edited by GmOcean
Posted (edited)

Thanks @GmOcean. Actually I want the "@guildrecall" can be use in npc so it wont have skill cooldown but just delay few seconds or minutes to use it again.. I guess for that doesnt need bindatcmd?

Solved. Thanks alot :)

Edited by Shogun
Posted (edited)

It doesn't need bindatcmd, but it'd be cleaner to use it.

mapname,x,y,z	script	at_ecall	123,{
OnECall:
if( getguildmasterid( getcharid(2) ) != getcharid(0) )
{dispbottom "This can only be used by a guild leader."; end;}
if( gettimetick(2) < getd( ".guild"+ getcharid(2) +"" ) )
{dispbottom "You can use this command in: "+ ( (getd(".guild"+ getcharid(2) +"") - gettimetick(2) ) / 1000 ) +" more seconds."; end;}
if( select("Recall now :A moment please") == 2 ){close;}
atcommand("@guildrecall");
setd ".guild"+ getcharid(2) +"", gettimetick(2) + 300000;
close;
OnInit:
bindatcmd("guildrecall","at_ecall::OnECall");
end;
}

Edited by GmOcean
  • Upvote 1
Posted

sorry for removing the script that i posted, its too poor im shame.

Thanks alot @GmOcean :) have a good day.

the delay not really working actually. i will try it myself. sorry bothering

Posted

It's not? In that case, try switching these lines around

setd line

WITH

at command line.

If that doesn't work then, there's something else I'm just not seeing atm lol. It is pretty late @.@;

Posted

Yes, it is possible. We can even expand beyond that and make the requirements / benefits even better.

- 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;
}
*Note - This is the simple way of doing it, so the caster will also be warped upon completion. It can be coded so that, only the caster's guild members will be warped, but, this would require usage of sql, and a loop or 2.*

So, aside from the caster (guild master) getting warped there should be no issues.

Edit: Additionally, i can force them to use in it's existence, but meh. I like this way :D

 

 

there is something wrong with this script when you login logout the cooldown would be vague

Posted

There's nothing wrong with the script, the only thing is, it doesn't do is tell exactly how long it's on CD. Because logging in and out doesn't reset the CD with this command.

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