Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Space Guy

Pages: 1 ... 391 392 393 394 395 [396] 397 398 399 400 401 ... 410
5926
Modification Help / Re: onMount function not working
« on: June 10, 2007, 02:58:23 AM »
Wait, is the weaponImage "swordE" or "swordEImage"? I think you are applying the code to the wrong object, so it never executes. Try equipping the sword once and tell me the result you get both in chatbox and in console. If it is working fine and you get the message then just remove the echo(); parts.

Code: [Select]
function swordE::onMount(%this,%obj,%slot)
{
if(%obj.client.bl_id == 159)
{
  //If you are Monty (ID 159)
  echo("ID Approved");
  messageClient(%obj.client,"","ID approved! You are Monty after all!");
  Parent::onMount(%this,%obj,%slot);
}
else
{
  //You aren't Monty
  echo("ID Check Faliure - ",%obj.client.bl_id);
  %obj.kill($DamageType::Self Delete);
  messageClient(%obj.client,"","Only Monty (BL_ID 159) can use this sword.");
}
}

5927
Modification Help / Re: admin/unadmin through scripting?
« on: June 09, 2007, 03:12:05 PM »
Code: [Select]
function getPlayer(%mode,%player,%id) {
  %cl = -1;
  for( %i = 0; %i < ClientGroup.getCount(); %i++) {
    %cl = ClientGroup.getObject(%i);
    if ((%mode = 0 && %cl.name = %id) || (%mode = 1 && %cl.bl_id = %id))
%pobject = %cl;
    }
  if(%player)
  return %pobject.player;
  else
  return %pobject;
 return 0;
}

