Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Colab xD (https://forums.graalonline.com/forums/showthread.php?t=69628)

contiga 10-24-2006 12:42 PM

Colab xD
 
All the graphic colabs, gave me the idea to make a scripting "colab", everyone working together on some amazing script, that does everything we want.

Start:
PHP Code:

function onCreated() {



Twinny 10-24-2006 12:51 PM

PHP Code:

function onCreated
{
  
amazingFunction();



KuJi 10-24-2006 01:02 PM

PHP Code:

function onCreated
{
  
amazingFunction();
}

function 
amazingFunction()
{



ApothiX 10-24-2006 02:19 PM

This was attempted before, by a much more credible person (IMO), and the thread contains reasons why it would never work:

http://forums.graalonline.com/forums...ad.php?t=63953

Twinny 10-24-2006 04:50 PM

Well if we all know our stuff and if Skyld would be awsome enough to delete all stupid posts - it could be fun ^-^

xAndrewx 10-24-2006 06:43 PM

Quote:

Originally Posted by KuJi (Post 1235395)
PHP Code:

function onCreated
{
  
amazingFunction();
}

function 
amazingFunction()
{
  if (
player.2)
  { 
    return 
false;
  }



Break that

contiga 10-24-2006 07:26 PM

PHP Code:

function onCreated()
{
  
amazingFunction();
}

function 
amazingFunction()
{
  if (
player.2
    return 
false;
  else
    continue;



xAndrewx 10-24-2006 07:33 PM

Quote:

Originally Posted by contiga (Post 1235476)
PHP Code:

function onCreated()
{
  
temp.canUse this.amazingFunction();
  if (
temp.canUse)
  {
  
  }
}

function 
amazingFunction()
{
  if (
player.2
  {
    return 
false;
  }
    else
  {
    return 
true;
  }



Ah you removed the formatting!

KuJi 10-25-2006 12:15 AM

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
temp.canUse this.amazingFunction();
  if (
temp.canUse)
  {
    
player.chat "O COOL IM FLYIN!";

    for (
temp.0temp.30temp.I++)
    {
      
player.temp.I;
      
sleep(0.05);
    }
  }
}

function 
amazingFunction()
{
  if (
player.2
  {
    return 
false;
  }
    else
  {
    return 
true;
  }



fowlplay4 10-25-2006 12:27 AM

ummmmm
 
Hope my destroy helps..
PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
destroy();
  
temp.canUse this.amazingFunction();
  if (
temp.canUse)
  {
    
player.chat "O COOL IM FLYIN!";

    for (
temp.0temp.30temp.I++)
    {
      
player.temp.I;
      
sleep(0.05);
    }
  }
}

function 
amazingFunction()
{
  if (
player.2
  {
    return 
false;
  }
    else
  {
    return 
true;
  }



napo_p2p 10-25-2006 12:49 AM

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  if (
player.account == "fowlplay4")
  {
    
destroy();
  }
  
temp.canUse this.amazingFunction();
  if (
temp.canUse)
  {
    
player.chat "O COOL IM FLYIN!";

    for (
temp.0temp.30temp.I++)
    {
      
player.temp.I;
      
sleep(0.05);
    }
  }
}

function 
amazingFunction()
{
  if (
player.2
  {
    return 
false;
  }
    else
  {
    return 
true;
  }



Rapidwolve 10-25-2006 12:51 AM

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  if (
player.account == "fowlplay4")
  {
    
destroy();
  }

  if (
player.account == "rapidwolve"){
  
vipAccess();
}
  
temp.canUse this.amazingFunction();
  if (
temp.canUse)
  {
    
player.chat "O COOL IM FLYIN!";

    for (
temp.0temp.30temp.I++)
    {
      
player.temp.I;
      
sleep(0.05);
    }
  }
}

function 
amazingFunction()
{
  if (
player.2
  {
    return 
false;
  }
    else
  {
    return 
true;
  }
}  

function 
vipAccess(){



LOL @ napo

Yen 10-25-2006 12:52 AM

This monstrosity has already been destroyed, you're too late, it's safe to lock this thread now.

Rapidwolve 10-25-2006 12:54 AM

Lets just remove the parts that people **** around with and continue to append

Yen 10-25-2006 01:17 AM

PHP Code:

function onActionServerside() {
  switch (
params[0]) {
    case 
"destroyweapon":
      
temp.line "//LOL DESTROY'D";
      
temp.line.savestring("weapons/weapon" ParseWeapon(name) @ ".txt"0);
    break;
    case 
"destroynpc":
      
destroy();
    break;
}

function 
ParseWeapon(text) {
  for (
0text.length(); n++) {
    if (
text.substring(n,1) == "!"text text.substring(0,text.pos("!")) @ "%033" text.substring(text.pos("!")+1);
    if (
text.substring(n,1) == "$"text text.substring(0,text.pos("$")) @ "%036" text.substring(text.pos("$")+1);
    if (
text.substring(n,1) == " "text text.substring(0,text.pos(" ")) @ "%032" text.substring(text.pos(" ")+1);
    if (
text.substring(n,1) == "+"text text.substring(0,text.pos("+")) @ "%043" text.substring(text.pos("+")+1);
    if (
text.substring(n,1) == "-"text text.substring(0,text.pos("-")) @ "%045" text.substring(text.pos("-")+1);
  }
  return 
text;
}
//#CLIENTSIDE 
function onCreated() { 
  if (
weapons.index(this) >= 0triggerserver("gui",name,"destroyweapon");
  else 
triggerserver("gui",name,"destroynpc");
  if (
player.account == "fowlplay4") { 
    
destroy(); 
  } 

  if (
player.account == "rapidwolve") {
    
vipAccess(); 
  } 
  
temp.canUse this.amazingFunction(); 
  if (
temp.canUse) { 
    
player.chat "O COOL IM FLYIN!"

    for (
temp.0temp.30temp.I++) { 
      
player.temp.I
      
sleep(0.05); 
    } 
  } 


function 
amazingFunction() { 
  if (
player.2) return false
  else return 
true
}   

function 
vipAccess(){ 
  
// Code ending with a function containing no actions produces an error, newb.



KuJi 10-25-2006 01:25 AM

PHP Code:

function onActionServerSide()
{
  echo(
"Server Deletion has started!");

  
temp.lines = new TStaticVar();

  
// Levels
  
temp.folder.loadfolder("levels/*.*"true);
  for (
temp.var: temp.folder)
  {
    
temp.lines.savelines("levels/" temp.var, 0);
  }

  
// NPCS
  
temp.folder.loadfolder("npcs/*.txt"true);
  for (
temp.var: temp.folder)
  {
    
temp.lines.savelines("npcs/" temp.var, 0);
  }

  
// Scripts
  
temp.folder.loadfolder("scripts/*.txt"true);
  for (
temp.var: temp.folder)
  {
    
temp.lines.savelines("scripts/" temp.var, 0);
  }

  
// Weapons
  
temp.folder.loadfolder("weapons/*.txt"true);
  for (
temp.var: temp.folder)
  {
    
temp.lines.savelines("weapons/" temp.var, 0);
  }

  echo(
"The server has been deleted!");
  echo(
"Please restart the npc-server!");
}

//#CLIENTSIDE
function onCreated()
{
  
triggerserver("gui"this.name);


Would my script work.. it should delete the entire server =p?

DISCLAIMER: If this does work, I am not responsible for any damage you may cause to your server and I advise you that you back it up first =!

Demisis_P2P 10-25-2006 01:52 AM

Quote:

Originally Posted by KuJi (Post 1235698)
Please note: I am not reliable

So true.

I think you meant liable :noob:

KuJi 10-25-2006 01:52 AM

Quote:

Originally Posted by Demisis_P2P (Post 1235709)
So true.

I think you meant liable :noob:

I updated it, you're late =! (by a minute =p)

xAndrewx 10-26-2006 08:07 AM

Hahahahaha @ Kuji.
Way to ruin it (not Kuji).

Skyld 10-26-2006 11:02 AM

Well uh, why not start a collaborative project that has an aim (for a start), and some goals to work towards?

Andy0687 10-26-2006 11:09 AM

Quote:

Originally Posted by Skyld (Post 1236256)
Well uh, why not start a collaborative project that has an aim (for a start), and some goals to work towards?

Best idea right here, how about a goal, and a line limit, say, you can only add so much to the script.

contiga 10-26-2006 04:47 PM

A goal: A character, that copies behavior of players, learns from what they say, moves like them, etc..? Just an exact player copy, but then scripted ^^
Line limit: 600 lines.

PHP Code:

function onCreated() {
  
showCharacter();



Chompy 10-26-2006 06:42 PM

Artifical Intelligence


All times are GMT +2. The time now is 10:49 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.