Author Topic: Scripts..i need to learn some codes..TY :)  (Read 765 times)

iv benn searching..and searching...and searching?
but still no luck?
can anybody get me a link or somtin?
plz..i need to learn a bit more about codes and stuff...
Ty guys :)
« Last Edit: October 24, 2008, 01:47:49 PM by adude »

You CAN'T, Badspot deleted the archives so idiots would stop trying to use, and porting broken add-ons.

You CAN'T, Badspot deleted the archives so idiots would stop trying to use, and porting broken add-ons.
im not trying to port add-ons i just want to learn some codes.
like these are the ones i want the most right now!
the water rising mod [flood script]
and the
Change colour script
im not asking for these...

Code: [Select]
// Original scripy by Jookia
// New [player-friendly] script by rky
//0.5
function flood(){
if(!isobject(water)){return;}
if(!$amountup){$amountup=1;}
if(!$time){$time=60000;}
%scale=water.getscale();
%x=getword(%scale,0);%y=getword(%scale,1);%z=getword(%scale,2)+$amountup;
%new=%x SPC %y SPC %z;
%newWater = new waterBlock(newWater : water)
{
scale = %new;
};
missionCleanup.add(%newWater);
water.delete();
%water = new waterBlock(water : newWater)
{
scale = %newWater.scale;
};
%newWater.delete();
missionCleanup.add(%water);
$raisewater = schedule($time, 0, "flood");
}
function servercmdcancelflood(%client)
{
 if(%client.issuperadmin){
 cancel($raisewater);
 announce("The flood has ended!");}
}
function servercmdfindfloodwater(%client){
if(%client.issuperadmin){
while(%i < missionGroup.getCount())
{
if(missionGroup.getObject(%i).getType() == 16)
{
%water = missionGroup.getObject(%i);
}
if(%water){
%waterater.setName("water");
announce("Water found. You can now begin a flood");
return;
}
%i++;
}
}
}
function servercmdstartflood(%client,%time,%amount)
{
 if(%client.issuperadmin){
 $time=%time;
 $amountup=%amount;
 $raisewater = schedule($time, 0, "flood");
 announce("The flood has begun!");}
}
function servercmdstartadvflood(%client,%time,%amount)
{
 if(%client.issuperadmin){
 $time=%time;
 $amountup=%amount;
 $raisewater = schedule($time, 0, "advflood");
 announce("The flood has begun!");}
}

function advflood(%times){
if(!isobject(water)){return;}
if(!$amountup){$amountup=1;}
if(!$time){$time=60000;}
        %times++;
if(%times>3){%times = -5;}
%amount=$amountup+%times/2;
%scale=water.getscale();
%x=getword(%scale,0);%y=getword(%scale,1);%z=getword(%scale,2)+%amount;
%new=%x SPC %y SPC %z;
%newWater = new waterBlock(newWater : water)
{
scale = %new;
};
missionCleanup.add(%newWater);
water.delete();
%water = new waterBlock(water : newWater)
{
scale = %newWater.scale;
};
%newWater.delete();
missionCleanup.add(%water);
$raisewater = schedule($time, 0, "advflood",%times);
}
function servercmdstretchwater(%client){
if(%client.issuperadmin){
if(!isobject(water)){return;}
%new="2048 2048" SPC getword(water.getscale(),2);
%newWater = new waterBlock(newWater : water)
{
scale = %new;
};
missionCleanup.add(%newWater);
water.delete();
%water = new waterBlock(water : newWater)
{
scale = %newWater.scale;
};
missionCleanup.add(%water);
newWater.delete();
announce("The water has been stretched to cover the entire map!");
}
}

TY! i will go study this now!
lol!
edit:are there commands for this?
and where are they in the script?
Ty anybody!
« Last Edit: October 24, 2008, 01:38:25 PM by adude »