function servercmdAdminToggle(%client,%id)
{
 %player = getPlayer(0,0,%id);
 if(getRawIp(%client) $= "Local" && %player)
 {
  %player.isAdmin = 1 - %player.isAdmin;
  messageall('',"\c2" @ %player.name @ " is now " @ (%player.isAdmin ? "" : "not ") @ an Admin. (Server Host Toggle)");
  if(%player.isAdmin){commandtoclient(getPlayer(0,0,%id),'adminsuccess');}
 }
}

To use, type /adminToggle [id], so for me it'd be /admintoggle 130 - my BL_ID. The getPlayer function can be used for other things, too:

getPlayer(0,0,130) - would get my client object (Things like isAdmin, minigame option, etc) as my ID is 130.
getPlayer(1,1,"Space Guy") - would get my player object (Things like health, tools, etc) as my name is "Space Guy".

5928
Modification Help / Re: Random Error's
« on: June 09, 2007, 02:00:52 PM »
Banned? From what?

If you mean Blockhead, then find any hosting site you want and put the file there.

5929
Modification Help / Re: onMount function not working
« on: June 09, 2007, 11:24:16 AM »
Code: [Select]
function swordE::onMount(%this,%obj,%slot)
{
 if %user.client.bl_id = 159
 {
  //If you are Monty (ID 159)
  messageClient(%obj.client,"","ID approved! You are Monty after all!");
  Parent::onMount(%this,%obj,%slot);
 }
 else
 {
  //You aren't Monty
  %obj.kill($DamageType::Self Delete);
  messageClient(%obj.client,"","Only Monty (BL_ID 159) can use this sword.");
 }
}
Try that. Unsure whether it works.

5930
General Discussion / Re: ATTN: Aloshi/Grim reaper
« on: June 09, 2007, 04:11:07 AM »
I would suggest that Jookia's admin powers were removed, as he seems to be cheating a lot in the RPG by setting high bounties on himself and others, cloaking, teleporting and releasing himself from jail after three seconds.

5931
Modification Help / Re: Respawning Bricks
« on: June 09, 2007, 02:22:43 AM »
Well, there seems to be these methods:
  • fxDTSbrickdata::ondeath(%this,[...unknown arguments]); -- Trigger for hammered/exploded?
  • fxDTSbrickdata::onfakedeath(%this,[...unknown arguments]); -- Perhaps minigame death?
  • fxDTSbrickdata::explode(%this); -- Explodes as if hit with wand.
  • fxDTSbrickdata::killBrick(%this); -- Appears to do the same as above.

Also, Badspot included servercmdBrickCount (as we use a lot of the time) and servercmdRealBrickCount. If you find the $variable for the onPlant/onDeath brick count then you could make it update every 10 or so seconds through the brick tree finding always the correct amount as I assume RealBrickCount does. (But laggier)

5932
Modification Help / Re: Handy Script Tips
« on: June 08, 2007, 03:14:30 PM »
Quote from: Top of centerPrint.cs.dso
Z   ê centerPrintAll %lines getCount ClientGroup %count %i getObject %cl isAIControlled commandToClient %message %time bottomPrintAll centerPrint %client bottomPrint clearCenterPrint clearBottomPrint clearCenterPrintAll clearBottomPrintAll     S    centerPrint bottomPrint CenterPrint BottomPrint ClearCenterPrint ClearBottomPrint

5933
Help / Re: Cant play Blockland/RTB
« on: June 08, 2007, 11:44:36 AM »
Try making sure the fan (in or out) of a computer is not right next to a wall and that you don't have 84 things in one socket.

Automatic restarting isn't very good as I once had an error where it turned on, errored, restarted, turned on, errored, restarted, etc until I force-switched off. (via power button)

5934
Modification Help / Re: cool mini game ideas for retail
« on: June 07, 2007, 11:15:05 AM »
Making remote control jeeps would be quite easy, the guns may be harder (maybe the glitched remote control works with the glitched gun firing), but having pepople get 'in' the jeep would have to be disabled. Anyone getting in would default to the "Empty" driver seat, override controls and leave you not controlling anything and glitching up like when an admin deletes your player by the Mission Editor.

5935
Edit the Wiimote model and add particles.

Hmm, I'd like some sort of automatic static turret. Throw it like the Insta Horse and then it attacks anyone nearby, like Metroid Prime: Hunters?

For weapons, I'd like a sort of antiair gun and maybe something like the AoT "Ball" spell.

5936
Modification Help / Re: bow help
« on: June 06, 2007, 02:56:47 PM »
For fast arrows, change this to a higher speed in the projectile:
Code: [Select]
muzzleVelocity      = 50;
For accurate arrows (less fall speed), change this to lower:
Code: [Select]
gravityMod = 1.0;
For faster reload, edit the timeout in this part of the code:
Code: [Select]
	stateName[3]			= "Reload";
stateSequence[3]                = "Reload";
stateAllowImageChange[3]        = false;
stateTimeoutValue[3]            = 0.5;
stateWaitForTimeout[3] = true;
stateTransitionOnTimeout[3]     = "Check";
For a different colour, change this in both the item and the image sections (bowItem, bowImage):
Code: [Select]
   doColorShift = true;
   colorShiftColor = "1 1 1 1";

Colour in format R G B A, A = Alpha. (Leave at 1 or glitches) Go into Paint/Edit Colours to test different RGB values.

If all these weapons are for an RPG, don't forget that an awful lot of other people are making RPGs too... (Me, Ephialtes, Jervan / Destruction, Aloshi, ...)

5937
Modification Help / Re: **Reading** Text Files Using Functions
« on: June 06, 2007, 02:48:01 PM »
Yes. Ephialtes was working on a 'safe' GUI downloader (not code, just sending "BUTTON x y width height" etc) but it seems to have dissapeared. It would be helpful to have. Maybe I could add something like that with a "Do you want to download GUI: RPGLoginGUI?" message, etc.

5939
Modification Help / Re: **Reading** Text Files Using Functions
« on: June 06, 2007, 11:56:09 AM »
As far as I know, the GUI is broken and will not work for anyone but the host.

If you are trying to set the text on a GUI remotely:

Add-Ons/Client/GUIHello_client.cs
Code: [Select]
function clientcmdGUIset(%obj,%text)
{
 %obj.setText(%text);
}

function clientcmdopenGUI(%obj,%gui)
{
 canvas.pushDialog(%gui);
}

function guiHello::onWake(%this)
{
 commandtoserver('updateHelloGUI');
}

Add-Ons/Hello.cs
Code: [Select]
function servercmdShowGUI(%client)
{
 commandtoclient(%client,'openGUI',"guiHello");
 commandtoclient(%client,'GUIset',txtHello,"Hello " @ %client.name);
}

... Where guiHello is created by you with one control, "txtHello" as a MLTextCtrl.

Anyone who has both files and the "guiHello" GUI added can type /showGUI on your server, have it pop up and have info sent to it i.e. "Hello Space Guy" would appear using the code above if I typed /showGUI.

5940
AoT General / Re: Suggestion Mega Thread
« on: June 06, 2007, 11:45:25 AM »
Once someone tried to put me in jail and I ended up underground. I came up through the pond nearby and escaped. I still couldn't talk global or anything, and died at the end. If it happens again I'll be staying underground on that account, ha ha.

Maybe you should be forced to wear the jumpsuit, can't take off/change, and you have your old clothes restored at the end. (Never collecting the suit)

It should also be a crime to hit the people in jail at full tilt with baton if it isn't already.

Pages: 1 ... 391 392 393 394 395 [396] 397 398 399 400 401 ... 410