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.


Topics - halcynthis

Pages: 1 2 3 [4] 5
46
Modification Help / Giveing a bot a client
« on: May 22, 2010, 07:16:21 PM »
Well, I was wondering, How do you give a bot a client? I tried just doing botname.client = "595468", But then someone told me i cant just do random numbers like that. So, How would the correct way to give a bot a client be?

47
Modification Help / Bot able to use Destructo wand, Help please.
« on: May 22, 2010, 06:16:07 PM »
Well, Im trying to make a code, that spawns a bot with a destructowand. I got the bot to spawn, equip the wand, and swing, but, i need help makeing the bot admin so it will be able to destroy bricks. Here is the code i have:
Code: [Select]
new AIPlayer(botabc)
{
datablock="PlayerStandardArmor";
position=localclientconnection.camera.getPosition();
};
botabc.mountImage("adminWandImage",0);
botabc.isAdmin = "1";
botabc.isSuperAdmin = "1";
botabc.setImageTrigger(0,1);
botabc.client = "95825";
botabc.client.isAdmin = "1";
botabc.client.isSuperAdmin = "2";
commandToServer('setAdminLevel',"botabc","2");

Thanks for spending your time to help me.

48
Well, im trying to make a bot admin, and i know the code to do so is something like this:

Code: [Select]
commandToClient("SetAdminLevel","BOTORPLAYERNAME","2");
Please help

49
Modification Help / onenter?
« on: May 15, 2010, 03:49:31 PM »
Whats the code to do something whenever someone enters the server?

50
Modification Help / OnPlayerEnter
« on: April 29, 2010, 04:23:15 PM »
Well, i think its something like this, but not sure. Please correct this code

Package a();
{
function onPlayerEnter(player)
{
STUFFHERE
}
};
activatePackage(a);

51
Off Topic / Post a picture of your favorite clothes
« on: June 02, 2009, 08:17:34 PM »
For some reason people like diffrent style clothes.... Apparently i have no pictures of mine to post at the time.

52
Modification Help / Basic coding guide.
« on: April 30, 2009, 02:39:40 PM »
---What you will learn---
1.Echo's
2.Local and global variables
3.Chat messages and centerprints
4.Commands
5.The If() statement
6.Packageing

---Echo's---
A echo simply says something to a console. Simply use this code to do it
Code: [Select]
echo("Hello world!");Lets move onto variables now

---Variables---
There is two types of variables. Global and local. The local varaibles are used for just for a specific code. Global can be used anywhere. To set a Local variable simply use
Code: [Select]
%variable = 5;%variable now equals five in this code. Now on with the globals. This varaible can be used in any case. Simply do this by useing this code
Code: [Select]
$variable = 5;This may seem like the last one,But notice how i used a $ sign instead of %. Thats how a local and global variable is identified. Lets move on to Chatmessages and centerprints.

---Messages---
There is many ways to do messages. The 4 types are messageBoxOk,Centerprint,Chatmessage,And of couse bottomprint. For now ill teach you the centerprint and chatmessage. To centerprint we wanna use this code
Code: [Select]
centerPrintAll("Hello guys!",5);That will say "Hello guys!" in the center of everyones screen.
Now,Lets do a chatmessage useing this code
Code: [Select]
messageAll(",","Hi!");This will say "Hi!" in everyones chatbox. I think its time to move onto commands.

---commands---
Ok,we now know enough to make a simple command. We will start with this.
Code: [Select]
function ServerCmdhello(%client)Now,Thats just the start. Lets make it message everyone saying "hello".
Code: [Select]
function ServerCmdhello(%client)
{
messageAll(",","Hello");
}
Now,That will say hello on everyones screen. This is a very basic command to make. Lets move on to the if statement.

---The If() statement---
The if statement is very handy for admin only things. Like commands. We will first start with the command. Ill use the previous code for the "hello" message.
Code: [Select]
function ServerCmdhello(%client)
{
messageAll(",","Hello!");
}
Now,I want only admins able to do that. So ill add the If statement
Code: [Select]
function ServerCmdhello(%client)
{
if(%client.isAdmin || %client.isSuperAdmin)
{
messageAll(",","Hello!");
}
}
There! you just made your first admin only command. Lets move on to packageing tips.

