Jump to content
  • 0

[@command] How to make some @commands set by default?


Robotculator

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  04/10/12
  • Last Seen:  

hello! i just want to know how can I auto-enable some commands as they log in?

So for "Lvl 0" -Group

Every member of each group will automatically enable some @commands

Such as @showexp or @showzeny

And so for "Lvl 99" -GM group

Will automatically enable: @battleignore and @speed plus its parameter

please help thanks in advance and more power.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

do something like this

- script sample -1,{
    OnPCLoginEvent:
         atcommand "@speed 0";
         close;
    end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  04/10/12
  • Last Seen:  

@Malufett

Thank you very much for your reply.

- script sample -1,{

OnPCLoginEvent:

if (Group-ID == 99) {

atcommand "@speed 0";

close;

end;}

}

Lol, anyone who knows the variable of Group IDs?

It is not on wikis.

please help.

Edited by Robotculator
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

use this to get account group ID or gm level

getgmlevel()

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  382
  • Reputation:   38
  • Joined:  01/17/12
  • Last Seen:  

use this:

getgroupid()

to get the group id and this:

getgmlevel()

to get the level set in group.conf for the related group id.

Example:

group.conf

	id: 1
name: "Super Player"
inherit: ( "Player" ) /* can do everything Players can and more */
level: 0

getgmlevel()

Will return: 0

getgroupid()

Will return: 1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  04/10/12
  • Last Seen:  

Weee! Thank you very much guys!

I will start coding as soon as i get back to home.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

@Bahmut

oh didn't see that...thanks for that info... /no1

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