Jump to content

[Script] Enable commands on login


darkmeistersp

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   12
  • Joined:  11/18/11
  • Last Seen:  

Hi! With this little script you´ll be able to enable commands on the players who log in to your server.

prontera,155,175,0 script NPC -1,{
close;
OnPCLoginEvent:
	atcommand strcharinfo(0)+"@main on";
	atcommand strcharinfo(0)+"@autoloot",
	atcommand strcharinfo(0)+"@showexp",
close;
}

The code above is an example. You can add the commands you want!

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

but remember to change the GM levels for the commands in conf/atcommand_athena.conf

*atcommand "<command line>";


This command will run the given command line exactly as if it was typed in from the keyboard by the player connected to the invoking character,
and that character belonged to an account which had GM level 99.

Edited by Emistry
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   12
  • Joined:  11/18/11
  • Last Seen:  

Hmmm, you are right haha. Now it´s ok :o

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  193
  • Reputation:   14
  • Joined:  12/02/11
  • Last Seen:  

but remember to change the GM levels for the commands in conf/atcommand_athena.conf

*atcommand "<command line>";


This command will run the given command line exactly as if it was typed in from the keyboard by the player connected to the invoking character,
and that character belonged to an account which had GM level 99.

AFAIK.. *atcommand" can be used for all type of levels ( Even 0 player with no privilege can

do @item ( if the script says so )...

ex :

conf/atcommand_athena.conf

item: 99,99 ( Only level 99 acc can do it )

atcommand @item 607 -> This syntax still works for level 0 player

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

what i refered above is that..last time the Topic Starter has request other member to adjust the Command Level so that the script can make use of the command..

and that was wrong..and i just post that message to remind the topic starter.....

and yes that atcommand will allow users to make use of all command even though your account is normal account

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  2244
  • Reputation:   182
  • Joined:  11/19/11
  • Last Seen:  

can this be made to an item? like say a reusuable item. If you use it, a menu shows up and you can toggle on or off what settings you want?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  193
  • Reputation:   14
  • Joined:  12/02/11
  • Last Seen:  

can this be made to an item? like say a reusuable item. If you use it, a menu shows up and you can toggle on or off what settings you want?

Requires src modification or even client modification (maybe)

what i refered above is that..last time the Topic Starter has request other member to adjust the Command Level so that the script can make use of the command..

and that was wrong..and i just post that message to remind the topic starter.....

and yes that atcommand will allow users to make use of all command even though your account is normal account

Oh I see.. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  967
  • Reputation:   53
  • Joined:  11/13/11
  • Last Seen:  

suggest format:

 atcommand "@main on "+strcharinfo(0);

actually

no need for "strcharinfo(0)"

for Example:

atcommand "@mapexit";
break;

since its not charcommand~

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

can this be made to an item? like say a reusuable item. If you use it, a menu shows up and you can toggle on or off what settings you want?

you may use this Script

made by @llchrisll

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  71
  • Reputation:   25
  • Joined:  11/23/11
  • Last Seen:  

You could make a floating script, it's better for this use, and it deletes the need of the first 'close'.

Edited by FrozIgnition
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   47
  • Joined:  11/18/11
  • Last Seen:  

Why is it too much discussion about this xd...

- script cmd_npc -1,{
end;

OnPCLoginEvent:
if(getgmlevel() >= 10) { end; }

atcommand "@main on";
atcommand "@autoloot",
atcommand "@showexp",
//Add more commands here..
end;
}

If the player's GM Level is 10 or more, it will NOT trigger the commands when logging on.

Period.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

can this be made to an item? like say a reusuable item. If you use it, a menu shows up and you can toggle on or off what settings you want?

you may use this Script

made by @llchrisll

I'm atm trying to add a few features to that script o.o, like saving the settings on the whole acc or just the char it is done already.

Also adding the autolootitem/alootid with multiply items, but well that is after my Arena Master [/advertize]

Btw, thanks for mentioning my script ;).

Regards,

Chris

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
Reply to this topic...

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