Hello one of my friend said post your problem here for better solution i post this topic on 0.4 forum but no one give reply hope i give better replay her
Hello guys thanks for helping me i am facing an other problem now
i am using rulk's scripts with level functions
ok i make a new room for staff
const achan = "#blahstaf"; // Home channel
const pass = "";
The problem is this room not working with prefix i mean nothing happening when i use any cmds
nothing happend
i use this but not work
if ( channel == chan )
{
// Find the text that was typed.
local
FindText = split( raw[ 0 ], ":" ),
text = FindText.len() > 1 ? FindText[ 1 ] : "",
prefix = text != "" ? text.slice( 0, 1 ) : "";
// Find the command that was typed.
local
Findcmd = text != "" ? split( text, " " ) : "",
cmd = Findcmd != "" ? Findcmd[ 0 ].slice( 1, Findcmd[ 0 ].len() ) : "";
// Find the text that was typed after the command.
local
NewText = text != "" ? strip( text.slice( cmd.len() + 1, text.len() ) ) : "";
// Find the person that typed the text.
local
FindNick = split( raw[ 0 ], "!" ),
Nick = FindNick[ 0 ].slice( 1, FindNick[ 0 ].len() );
// Ensure a command was typed with our prefix.
if ( prefix == PREFIX )
{
// Depending how many bot's we have connected, depends how many times we recieve the data.
// So we need to only forward the last recieved data to the command handler.
// We do this using the 'Modulus Operator', This checks that our 'data recieved counter' devides into
// the total number of bot's we have connected, ensuring that we only forward the recieved data once.
if ( count % BotNick.len() == 0 )
{
// Forward to our command handler.
ProcessCommands( Nick, cmd, NewText );
}
// Increase our 'recieved data' counter.
count++;
}
}
if ( channel == achan )
{
// Find the text that was typed.
local
FindText = split( raw[ 0 ], ":" ),
text = FindText.len() > 1 ? FindText[ 1 ] : "",
prefix = text != "" ? text.slice( 0, 1 ) : "";
// Find the command that was typed.
local
Findcmd = text != "" ? split( text, " " ) : "",
cmd = Findcmd != "" ? Findcmd[ 0 ].slice( 1, Findcmd[ 0 ].len() ) : "";
// Find the text that was typed after the command.
local
NewText = text != "" ? strip( text.slice( cmd.len() + 1, text.len() ) ) : "";
// Find the person that typed the text.
local
FindNick = split( raw[ 0 ], "!" ),
Nick = FindNick[ 0 ].slice( 1, FindNick[ 0 ].len() );
// Ensure a command was typed with our prefix.
if ( prefix == PREFIX )
{
// Depending how many bot's we have connected, depends how many times we recieve the data.
// So we need to only forward the last recieved data to the command handler.
// We do this using the 'Modulus Operator', This checks that our 'data recieved counter' devides into
// the total number of bot's we have connected, ensuring that we only forward the recieved data once.
if ( count % BotNick.len() == 0 )
{
// Forward to our command handler.
FBSStaffCommand( Nick, cmd, NewText );
}
// Increase our 'recieved data' counter.
count++;
}
}
}