Jump to content

setup muilt command in 1 token

Closed 1.1.7

Colors
Colors

Posted

hi, I have VIP1 2 3 in my server, I want to let it remove lower level vip when redeem a higher one

for example, when I redeem a vip3, it should remove vip1 and vip2 but I am not sure how to set several commands in one token.

can I have a sample?

imthenewguy

Posted

You would probably do something like this.

 

      "_commands": [
        {
          "command": "o.usergroup remove {id} vip1",
          "message": "",
          "public_message": "",
          "hook": true
        },
        {
          "command": "o.usergroup remove {id} vip2",
          "message": "",
          "public_message": "",
          "hook": true
        }
      ],

 

  • Like 1
Colors

Posted

cool, but how if someday I get vip4?
is it a way to remove vip1 2 3?

Colors

Posted (edited)

and I am not sure whats the difference between this?  

      "_command": null,
      "_commands": null,

if I only need to run 1 command I use _command?
if more than 1 then use _commands?
how will it going if I set both at same time?

Edited by Colors
imthenewguy

Posted

_commands was put in as an after thought.
You can use either of them if you are only running 1 command.


Use _commands if running more than 1.

 

You would use the "o.usergroup remove {id} vip2" to remove the player from previous groups.

Colors

Posted

If player get vip1 from token, will it going error when I remove by o.usergroup?

what will happen when a player has redeem vip1 token and not expired but remove his vip1 by o.usergroup?

imthenewguy

Posted

It will simply attempt to remove him, and if he isnt in the group, it will move on.

 

Colors

Posted

so if I get vip4, I should set like this

"_commands": [
        {
          "command": "o.usergroup remove {id} vip1",
          "message": "",
          "public_message": "",
          "hook": true
        },
        {
          "command": "o.usergroup remove {id} vip2",
          "message": "",
          "public_message": "",
          "hook": true
        },
        {
          "command": "o.usergroup remove {id} vip3",
          "message": "",
          "public_message": "",
          "hook": true
        }
      ],

 

imthenewguy

Posted

Changed Status from Pending to Closed

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.