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.


  Show Posts
Pages: [1] 2 3
1  Scripting / Script Releases / Helicopters and Nukes! on: November 11, 2017, 03:23:42 pm
Yes you read that right! Helicopters and Nukes are coming to LU!

But firstly, just to make you less excited so you don't do anything stupid, both of them are together in this post BUT not together in a script!


So here's the nuke script

Here are some photos
Aiming screen:


Dropping the nuke:


And the aftermath!:





Controls
W - Moves the camera North   ^
A - Moves the camera West     <
S - Moves the camera South    v
D - Moves the camera East      >
Shift - Moves the camera Up          ^^^
Control - Moves the camera Down   vvv
Left Mouse Button - Launches the Nuke!    X

Commands
/test - "Teleports" you the the "Helicopter" (nice command I know, don't judge)


Known Bugs
Don't you just love bugs.
-The third time anyone drops the nuke, everyone in the server crashes*.
That's it.

*Definition of crash - of (a computer, computing system, or software) fail suddenly, Oxford Dictionary



Summary
So basically you navigate to where you want to nuke with W, A, S, D, fly higher or lower with shift and control and nuke with the left mouse button! (Found on your keyboard and mouse) A bomb will pop out, the camera will follow the nuke to the ground and the nuke will detonate itself when it reaches ground level (if you don't know how nukes work).

I added a nice little counter at the bottom right of the screen that tells you the current position of the camera which you're supposed to pretend is actually a helicopter with nukes, and also the ground level of the camera's position.

Also I've added a maximum flying height of 500m (or whatever units lu uses) and a minimum flying height of about 50m from the ground level, along with a crappy detection system that spams you with "We'll hit a building!" when you are about to hit a building (the lower part of one, anyway).




And the helicopter script
No nukes for this one :( but hey 3D camera!

More photos








More Controls
F - Enters/Exits the helicopter
ENTER - Starts/Stops the Helicopter's Engine
W - Increases the Helicopter's Engine Power    +++
S - Decreases the Helicopter's Engine Power    - - -
A - Rotates the Helicopter Left   <
D - Rotates the Helicopter Right >
Arrow Up - Tilts the Helicopter Forward      ^
Arrow Down - Tilts the Helicopter Backward   V
Arrow Left - Tilts the Helicopter Left         <
Arrow Right - Tilts the Helicopter Right     >


More Commands
None. Aren't you happy.

Bugs
I realize that the player still moves when flying the plane, and there's still tons of bugs like how the helicopter stops flying halfway sometimes I'm not going to update this anymore so have fun fixing it! xD


Another summary
So basically you enter the helicopter by pressing F, then you start the engine by pressing enter. You give the engine more power by pressing W, less power by pressing S. When you're high enough, press A or D to rotate the helicopter towards the left or right respectively, and press the up down left right arrow key to tilt it forwards, backwards, towards the left or towards the right respectively.

I added an INI file which loads the position of the helicopter and spawns it into the world when the script loads. It is recommended that you use that to spawn in the helicopter instead of manually adding it via commands or whatever method, otherwise fear the wrath of ERRORS!

There's tons of math calculations to this and this script isn't exactly 'edit friendly' so you'll probably have to dig around quite a lot and find out where to change the bindkeys.

The GUI is horribly buggy with tons of overlapping labels, I'm just going to release it now because I'm too lazy to continue working on it. Feel free to edit the script and use it in your server or play around with it or do whatever but if you're going to upload another script based on this, HAVE THE DECENCY TO AT LEAST CREDIT ME AND LINK BACK TO THIS TOPIC. I get really annoyed at people who just takes other people's scripts and claims it as their own.

Other than the GUI, the Helicopter's movement, script management and the camera movement can really be improved (as Vortex suggested). If you are to make a better version of this script, do share it with the LU community by replying to this topic or whatever AS LONG AS YOU CREDIT ME.

Lastly, the reload time thingy was something i wanted to implement but got too lazy to, again, feel free to add guns or nukes or whatever to this thing just... CREDIT ME

Finally for the long awaited Downloads
I put it here just to make you read all my shit :)
Nuke

Helicopter

THE MOST IMPORTANT PART OF THIS POST, THR CREDITS

Vortex - calculatuons for the 3d camera for the helicopter script
Krulcifer - My friend IRL that suggested and supported me with ideas
My math teacher - For teaching me wtf sin and cosin was.




[size=200pt].[/size]
2  Scripting / Script Releases / Re: Motley's base script on: November 11, 2017, 01:06:09 pm
Ooooh nice script! Hope to see more scripts coming!
3  Scripting / Script Help / Remove spawnclass on: April 08, 2017, 12:49:44 pm
http://liberty-unleashed.co.uk/LUWiki/Squirrel/Server/Functions

There's a way to add spawnclasses via script but there dosent seem to be a way to remove them. .Remove() and .Delete() both dont work, is there a way to remove spawnclasses via scripts?


Edit:

Quote
[7:01 PM] Ankris: foreach(idx, val in SpawnClass) { print(idx+" - "+val); }
[7:02 PM] Rhytz: SCRIPT: constructor - (function : 0x0xf55209c0)
SCRIPT: GetWeapon - (function : 0x0xf5520b58)
SCRIPT: AddWeapon - (function : 0x0xf5520d40)
SCRIPT: RemoveWeapon - (function : 0x0xf5520c50)
SCRIPT: GetWeaponAmmo - (function : 0x0xf5520bd8)
[7:03 PM] Ankris: then no
[7:03 PM] Ankris: not pussibulz
[7:03 PM] Ankris: unless u do some hax
NUEVOS MENSAJES
[7:05 PM] Rhytz: thats lame



Since this feature dosen't currently exist hopefully it'll be added in the next lu version?(still waiting for it ;p)
4  Liberty Unleashed / Support / Masterlist spam on: April 03, 2017, 03:12:34 pm
Can anything be done to these servers?

http://imgur.com/a/88HKF
5  Scripting / Script Snippets / Commands on: March 11, 2017, 04:36:14 am
I found a more efficient way( or not depending on how you look at it ) of /cmds, it basically will check if you meet the criteria and if you do it'll show the command when you type /cmds


Code: [Select]

local CommandLines = 5; //This will show 5 commands per line


local Commands = ["a", "b", "c", "d", "e", "f", "g", "h"];//Define all server commands here

function onPlayerCommand( pPlayer, Command, Param )
{
Command = Command.tolower();
if( Command == "cmds" )
{
local MessageLine = "";
local MessageCount = 0;
foreach( String in Commands )
{
if( Your Criteria here )
{
if( MessageCount != 0 ) MessageLine += ", ";
MessageLine += "/" + String.tolower();
MessageCount++;
}
else if( 2nd Criteria )
{
if( More Criteria )
{
if( MessageCount != 0 ) MessageLine += ", ";
MessageLine += "/" + String.tolower();
MessageCount++;
}
}
else if( 3rd Criteria )
{
if( More Criteria )
{
if( MessageCount != 0 ) MessageLine += ", ";
MessageLine += "/" + String.tolower();
MessageCount++;
}
}
else if( Fourth Criteria )
{
if( More Criteria )
{
if( MessageCount != 0 ) MessageLine += ", ";
MessageLine += "/" + String.tolower();
MessageCount++;
}
}
else if( Fifth Criteria )
{
if( More Criteria )
{
if( Even More Criteria )
{
if( MessageCount != 0 ) MessageLine += ", ";
MessageLine += "/" + String.tolower();
MessageCount++;
}
}
}
if( MessageCount == CommandLines )
{
MessagePlayer(MessageLine, pPlayer);
MessageCount = 0;
MessageLine = "";
}

}
if( MessageLine != "" ) MessagePlayer( MessageLine, pPlayer);
}
}


The output will look something like this:
Code: [Select]
/a, /b, /d, /e, /g
/h

You can add more criteria if you want.

This probably isn't the most efficient method however i think its better than listing all the commands when a player types /cmds. If you have a better way of doing this, feel free to reply.
6  Scripting / Script Snippets / Re: Date on: March 11, 2017, 04:17:26 am
oh nice, works so much better than mine thanks :)
7  Scripting / Script Snippets / Date on: March 09, 2017, 02:39:25 pm
I made this because I wanted to get the date and day of the week individually which GetFullTime() and GetDate() can't seem to get.



Code: [Select]
function GetDate( Part )
{
Part = Part.tolower();
if( Part == "date" )
{
local Month = GetTok( GetFullTime(), " ", 2 );
local Day = GetTok( GetFullTime(), " ", 3 );
local Year = GetTok( GetFullTime(), " ", 5 );

if( Month == "Jan" ) Month = "January";
if( Month == "Feb" ) Month = "February"
if( Month == "Mar" ) Month = "March"
if( Month == "Apr" ) Month = "April"
if( Month == "May" ) Month = "May"
if( Month == "Jun" ) Month = "June"
if( Month == "Jul" ) Month = "July"
if( Month == "Aug" ) Month = "August"
if( Month == "Sep" ) Month = "September"
if( Month == "Oct" ) Month = "October"
if( Month == "Nov" ) Month = "November"
if( Month == "Dec" ) Month = "December"

return Day + " " + Month + " " + Year;
}
else if( Part == "day" )
{
local Day = GetTok( GetFullTime(), " ", 1 );

if( Day == "Mon" ) Day = "Monday";
if( Day == "Tue" ) Day = "Tuesday"
if( Day == "Wed" ) Day = "Wednesday"
if( Day == "Thu" ) Day = "Thursday"
if( Day == "Fri" ) Day = "Friday"
if( Day == "Sat" ) Day = "Saturday"
if( Day == "Sun" ) Day = "Sunday"
return Day;
}
else if( Part == "time" )
{
local Time = GetTok( GetFullTime(), " ", 4 );

return Time;
}
else return false;
}



Usage:
GetDate("date");
Which returns Day, Month and the Year
For example, 9 March 2017

GetDate("day");
Which returns the day of the week in full form
For example, Thursday

GetDate("time");
Which returns the Hour:Minute:Second
For example, 12:34:56



Note: This might not be the most efficient way to do this but i can't think of any other way so...
8  Liberty Unleashed / Liberty Unleashed Chat / Re: Pickups. on: March 03, 2017, 06:05:58 pm
Anderi's so biased that he wouldn't specify my option :(
9  Liberty Unleashed / Liberty Unleashed Chat / Re: Pickups. on: March 03, 2017, 03:07:41 pm
By "script" he means a script that loads the pickups on server start, getting the data from an ini file.;p
10  Off Topic / General Chat / Re: Why lu's fps is locked at 30? on: February 12, 2017, 03:31:04 pm
nice one xDDDDD
11  Liberty Unleashed / Suggestions / Re: Helicopters in lu on: February 11, 2017, 09:23:48 am
Quote from: LUmtap
change dodo skin
You can't actually change the skin of the dodo in LU unless you use mods, but then even if you did it'll only be for the client and not for the whole server.

Quote from: LUmtap
enter in helicopter and use map editor to move
I think that this is possible but a lot of work will need to be done, helicopter speed, elevation, object moving etc, however the object would be server side and players with higher pings (me :p ) may see the object being moved a bit behind time. Moving the helicopter object might also cause server lag since it has to be moved many times and tons of calculations have to be made.
12  Off Topic / General Chat / Re: Why lu's fps is locked at 30? on: February 09, 2017, 04:32:08 pm
it probably has something to do with the sync or something, with higher fps, people tend to shoot faster and jump faster while people with lower fps just think that they're using speedhack or something. Anyway LU's fps lock can be disabled but it's pretty troublesome and probably not recommended in most servers
13  Liberty Unleashed / Bug Reports / Re: Bug in a server on: February 09, 2017, 04:28:56 pm
What do you mean by '8 ball's house disappeared?'
14  Liberty Unleashed / Suggestions / Re: Helicopters in lu on: February 09, 2017, 04:27:45 pm
The ID isn't actually banned but most server owners block it since nothing spawns and even if something did spawn, you can't fly it anyway, so there is basically no point leaving it unblocked at all.
15  Scripting / Script Releases / Re: Changelogs on: February 03, 2017, 12:38:02 pm
Thanks for the tip, I'll go apply it :3
Pages: [1] 2 3
© Liberty Unleashed Team.