Author Topic: Why this script fail!?  (Read 1231 times)

Truce's: BuildChat, fail? Why? Here is script:
Code: [Select]
$BuildChar::Path="Add-Ons/Script_BuildChar/lib/";
$BuildChar::Ext=".txt";
function buildChar(%chr,%time) {
%path=$BuildChar::Path@%chr@$BuildChar::Ext;
if(!isFile(%path))
%path=$BuildChar::Path@"UNKNOWN"@$BuildChar::Ext;
%file=new FileObject();
%file.openForRead(%path);
%y=1;
while(!%file.isEOF()) {
%line=%file.readLine();
for(%i=0;%i<strLen(%line);%i++) {
%col[%x++,%y]=getSubStr(%line,%i,1)!$=" ";
}
if(%len$=""||%len<%x)
%len=%x;
%x=0;
%y++;
}
%y--;
for(%i=0;%i<PaintRowGroup.getCount();%i++) {
%obj=PaintRowGroup.getObject(%i);
if(%obj.getName()$="PaintRow")
%row+=%obj.numSwatches;
}
%row-=9;
for(%i=0;%i<%row;%i++) {
%temp=getColorIDTable(%i);
%a=(255-getWord(%temp,0))+(255-getWord(%temp,1))+(255-getWord(%temp,1))-(0-getWord(%temp,3));
if(%trans$=""||%a<%transT) {
%trans=%i;
%transT=%a;
}
}
for(%i=5;%i<HUD_PaintBox.getCount()-10;%i++) {
%obj=HUD_PaintBox.getObject(%i);
if(%obj.getPosition()$=getWords(vectorAdd(HUD_PaintActive.getPosition(),"1 1"),0,1)) {
%solid=%i-5;
break;
}
}
for(%i=%len;%i>0;%i--) {
for(%j=%y;%j>0;%j--) {
if(%col[%len-%i+1,%j])
%new=%solid;
else
%new=%trans;
$BuildChar::Tick[$BuildChar::Count++]=schedule(%time+=(!$IamAdmin)*150,0,commandToServer,'useSprayCan',%new);
$BuildChar::Tick[$BuildChar::Count++]=schedule(%time,0,commandToServer,'plantBrick');
$BuildChar::Tick[$BuildChar::Count++]=schedule(%time,0,commandToServer,'superShiftBrick',0,0,1);
}
$BuildChar::Tick[$BuildChar::Count++]=schedule(%time,0,commandToServer,'superShiftBrick',0,-1,-%y);
}
$BuildChar::Tick[$BuildChar::Count++]=schedule(%time,0,commandToServer,'superShiftBrick',0,-1,0);
$BuildChar::Tick[$BuildChar::Count++]=schedule(%time,0,commandToServer,'useSprayCan',%solid);
%file.close();
%file.delete();
return %time;
}
package buildChar {
function NMH_Type::send(%this) {
%msg=%this.getValue();
Parent::send(%this);
if(getWord(%msg,0)$="@BT") {
%str=getWords(%msg,1);
$BuildChar::Count=0;
for(%i=0;%i<strLen(%str);%i++) {
%time=buildChar(getSubStr(%str,%i,1),%time);
}
}
else if(getWord(%msg,0)$="@BTS") {
for(%i=1;%i<=$BuildChar::Count;%i++) {
cancel($BuildChar::Tick[%i]);
}
}
}
};
activatePackage(buildChar);

"Fail"
Tell us what it does you idiot.

"Fail"
Tell us what it does you idiot.
When you say
@bt blah
with a ghosted brick
Your brick should build the word blah.



Place a ghost brick. Type "@bt hurp durp i can meak a gui". Get built characters.

Place a ghost brick. Type "@bt hurp durp i can meak a gui". Get built characters.
It doesn't do anything but just shift, i typed:
Quote from: Me On BL
@bt Test
And it just shifted :|

Do you have the library folder?

When you say
@bt blah
with a ghosted brick
Your brick should build the word blah.
What's the issue? Console?

Can you or Truce please change it so it doesn't use the chat? I hate it when people spam my server (or others) with those @ commands.

Can you or Truce please change it so it doesn't use the chat? I hate it when people spam my server (or others) with those @ commands.
@whois 150
[Whois Script Bot] 150 is Ephialtes

Bauklotz made another thing like that
No "@" and actually, everybody can do it.

Can you or Truce please change it so it doesn't use the chat? I hate it when people spam my server (or others) with those @ commands.
Truce, you tell me the glitch :(

Can you or Truce please change it so it doesn't use the chat? I hate it when people spam my server (or others) with those @ commands.

I'm normally against it, but this way it'd let others (more so the admins) know you're actually building some text rather than just spamming bricks - it looks that way at first.

Truce, you tell me the glitch :(

I don't have this script anymore since I didn't feel like it was worth keeping, so I can't test it myself. Find someone who has the packaged version with /lib/ included and ask if theirs still works.

I don't have this script anymore since I didn't feel like it was worth keeping, so I can't test it myself. Find someone who has the packaged version with /lib/ included and ask if theirs still works.
Mine does have  /lib/... Do you want it so you can find out!?
It just goes ----->

Bauklotz made another thing like that
No "@" and actually, everybody can do it.

Billy Mays: whois name Badspot
Bauklotz: >>WhoIs:
  • Badspot (Date Updated)


Damn, it's hard posting from LCARS, and it screwed up the text.