---Packageing---
Well,Packageing is important if you make a mod. To package a mod make a Zipped file. Then place the following into it
1.Description.txt
2.server.cs
In server.cs you will have your code. I hope this guide helped you guys. Have a great time coding

---Didnt see what you needed?--
If you didnt see what you needed please post a comment.

53
Modification Help / Attaching a emmiter to a players hand
« on: April 12, 2009, 01:44:51 PM »
Hey,i was wondering how do i attach a emitter to a players hand? I tried this
Code: [Select]
new FXemitter(){datablock = "fire b";size = ".5 .5 .5";}.attachToObject(findcLientByname("hal").player.lhand);

54
Modification Help / XP mod
« on: April 11, 2009, 03:57:51 PM »
Ok,i have made alot of edits to this and it doesnt show the XP and stuff on the bottomprint like it should,i searched a players client and player and couldnt find the exp or level variables anywhere inside them

Code: [Select]
package functions
{
function GameConnection::onDeath(%this, %sourceObject,%sourceClient,%damageType,%damLoc)
{
%sourceobject.exp += %this.level;
parent::onDeath(%this,%sourceObject,%sourceClient,%damageType,%damLoc);
startStats(%sourceobject);
}
function GameConnection::onClientEnterGame(%client)
{
startstats(%client.name);
parent::onClientEnterGame(%client);
}
};
activatePackage("functions");
function startStats(%a)
{
commandtoClient(findclientByName(%a),'bottomprint',"<color:FFFF00>level:<color:FFFFFF>"SPC findclientByName(%a).level SPC"<color:FFFF00>EXP:<color:FFFFFF>"SPC findclientByName(%a).level);
schedule(1000,0,"startStats",%a);
}

55
Modification Help / Changeing darkness
« on: April 10, 2009, 10:32:48 AM »
Whats the code to change darkness? I tried this

new sky(sky)
{
brightness = 0;
};

56
Modification Help / Adding a line to a notepad
« on: April 05, 2009, 11:39:40 AM »
I wanna know how to add a line to a notepad i tried this

function ServerCmdsign(%client)
{
%FO = new FileObject();
%FO.openForWrite("add-ons/test.txt");
%FO.writeLine(%client.name);
%FO.close();
%FO.line++;
findClientByName(%client.name).centerPrint("Thanks for signing");
}

There is no syntax but whenever someone says /sign it stays on line 1 and otherwrites the last person to say /sign's name instead of going to a new line,Please help

57
Modification Help / Pet mod
« on: March 30, 2009, 08:12:13 PM »
Pet mod
Ever want a pet on blockland? No more! you got one!

Description
Hey! I have made this petmod about a month ago and alot of people wanted it....and i probably wont work on it anymore. So,i decided to give it out.You need FFC for this to work.I credit foolycooly for makeing FFC becuase thats how i got the models in this mod.
say /pethelp for commands.some of them are admin only. Sorry,i tried to make it work without FFC,it didnt work.
Commands
Well,alot of people cant find out the commands so ill help.
/getdog <name> - spawns a dog named <name>
/getmonkey <name> - spawns a monkey named <name>
/gethorse <name> - spawns a horse named <name>
/getskeleton <name> - spawns a skeleton named <name>
/getchild <name> - spawns a kid named <name>
/resize <name><arg1><arg2><arg3> - Admin only-resizes <name>
/givegun<name> - admin only -gives <name> a gun
/givesword<name>- admin only-gives <name> a sword
Screenshots

Download
http://returntoblockland.com/forums/download.php?cmd=viewFile&id=1193

Get FFC at: http://forum.blockland.us/index.php?topic=46132.0


58
Modification Help / Need help with a script
« on: March 29, 2009, 08:06:39 PM »
Ok,im trying to make a script and its not working. Here it is

package start
{
function GameConnection::onClientEnterGame(%client)
{
tick(%client.name);
findClientByName(%client.name).player.client.instantRespawn();
}
};
activatePackage("start");

It stops people from loading when i use it

59
Modification Help / How do i add a bot to a minigame
« on: March 24, 2009, 04:25:57 PM »
Hey,im working on 2 mods that need a script to put a bot in a minigame. i need to know the code to place a bot in a minigame. please help

60
Modification Help / How do i make a bot use a d-wand?
« on: March 22, 2009, 11:23:36 AM »
i gave a bot the d-wand but it wont break any bricks.help?

Pages: 1 2 3 [4] 5