Help - Search - Members - Calendar
Full Version: CCX Repository & Examples > StealthBot > Scripting and Plugins > Plugin Projects > Custom Command Xystem (CCX)
This topic will contain a repository of functional command-sets (known as CC-Sets) or just any CC's. CC-Sets are multiple CC's that work together to achieve a goal.

In 2.7 you'll be able to simply paste CCX code into the bots Send box. (If not there - in the CCXUI form)

If you have a cool CC or CC-Set - make a new topic, or post below here.

/addcc signuplist 40 %listout(signuplist)
/addcc remove 80 %listdel(signuplist,%inlist(signuplist,%1))User "%1" deleted.
/addcc signup 10 %if(%inlist(signuplist,%user)>0,%die(You are listed #%inlist(signuplist,%user); to cancel type %triggerremoveme))%listadd(signuplist,%user)Thank you %user. You have been added to the list. - To see your position type %triggersignup again.
/addcc removeme 10 %if(%inlist(SignupList,%user),%listdel(SignupList,%inlist(SignupList,%user))Thank you- you have been removed from our list.,You were not registered in the list)

More to come.

Post here, or make a new topic. (I'm gonna try and keep this topic relatively orderly though)
Set number game;
!addcc setnumber 20/ Number set: %setvar(Number,%rand(1,%1))
!addcc guess 20/ [%1]: %if(%1=%var(Number),%die(correct),try again.) %if(%1<%var(Number),The number is larger,The number is smaller)

!setnumber 50
!guess 25
- It tells you if the number is larger or smaller, - keep guessing until it says correct- then try setting the number higher ^^.
I guessed a number between 1-50 in 3 trys!
Formal Clan Invitation String

Created By: Snap
Thunk Of By: ViRaL

!addcc invite 80 %if(%inlist(Invited,%1),,%die( %1 has alraedy been invited))%listadd(Invited, %1)
!appendcc invite & /w %1 You have recieved an invitation to join (YourClanHere)
!appendcc invite & /w %1 To hear more about this invitation reply to this message with !Accept, to decline reply !Decline.
!appendcc invite & /w %1 One of our members has seen fit to send you an invitation. To tryout for the clan please reply to this with !Tryout,
!appendcc invite & /w %1  and you will be added to a list of Potential Members. You will receive a message from one of our players momentarily.
!addcc accept 0 %if(%inlist(Invited,%user),,%die(You haven't been invited!))Thank you! someone will be with you shortly& %user accepted an invitation.
!appendcc invite %listadd(Accepted,%user)%listdel(Invited,%inlist(Invited,%user))!addcc decline 0 %if(%inlist(Invited,%user),,%die(You haven't been invited!))Thank you for your time.%listdel(Invited,%inlist(Invited,%user))
!addcc tryout 0 %if(%inlist(Tryouts,%user),%die(You are already on the list))%if(%inlist(Invited,%user),%listadd(Accepted,%user)%listdel(Invited,%inlist(Invited,%user))Thank you for accepting. )
!appendcc tryout A member will message you soon. %listadd(Tryouts,%user)
!addcc tryouts 40 Users who want to tryout: %listout(Tryouts)
!addcc accepted 40 Users accepted invitation: %listout(Accepted)
!addcc invited 40 Users invited: %listout(Invited)
!addcc deltryouts 90 Deleted: %listitem(Tryouts,%1)%listdel(Tryouts,%1)
!addcc delaccepted 90 Deleted: %listitem(Accepted,%1)%listdel(Tryouts,%1)
!addcc delinvited 90 Deleted: %listitem(Invited,%1)%listdel(Tryouts,%1)
!addcc clearinvited 90 Invited list has been cleared.%listclear(Invited)
!addcc cleartryouts 90 Tryout list has been cleared.%listclear(Tryouts)
!addcc clearaccepted 90 Accepted list has been cleared.%listclear(Accepted)


To modify access on any of these commands- you can use !setcc [name] [newaccess]

All 90 access:
Deltryouts [Number] - Deletes the user that matches the number as listed in the !tryouts command.
Delaccepted [Number] - Same as above only accepted
Delinvited [Number] - Same as above only invited

Clearinvited - Clears the users in the invited list.
Cleartryouts - Same as above
Clearaccepted - Same as above

CommandName (Access Required) - Explination:
Invite (80) - Puts user on the list of invited users, and sends the message as writen in your post.

Tryouts (40) - Lists the users who want to tryout
Invited (40) - Lists the users who have been invited- but haven't accepted or declined.
Accepted (40) - Lists the users who accepted the invitation - this includes users who typed !tryout after being invited

Accept (0) accepts an invitation if the user was invited
Decline (0) declines an invitation if the user was invited
Tryout (0) accepts an invitation if invited - but adds them to the tryout list no matter what.

Rank/Member/Inform String
Uses: Can be used to manage ranks/members, can be used to give info about your clan.


/addcc am 80 Member %1 was added to the member list: %Listadd(mlist,%1)
/addcc rm 80 Member %1 was removed from the member list: %listdel(mlist,%1)
/addcc ar 80 Rank %1 was added to the rank list: %listadd(rlist,%1)
/addcc rr 80 Rank %1 was deleted from the rank list: %listdel(rlist,%1)
/addcc Inform 0 Member List- %Listout(mlist)
/appendcc Inform Ranklist- %listout(rlist)
/appendcc am %if(%inlist(mlist,%1),%diie(%1 is already on the list)
/appendcc ar %if(%inlist(rlist,%1),%die(%1 is already on the list)


/am (user) Adds a member to the member list
/rm (user) To remove a user from the member list
/ar (rank) Adds a rank to the rank list
/rr (rank) To remove a rank from the rank list
/inform Displays all of the members, the ranks
Thunk Of By: ViRaL
Thought Of By: ViRaL
An Example of why to use CCX-----
---Because in CCX you can do This


/addcc signup 10 %if(%listsize(SUList)=10,%die(List is full.))%listadd(SUList,%user)%if(%listsize(SUList)=9, The List is now full!)
/appendcc signup %if(%inlist(SUList,%user,%die(you're already in the list!)) [%listsize(SUList)/10]

/addcc listsigned 10 There are currently %listsize(SUList), %listout(SUlist)

/addcc newlist 80 %listclear(SUList)List cleared!

----Instead of this----

'&Sign Plugin:Call

Private Const Cmd1 = "signup"
Private Const String1 = "%user has signed up, %count more are needed."
Private Const String_1 = "There are %fcount users already signed up"

Private Const Cmd2 = "listsigned"
Private Const String2 = "There are currently %fcount users signed, (%users)"

Private Const Cmd3 = "newlist"
Private Const Access3 = 60
Private Const String3 = "List Reset."

Private Const Cmd4 = "signout"
Private Const String4 = "You have been signed out."

Private ArrayList(10)

Sub Sign_Event_Load()

   For X = 1 To UBound(ArrayList)
      ArrayList(X) = vbNullString
End Sub

Sub Sign_Event_UserTalk(Username, Flags, Message, Ping)

   Dim OutPut : OutPut = vbNullString
   Select Case LCase(Message)
      Case LCase(BotVars.Trigger & Cmd1)
         OutPut = String1
         For X = 1 To UBound(ArrayList)
            If ArrayList(X) = vbNullString Then
               ArrayList(X) = Username
               Exit For
            ElseIf ArrayList(X) = Username Then
               Exit Sub
            End If
         If Not ArrayList(UBound(ArrayList)) = VbNullString then
            OutPut = String_1
         End If
      Case LCase(BotVars.Trigger & Cmd2)
         OutPut = String2
      Case LCase(BotVars.Trigger & Cmd3)
         GetDBEntry Username, Access, Flags
         If Access < Access3 Then Exit sub
         For X = 1 To UBound(ArrayList) - 1
            ArrayList(X) = vbNullString
         OutPut = String3
      case LCase(BotVars.Trigger & cmd4)
         Dim varB
         VarB = False
         For X = 1 To UBound(ArrayList)
            If ArrayList(X) = Username Then
               ArrayList(X) = VbNullString
               varB = True
               Exit For
            End If
         If Not VarB Then Exit sub
         OutPut = String4
   End Select
   If OutPut = vbNullString Then Exit Sub
   Dim Count, Users, fcount
   Count = UBound(ArrayList)
   fcount = 0
   Users = vbNullString
   For X = 1 To UBound(ArrayList)
      If Not ArrayList(X) = vbNullString then
         Count = Count - 1
         fcount = fcount + 1
         Users = Users & ArrayList(X) & ", "
      End If
   OutPut = Replace(OutPut, "%count", Count)
   If Not Users = vbNullString Then
      OutPut = Replace(OutPut, "%users", Left(Users, Len(Users) - 2))
      OutPut = Replace(OutPut, "%users", "")
   End If
   OutPut = Replace(OutPut, "%fcount", fcount)
   OutPut = Replace(OutPut, "%user", Username)
   Call Dsp(1, OutPut, Username, vbGreen)
End Sub

Bryan Stevens
on the invite thing ti doesnt put them on the list and already is spelt wrong aswell as when u invite some1 it says clan invite sent then says they already have a invite aswell as error on & /w it doesnt whisper them
QUOTE(Bryan Stevens @ May 12 2009, 06:07 PM) *

on the invite thing ti doesnt put them on the list and already is spelt wrong aswell as when u invite some1 it says clan invite sent then says they already have a invite aswell as error on & /w it doesnt whisper them


This appears to be a bug with CCX (The %inlist function - and an error regarding ordering when using %listadd and %listdel). -

Try with the newest version of ccx

/testcc %listclear(invited)

first though.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2020 Invision Power Services, Inc.