Blockland Forums > Modification Help
kid has even more questions about TS
Conan:
iirc the function you want to package is clientcmdmessageSent, but im not 100% sure. i don't have any decompiled files on me atm so i cant check :(
basically would let you catch any messages you send from your client, and not just catch the entire stream of chat incoming.
SubDaWoofer:
--- Quote from: PhantOS on December 09, 2017, 09:47:57 PM ---That's optional. I'm talking about " " <<these. You have an opening quote "*^ENABLE but forgot the closing one
--- End quote ---
stuff IM DUMB
how did i not catch that
edit:
wait no thats fixed on my actual code
it still does the weird thing with the fix
ill copy paste my code once i figure out why the hell my VIM isnt compatable with my clipboard
--- Code: ---//ChatBot Version ELI
//Made by Stefan Burnett!
//Alright lets get this on with.
package ChatBotGeneral
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
if (%msg $= "*^Test")
{
if (%name $= "Stefan Burnett")
{
commandToServer('messagesent',"ELI: Testing Complete");
}
}
}
};
package Enable
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,$fmsg,%cp,%name,%cs,%msg);
if (%msg $= "*^ENABLE" & %name $= "Stefan Burnett")
{
activatePackage(ChatBotGeneral);
}
else if (%msg $= "*^DISABLE" & %name $= "Stefan Burnett")
{
disablePackage(ChatBotGeneral);
}
}
};
activatePackage(Enable);
--- End code ---
--- Quote from: Conan on December 09, 2017, 09:58:19 PM ---iirc the function you want to package is clientcmdmessageSent, but im not 100% sure. i don't have any decompiled files on me atm so i cant check :(
basically would let you catch any messages you send from your client, and not just catch the entire stream of chat incoming.
--- End quote ---
would its variables still be the same as clientcmdchatmessage(%a,%b...)
phflack:
https://leopard.hosting/dl/xrfpi/Script_BuildChar.zip
--- Code: ---package buildChar
{
function NMH_Type::send(%this)
{
%msg=%this.getValue();
Parent::send(%this);
if(getWord(%msg,0)$="@BT")
...
}
};
activatePackage(buildChar);
--- End code ---
SubDaWoofer:
--- Quote from: phflack on December 09, 2017, 10:57:28 PM ---https://leopard.hosting/dl/xrfpi/Script_BuildChar.zip
--- Code: ---package buildChar
{
function NMH_Type::send(%this)
{
%msg=%this.getValue();
Parent::send(%this);
if(getWord(%msg,0)$="@BT")
...
}
};
activatePackage(buildChar);
--- End code ---
--- End quote ---
thank
SubDaWoofer:
excuse me but i am a dumb and new (not really new but last time i programmed was like 2-3 yrs ago) to programming may you answer some of my questions:
what the hell does the parent:: do (does it overwrite a function?) i still do not know
what is NMH:: type? NMHclass::function
what does "::" do? alright this defines a function or variable of a ClassName