Thread: spar script.
View Single Post
  #1  
Old 12-05-2009, 03:43 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
spar script.

This code had been working fine for months, and now it just up and stopped working. nothing has been changed whatsoever as far as i know. any ideas?

PHP Code:
function onCreated()
{
  
this.attr[10] = false;

  
this.spar_list "";

  
UpdateList();
  
this.setshape(13232);
}
function 
onPlayerEnters()
{
  
CheckSparList();

  if (
InSpar(player))
  {
    
player.30.5;
    
player.47;
  }
}
function 
onPlayerLeaves()
{
  if (
GetSparNumber() < 2)
    
this.attr[10] = false;
}
function 
onPlayerChats()
{
  if (
player.chat.starts("/join"))
  {
    if (!(
player.account in this.spar_list))
    {
      if (!
InSpar(player))
      {
        
this.spar_list.add(player.account);

        
CheckSparList();
      }
    }
  }
  if (
player.chat == "/leave")
  {
    if (
InSpar(player))
    {
      if (
this.attr[10] == false)
      {
        
player.30.5;
        
player.47;

        
CheckSparList();
      }
    }
  }
  if (
player.chat == "start")
  {
    if (
GetSparNumber() == 2)
    {
      if (
this.attr[10] == false)
      {
        if (
InSpar(player))
        {
          for (
pl:players)
          {
            
pl.hearts 20;
            if (
pl.account != player.account && InSpar(pl))
            {
              if (
pl.chat == "start")
                
BeginSpar();
            }
          }
        }
      }
    }
  }
  if (
player.chat == "end")
  {
    if (
GetSparNumber() == 2)
    {
      if (
this.attr[10] == true)
      {
        if (
InSpar(player))
        {
          for (
pl:players)
          {
            if (
pl.account != player.account && InSpar(pl))
            {
              if (
pl.chat == "end")
                
this.attr[10] = false;
            }
          }
        }
      }
    }
    else
      
this.attr[10] = false;
  }
}
function 
BeginSpar()
{
  
this.attr[10] = "starting";

  
putbomb(13125);

  
sleep(3);

  
this.attr[10] = true;
}
function 
onPlayerDies()
{
  for(
pl:players)
    
pl.hearts 20;

  if (
InSpar(player))
  {
    
this.attr[10] = false;

    
player.hearts 20;

    
player.30.5;
    
player.47;

    
CheckSparList();
  }
}
function 
CheckSparList()
{
  if (
this.spar_list.size() > 0)
  {
    if (
GetSparNumber() < 2)
    {
      
findplayer(this.spar_list[0]).30.5;
      
findplayer(this.spar_list[0]).24;

      
findplayer(this.spar_list[0]).ap 50;

      
findplayer(this.spar_list[0]).hearts 20;

      
this.spar_list.delete(0);

      
CheckSparList();
    }
  }
  
UpdateList();
}
function 
GetSparNumber()
{
  
temp.spar_p 0;

  for(
pl:players)
  {
    if (
InSpar(pl))
      
temp.spar_p ++;
  }

  return 
temp.spar_p;
}
function 
InSpar(pl)
{
  if (
pl.x+1.5 in |1747| && pl.y+2 in |1537|)
    return 
true;
  else
    return 
false;
}
function 
UpdateList()
{
  if (
this.spar_list.size() > 0)
    
this.chat "Line: " this.spar_list;
  else
    
this.chat "No Line!";
}
//#CLIENTSIDE
function onCreated()
{
  
enablefeatures(allfeatures-0x80);
  
disableweapons();
  
setTimer(.05);
  
this.setshape(13232);
}
function 
onPlayerDies()
  
freezeplayer(.5);
function 
onTimeout()
{
  
enableweapons();
  
disablemap();
  if (
player.x+1.5 in |1747| && player.y+2 in |1537|)
  {
    if (
this.attr[10] == true)
    {
      
enablefeatures(allfeatures-1-2-4-0x10-0x20-0x80);
    }
    else{
      
enablefeatures(allfeatures-0x80);
      
disableweapons();
    }
  }
  else{
    
enablefeatures(allfeatures-0x80);
    
disableweapons();
  }
  
setTimer(.05);

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote