Author Topic: Announcement  (Read 7296 times)

else if(strlwr(getrawip(%client)) $= "local")

else if(strlwr(getrawip(%client)) $= "local")

What about names?

what names? you were only asking about an if for local ip....

Or a BL-ID, the BL ID 119?

Well, you'd need something to get local's number....maybe save it as $JookScript::CurrentID = bla; then
else if(bla == %JookSCript::CurrentID)

Nevermind, I got it.


%ip = getRawIP(%client);

if(%ip $= "local")
{
}

Thanks, by the way:

if (%display = display)

Won't work.

if(%display $= "display")

rudyman

  • Guest
To fix the one word arg in slash commands:

Code: [Select]
function messageHud_Edit::eval(%this)
{
%msg=%this.getValue();
if(getSubStr(%msg,0,1) $= "\/")
{
%cmd="\'"@firstWord(%msg)@"\'";
commandToServer(%cmd,restWords(%msg));
}
else
{
if(getWordCount(strReplace(%msg," ","")))
{
if(messageHud.isLocalMsg){commandToServer('talk',%msg);}  //I don't know if this command exists in blockland
else{commandToServer('messageSent',%msg);}
}
}
%this.setValue("");messageHud.close();
}
« Last Edit: March 09, 2007, 05:01:32 PM by rudyman »

wrong rudy
Code: [Select]
function NMH_Type::send(%this) {
%text = cleanStringemot(cleanString(trim(%this.getValue())));
if(strstr(strlwr(%text),"/") == 0) {
  %text = getSubStr(%text,1,strlen(%text));
  %command = getword(%text,0);
  if(getwordcount(%text)>=2) {
    %vars = getwords(%text,1,getwordcount(%text));
    %vars = getsubstr(%vars,0,strlen(%vars)-1);
eval("commandtoserver(\'"@%command@"\',\"" @ %vars @ "\");");
//echo("commandtoserver(\'"@%command@"\',\"" @ %vars @ "\");");
  }
  else {
    eval("commandtoserver(\'"@%command@"\');");
    //echo("commandtoserver(\'"@%command@"\');");
  }
  canvas.popdialog(NewMessageHud);
  return;
}
else if(%text !$= "") {
  if(NewMessageHud.isTeamMsg)
commandToServer('teamMessageSent',%text);
  else if(NewMessageHud.isLocalMsg)
commandToServer('localMessageSent',%text);
  else
commandToServer('messageSent',%text);
}
canvas.popdialog(NewMessageHud);
//activateKeyboard();
}
$numemotions=-1;
$emotions[$numemotions++] = "(b)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(c)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(r)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(tm)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(e)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(S)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(ce)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(1)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(y)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "({)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(>>)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(divid)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(u1)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(u2)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(u3)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(u4)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(dot)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(!)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(--)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(1/2)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(1/4)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(3/4)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(I)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(z)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(,,)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(o/oo)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(a)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(e)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(thing)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(yen)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(star)"; $replacementemotion[$numemotions] = "*";
$emotions[$numemotions++] = "(sun)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(n)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(tilda)"; $replacementemotion[$numemotions] = "~";
$emotions[$numemotions++] = "(1)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(2)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(3)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(t)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(?)"; $replacementemotion[$numemotions] = "";
$emotions[$numemotions++] = "(!)"; $replacementemotion[$numemotions] = "";

function cleanStringemot(%string) {
  for(%i=0; %i<=$numemotions; %i++)
    %string = Strreplace( %string, $emotions[%i], $replacementemotion[%i] );
  %string = strreplace(%string, "(ping)",ServerConnection.getping());
  return %string;
}
Edit: WQhole Script, including my censors :D If you want non-case sensitive part, you'll have to deal with some Torque slip up's that mess up sometimes....
« Last Edit: March 10, 2007, 02:45:09 PM by -=>RR<=-MasterCE »

rudyman

  • Guest
wrong rudy

Sorry, I didn't know the blockland name for the message hud.



Edited script, now includes special symbol censor....I should post in in add-on's or something :/ instead of hijacking this topic

I need something serverside ;l