Graal Forums

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

theHAWKER 08-30-2006 05:07 AM

Random
 
No one replyed to my last post so ima post it again....

Could somone make a script that would randomly warp a player to 3 diferent levels level1, level2 and level3?

or tell me how?
plz:D

Sulukra 08-30-2006 06:39 AM

You aren't allowed to ask for scripts. Read the rules.

Draenin 08-30-2006 06:44 AM

I'm not really challenging your statement or anything Sulukra, but where is that rule? (The exact quotation, if you please.)

Gantor 08-30-2006 06:45 AM

Wrong forum.

Draenin 08-30-2006 06:46 AM

Yeah, I was about to make mention of that too. :p Also, Gantor, for the love of Raptor Jesus please resize your damned sig image. XD

Sulukra 08-30-2006 06:55 AM

1. Be clear on your ability level. In other words, do not post asking for scripts, or asking people to fix scripts that are above your ability level. If you are writing a script to aid learning, then try writing a simpler script. If you are looking for a script for a server, then the best solution is probably to hire a scripter.

http://forums.graalonline.com/forums...cement.php?f=8

Sure, this thread should be in the scripting forums, but still.

Draenin 08-30-2006 06:59 AM

Haha, yeah, it would have probably been better if you had waited for that to happen. ;)

Sulukra 08-30-2006 07:06 AM

Quote:

Originally Posted by Draenin
Haha, yeah, it would have probably been better if you had waited for that to happen. ;)

Yeah, except I thought I might as well do it before anyone falls victim to his fiendish trap.

Draenin 08-30-2006 07:12 AM

Fiendish? Hardly. But yeah. IT'S A TRAP.

Sulukra 08-30-2006 07:31 AM

Quote:

Originally Posted by Draenin
IT'S A TRAP.

I hereby elect you as the new Admiral Akbar.

Draenin 08-30-2006 07:33 AM

I take this charge with honor.

Sum41Freeeeek 08-30-2006 07:53 AM

Is it a hobby to be a **** on this forum?
I bet the script will take 5 seconds to make.

Draenin 08-30-2006 08:25 AM

I bet it also doesn't provide any helpful knowledge to the person requesting the script, either.

killerogue 08-30-2006 08:54 AM

Quote:

Originally Posted by Sum41Freeeeek
Is it a hobby to be a **** on this forum?
I bet the script will take 5 seconds to make.

No, but some of us find being poo flinging pixel monkey's fun. ^^

googleman 08-30-2006 11:52 AM

Quote:

Originally Posted by Sulukra
I hereby elect you as the new Admiral Akbar.

Ackbar, he never fails to point out the traps, now does he?

excaliber7388 08-30-2006 04:54 PM

PHP Code:

function onCreated()
{
  
this.rnd=int(random(0,3));
  
it(this.rnd==0)
  {
    
setlevel2("levelname",x,y);
  }
  else if(
this.rnd==1)
  {
     
etc
  
}
  else
  {
     
etc
  
}


;) Use that as a base, learn how to do it with playertouchsme() (hint, you'll also need to use setshape because this is serverside).
Quote:

Originally Posted by Sum41Freeeeek
Is it a hobby to be a **** on this forum?
I bet the script will take 5 seconds to make.

About 7, yeah

Luigi203 08-30-2006 05:02 PM

PHP Code:

function onCreated() {
  
this.coords = {{level 1 coords},{level2 coords}, {level 3 coords}};
  
this.levels = {level1,level2,level3};
  
  
this.rand int(random(0,3));
  
setlevel2 this.levels[this.rand],this.coords[this.rand][0],this.coords[this.rand][1];



excaliber7388 08-30-2006 05:04 PM

Quote:

Originally Posted by Luigi203
PHP Code:

function onCreated() {
  
this.coords = {{level 1 coords},{level2 coords}, {level 3 coords}};
  
this.levels = {level1,level2,level3};
  
  
this.rand int(random(0,3));
  
setlevel2 this.levels[this.rand],this.coords[this.rand][0],this.coords[this.rand][1];



Awww...yours is prettier :(

Luigi203 08-30-2006 05:09 PM

I'm not going to flame you or anything, just try to use arrays for things like this

excaliber7388 08-30-2006 07:29 PM

Quote:

Originally Posted by Luigi203
I'm not going to flame you or anything, just try to use arrays for things like this

I haven't used arrays in graal too often. C++ yes, but not too often here. It seemed a bit sketchy (back with stuff like setarray) but I'll start using it :)

theHAWKER 08-31-2006 06:25 PM

Quote:

Originally Posted by Luigi203
PHP Code:

function onCreated() {
  
this.coords = {{level 1 coords},{level2 coords}, {level 3 coords}};
  
this.levels = {level1,level2,level3};
  
  
this.rand int(random(0,3));
  
setlevel2 this.levels[this.rand],this.coords[this.rand][0],this.coords[this.rand][1];




this not works for me >_<

probly maby the reason is because i dont know gs1
do i use function playerenters() { ????

Skyld 09-01-2006 12:16 AM

Quote:

Originally Posted by Luigi203
PHP Code:

function onCreated() {
  
this.coords = {{level 1 coords},{level2 coords}, {level 3 coords}};
  
this.levels = {level1,level2,level3};
  
  
this.rand int(random(0,3));
  
setlevel2 this.levels[this.rand],this.coords[this.rand][0],this.coords[this.rand][1];



You are working with new gscript. Please put brackets around your setlevel2() parameters.


All times are GMT +2. The time now is 08:03 AM.

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