Blockland Forums > Modification Help
Client Sided RPG Mod
PurpleMetro:
So I like got a copy of blockland to test all my scripts on there so I won't mess with any important stuff on my main blockland. Anyway i've come up with a script called a client sided RPG mod. Not like Nexus' adventure mod. All I need is a complete explanation on how to use blockland's wait command. If there is none or not even any simmiliar then is there even another way to do it?
Scars75:
You could use schedules to delay functions.
--- Code: ---schedule(time in milliseconds, obj(usually 0), function name, arg1, arg2, arg3, ...);
--- End code ---
just one thing:
--- Code: ---echo(1);
schedule(1000, 0, echo, "2");
echo(3);
--- End code ---
This will echo 1, then 3, then wait one second and echo 2 like this:
1
3
2
Or you could do this:
--- Code: ---schedule(2000, 0, eval, "
dosomestuff(\"make sure to use backslashes for quotes inside here\");
dosomeotherstuff(32);
echo(\"asdf\");
");
--- End code ---
PurpleMetro:
--- Quote from: Scars75 on September 02, 2011, 10:33:58 PM ---You could use schedules to delay functions.
--- Code: ---schedule(time in milliseconds, obj(usually 0), function name, arg1, arg2, arg3, ...);
--- End code ---
just one thing:
--- Code: ---echo(1);
schedule(1000, 0, echo, "2");
echo(3);
--- End code ---
This will echo 1, then 3, then wait one second and echo 2 like this:
1
3
2
--- End quote ---
Ok thanks Scars I will keep that in mind but i've been tweaking my client.cs file for it a bit. Tested it out multiple times and always got the same error. It says the error halt is in the lines with the ## stuff in it. I just guess that means where the error is. But those errors were in my variable placings. It looked like Health = ##0##;
Scars75:
--- Quote from: PurpleMetro on September 02, 2011, 10:37:09 PM ---Ok thanks Scars I will keep that in mind but i've been tweaking my client.cs file for it a bit. Tested it out multiple times and always got the same error. It says the error halt is in the lines with the ## stuff in it. I just guess that means where the error is. But those errors were in my variable placings. It looked like Health = ##0##;
--- End quote ---
Show me your code.
PurpleMetro:
--- Quote from: Scars75 on September 02, 2011, 10:39:03 PM ---Show me your code.
--- End quote ---
--- Code: ---//Script Side Variables
Health = 0;
Hunger = 0;
Thirst = 0;
Package InGameRPG
{
echo("InGameRPG Package run successfully.");
echo("Hunger - (T)");
};
--- End code ---