Jump to content
  • 0

bindatcommand help


Lord Ganja

Question


  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

Hello, i'm just curious if it's possible to bind the default commands..

Imma use this to restrict other gm's to use commands freely.

 

 For example @recall..

- script commands_limit -1,{
OnInit:
bindatcmd("recall","commands_limit::OnAtcommandRecall",0,0);
end;

OnAtcommandRecall:
  getmapxy(.@map$,.@x,.@y,0);
     if(.@map$=="prontera") {
     mes "You can't recall players here!";
     close;
     }
// < WHAT TO PUT HERE SO THAT @recall WILL FUNCTION TO ITS NORMAL FUNCTION>
}

Thank you!

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

You can use :

atcommand "@recall " +.@atcmd_parameters$[0];

And for your curiosity. Yes, bindatcmd override the existing commands available on rAthena :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  151
  • Reputation:   5
  • Joined:  11/09/12
  • Last Seen:  

You already have a setting on you server for that

Conf/groupid.conf

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

http://rathena.org/wiki/atcommand

atcommand "@recall";

 

it doesn't recall the player when outside the restricted map.. It will always state "Please enter a player name. . . . ."

 

 

 

You already have a setting on you server for that

Conf/groupid.conf

 

Could you explain this further sir? I don't have groupid.conf file..

anyway if you're referring to groups.conf, what I'd like to happen is to give limits to those group who can access @recall command. I don't want to remove it from them, instead make limits.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  151
  • Reputation:   5
  • Joined:  11/09/12
  • Last Seen:  

yes xD it was a typo,

 

yes i get a typo -w-, yes i referring on groups.cong and configure...  id 10 and 99 are allowed to use those commands so..if u want that the only one can use that commnds put recall: false

    id: 10
    name: "Law Enforcement"
    inherit: ( "Support" )
    level: 2
    commands: {
        hide: true
        follow: true
        kick: true
        disguise: true
        fakename: true
        option: true
        speed: true
        warp: true
        kill: true
        recall: false //recall commands disable
        ban: true
        block: true
        jail: true
        jailfor: true
        mute: true
        storagelist: true
        cartlist: true
        itemlist: true
        stats: true
    }

and here copy this "recall: true"

{
    id: 99
    name: "Admin"
    level: 99
    inherit: ( "Support", "Law Enforcement" )
    commands: {
        /* HEEEEEEEEERREEEEEEEEEEE */
        recall: true // recall commands enable
    }
    log_commands: true
    permissions: {
        can_trade: true
        can_party: true
        all_skill: false
        all_equipment: false

For More Information Read this:

http://rathena.org/wiki/Group_Permissions

Edited by Dynasty
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

You can use :

atcommand "@recall " +.@atcmd_parameters$[0];

And for your curiosity. Yes, bindatcmd override the existing commands available on rAthena :P

 

It worked! /no1 Thanks a lot Patskie :) btw, what about if I bind @item.. Let's say like this:

 

 

- script commands_limit -1,{
OnInit:
bindatcmd("item","commands_limit::OnAtcommandItem",0,0);
setarray .@item[0],501,502,503,504;
end;
OnAtcommandItem:
if(.@atcmd_parameters$[0]) != .@item[0]){ // if they @item an item which is not in the array this message will pop out
mes "You're not allowed to @item this kind of item";
close;
}
atcommand "@item " +.@atcmd_parameters$[0];
end;
}

 

 

The texts marked with RED are the script that i'm not sure xD   /whisp

I'm bad with arrays so I don't really know how to use them.. But I wanted it to work like that.

I hope you got my point here.   /no1

Edited by Lord Ganja
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

 

Thanks Patskie, but it doesn't limit @item command..

I don't know why.. The OnAtcommandItem is triggered but I can still @item any items..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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