Graalians

Graalians (https://www.graalians.com/forums/index.php)
-   Creative Corner (https://www.graalians.com/forums/forumdisplay.php?f=17)
-   -   John's Scripts (https://www.graalians.com/forums/showthread.php?t=9528)

Emera 08-25-2012 11:12 AM

Quote:

Posted by Talon (Post 186178)
I wish I knew how to script. I gave it a shot, but in the end, it wasn't for me. I commend you for going through with it and learning with the help of Emera and Callimuc. Good job.

Remember, we're here for anybody who wants help. If you really want to get into scripting, I'll be more than happy to help with any questions you have and so will callimuc.

callimuc 08-25-2012 11:20 AM

Quote:

Posted by Emera (Post 186244)
and so will callimuc

orlly?

sure :D

Era News 08-25-2012 12:09 PM

Quote:

Posted by Emera

Remember, we're here for anybody who wants help. If you really want to get into scripting, I'll be more than happy to help with any questions you have and so will callimuc.

But really, where did you start? Like where did you learn the basics. Do you have a tutorial? I would mor them happily plus rep you if you could re direct me. Learning to script has been on my bucket list for ages now, just never got time.

Emera 08-25-2012 12:15 PM

Quote:

Posted by Era News (Post 186263)
But really, where did you start? Like where did you learn the basics. Do you have a tutorial? I would mor them happily plus rep you if you could re direct me. Learning to script has been on my bucket list for ages now, just never got time.

This tutorial has been posted all over Graalians. I started with playing around on RC and finally read this. From there, I just practised every day and have been doing so for nearly 3 years.

Era News 08-25-2012 12:23 PM

Quote:

Posted by Emera

This tutorial has been posted all over Graalians. I started with playing around on RC and finally read this. From there, I just practised every day and have been doing so for nearly 3 years.

Alright cheers, should I practice on testbed?

Emera 08-25-2012 12:24 PM

Quote:

Posted by Era News (Post 186269)
Alright cheers, should I practice on testbed?

Practise anywhere.

Era News 08-25-2012 12:27 PM

Quote:

Posted by Emera

Practise anywhere.

Wait I do not get echoes, is it like copying your text into RC?

Emera 08-25-2012 12:30 PM

Quote:

Posted by Era News (Post 186274)
Wait I do not get echoes, is it like copying your text into RC?

An echo sends data to the RC. Example usage:
PHP Code:

echo("My name is bob and I like cheese"); 

You can use the Graal bible or the tutorial I gave you to figure this stuff out though.

Era News 08-25-2012 12:37 PM

Quote:

Posted by Emera

An echo sends data to the RC. Example usage:
echo("My name is bob and I like cheese");

You can use the Graal bible or the tutorial I gave you to figure this stuff out though.

But why would you need to send data to the RC? Wouldn't you just chat?

Emera 08-25-2012 12:44 PM

Quote:

Posted by Era News (Post 186278)
But why would you need to send data to the RC? Wouldn't you just chat?

I suggest you read the tutorial first man.

Johnaudi 08-25-2012 01:26 PM

Epic @Callimuc.
Thanks a lot, got the point of with (particles) and emitter. Just noticed it almost like image movements. At first I thought its gonna be hell when I looked at Pix's gani but figure it out, it is easy =D. Thanks again.

Quote:

Posted by Emera (Post 186265)
This tutorial has been posted all over Graalians. I started with playing around on RC and finally read this. From there, I just practised every day and have been doing so for nearly 3 years.

^ that's where I started, and then got more advanced with calli and emera, spam them to learn <3 (works every time)

callimuc 08-25-2012 06:00 PM

Quote:

Posted by Era News (Post 186278)
But why would you need to send data to the RC? Wouldn't you just chat?

it can be great for security checks (alarm the staff on RC when something has been happening, like a player entered an area he isnt supposed to enter) or like its done on the servers for reports/feedbacks/other server messages

Quote:

Posted by Emera (Post 186265)
This tutorial has been posted all over Graalians. I started with playing around on RC and finally read this. From there, I just practised every day and have been doing so for nearly 3 years.

i started by copying scripts and editing them + asking on the official forums having no clue what they ment when they replied :P
for myself it helped a lot to see examples and edit them to understand the stuff. but everyone got another way to learn different stuff :)

Johnaudi 08-25-2012 06:46 PM

Quote:

Posted by callimuc (Post 186364)
i started by copying scripts and editing them + asking on the official forums having no clue what they ment when they replied :P
for myself it helped a lot to see examples and edit them to understand the stuff. but everyone got another way to learn different stuff :)

How did you learn the things you are missing? Let's say a current script is not in a certain weapon, how did you learn it soon or later? And I'm gonna ask you that again, what are the minimum requirements to call yourself a Developer :p

Emera 08-25-2012 06:48 PM

Quote:

Posted by Johnaudi (Post 186372)
How did you learn the things you are missing? Let's say a current script is not in a certain weapon, how did you learn it soon or later? And I'm gonna ask you that again, what are the minimum requirements to call yourself a Developer :p

There aren't any minimum requirements. Developers are generally people who are capable of developing high quality material in more than one development area (levels, scripting, graphics etc.)

callimuc 08-26-2012 01:40 AM

Quote:

Posted by Johnaudi (Post 186372)
How did you learn the things you are missing? Let's say a current script is not in a certain weapon, how did you learn it soon or later? And I'm gonna ask you that again, what are the minimum requirements to call yourself a Developer :p

what do you mean with the things im missing? after a while you are simply able to understand the descriptions/documentations even better. You just have to mess around.

And to call yourself a developer... What emera said

Johnaudi 08-26-2012 07:21 AM

Quote:

Posted by callimuc (Post 186644)
what do you mean with the things im missing? after a while you are simply able to understand the descriptions/documentations even better. You just have to mess around.

And to call yourself a developer... What emera said

Uh, like I mean, how am I suppose to know if there is something I never heard of? Like a week ago I found the particles emitter script and such. How am I suppose to know that I'm "ready".

callimuc 08-26-2012 11:40 AM

Quote:

Posted by Johnaudi (Post 186794)
Uh, like I mean, how am I suppose to know if there is something I never heard of? Like a week ago I found the particles emitter script and such. How am I suppose to know that I'm "ready".

you can always see other servers, ask yourself about some scripts how it could have been done and so on

Emera 08-26-2012 12:01 PM

Quote:

Posted by Johnaudi (Post 186794)
Uh, like I mean, how am I suppose to know if there is something I never heard of? Like a week ago I found the particles emitter script and such. How am I suppose to know that I'm "ready".

Man, I'm learning new things everyday still. When a task calls for something new, then you go away and learn it then apply it to what you're doing.

Era News 08-26-2012 12:01 PM

Quote:

Posted by Emera

I suggest you read the tutorial first man.

Do you mind if I have Some contact info, if your willing to help me. I'm really interested and you seem like a nice teacher.

Emera 08-26-2012 12:08 PM

Quote:

Posted by Era News (Post 186892)
Do you mind if I have Some contact info, if your willing to help me. I'm really interested and you seem like a nice teacher.

No problem.

Skype: emeragraal
Email: [email protected]
AIM: [email protected]

Era News 08-26-2012 12:17 PM

Quote:

Posted by Emera
No problem.

Skype: emeragraal
Email: [email protected]
AIM: [email protected]

Thanks cheers, expect to be hearing from me soon :)

xXziroXx 08-27-2012 02:52 AM

Hmm.

callimuc 08-28-2012 03:57 AM

Quote:

Posted by xXziroXx (Post 187483)
Hmm.

Pff.

Johnaudi 08-28-2012 08:33 AM

Okay, so @Callimuc I tried taking your script, edited a bit, I also added to players chat: showpart and hidepart.
Hypotheses : angle +=.5; on each timeout (would go as a spiral)
/ well the problem is, I added a Boolean flag (thiso.ison = true/false) to turn it on or off, well I turn it off, for e.g :
PHP Code:

function onTimeOut() {
  if (
thiso.ison == true) { 
    
//stuff
  
}


Well when it's off, the angle keeps on going to one (the last) direction when stopped. How can I stop the particles? Also, what does "findimg()" do?
Thanks

Tricxta 08-28-2012 10:16 AM

Quote:

Posted by xXziroXx (Post 187483)
Hmm.

I think it's cute they think think their scripts are worth sharing as well.

Quote:

Posted by Johnaudi (Post 188364)
PHP Code:

function onTimeOut() {
  if (
thiso.ison == true) { 
    
//stuff
  
}



I like how you're saying if true is true. Instead just use if (thiso.isOn){ instead just to show you're not a blatant copy paster kinda "programmer".

RenoDorvay 08-28-2012 12:22 PM

Quote:

Posted by Tricxta (Post 188373)
I think it's cute they think think their scripts are worth sharing as well.


I like how you're saying if true is true. Instead just use if (thiso.isOn){ instead just to show you're not a blatant copy paster kinda "programmer".

Play nicely Tricxta :(
Sharing any script is good, regardless of the quality that you think they are.

Emera 08-28-2012 12:25 PM

Quote:

Posted by RenoDorvay (Post 188427)
Play nicely Tricxta :(
Sharing any script is good, regardless of the quality that you think they are.

That, and this isn't exactly a show-off thread is it? He's posting a script so we can help him get better, and you can't really bash that.

callimuc 08-28-2012 12:37 PM

Quote:

Posted by Tricxta (Post 188373)
I think it's cute they think think their scripts are worth sharing as well.

you can go on helping. also this isnt a share thread/code gallery. we are simply helping him and later on we can suggest him more.

Quote:

Posted by Tricxta (Post 188373)
I like how you're saying if true is true. Instead just use if (thiso.isOn){ instead just to show you're not a blatant copy paster kinda "programmer".

everyone is having their start to learn that. in the beginning its more easy for people to learn it by still using if (whatever == boolean).
sorry that not everyone is such a pro like you thinking they are the best. go on rather than keep fighting about/with everything/everyone you dont like

Johnaudi 08-28-2012 06:45 PM

Back on topic, findimg() does what :p ?

Emera 08-28-2012 07:08 PM

Quote:

Posted by Johnaudi (Post 188505)
Back on topic, findimg() does what :p ?

It shows images <3.

PHP Code:

with(findimg(200)) {
  
image "block.png";
  
player.x;
  
player.y;


The 200 inside the brackets is the index. Anything over 200 will be displayed only on the player's screen, and anything between 0 and 199 will be displayed to everybody. There's other variables you can change like text, font, layer, etc. Just play around with them <3

Tricxta 08-29-2012 03:20 AM

Quote:

Posted by Emera (Post 188513)
It shows images <3.

No o_0
findimg retrieves the image object given an index. With that object you can manipulate its properties.

Emera 08-29-2012 03:28 AM

Quote:

Posted by Tricxta (Post 188880)
No o_0
findimg retrieves the image object given an index. With that object you can manipulate its properties.

And you honestly think he's going to understand that at this stage? No.

Tricxta 08-29-2012 03:30 AM

Quote:

Posted by callimuc (Post 188433)
sorry that not everyone is such a pro like you thinking they are the best. go on rather than keep fighting about/with everything/everyone you dont like

http://i.qkme.me/3p3m3k.jpg

Being serious though, I see this thread as a way to ***** rep. It's pretty much a failed showcase turned into a help thread with people giving flawed information.

I don't think i'm good and I have no clue where you got that idea from.

Let's chill now, k?

Quote:

Posted by Emera (Post 188886)
And you honestly think he's going to understand that at this stage? No.

If he thinks about it and is given an example such as yours, then yes.

Emera 08-29-2012 03:35 AM

Quote:

Posted by Tricxta (Post 188888)
If he thinks about it and is given an example such as yours, then yes.

Still no.

Johnaudi 08-29-2012 07:42 AM

Thanks Emmy :3 so basically it shows the image ServerSided if it's under 200 and it's clientsided if it's 200+?

Emera 08-29-2012 11:48 AM

Quote:

Posted by Johnaudi (Post 189008)
Thanks Emmy :3 so basically it shows the image ServerSided if it's under 200 and it's clientsided if it's 200+?

Not server side, but for all players. No problem ;)

callimuc 08-29-2012 04:01 PM

Quote:

Posted by Tricxta (Post 188888)
Being serious though, I see this thread as a way to ***** rep. It's pretty much a failed showcase turned into a help thread with people giving flawed information.

I don't think i'm good and I have no clue where you got that idea from.

Let's chill now, k?

ok, maybe it was kinda harsh. but at least hes willing to learn other than most people on the official forums releasing codes. at least im trying to explain it pretty simple for him as i think you should understand the code before knowing something like the explanation you gave for the findImg() part.
if you know what the script does and you messed with that it would be more easy to understand your explanation. when you are new to scripting than it can be hard to understand it

peace

Johnaudi 08-29-2012 05:52 PM

Quote:

Posted by Emera (Post 189067)
Not server side, but for all players. No problem ;)

so findimg() is always clientsided?

Emera 08-29-2012 06:37 PM

Quote:

Posted by Johnaudi (Post 189165)
so findimg() is always clientsided?

You can't use findimg() on the server side. It's a clientside function. If you set the index of the image to lower than 200 though, it'll show for everybody and not just yourself.

Johnaudi 08-30-2012 06:25 AM

Next question is a stupid question but keeps getting around my mind, about NPC movements, I try to make it but it goes for a second then it stops, I remember tricxta teaching it to me on Skype but I probably forgot a thing.

callimuc 08-31-2012 03:01 AM

Quote:

Posted by Johnaudi (Post 189567)
Next question is a stupid question but keeps getting around my mind, about NPC movements, I try to make it but it goes for a second then it stops, I remember tricxta teaching it to me on Skype but I probably forgot a thing.

you can use move(dx, dy, time, options)

dx: new x position from the current one (like 3 would move 3 tiles to the right from the current position)
dy: same as dy for the y
time: the time the whole moving should take
options: different stuff being called

for the options just check this link
http://forums.graalonline.com/forums...ad.php?t=85584

Kavan 08-31-2012 08:05 AM

Quote:

Posted by callimuc (Post 190004)
you can use move(dx, dy, time, options)

dx: new x position from the current one (like 3 would move 3 tiles to the right from the current position)
dy: same as dy for the y
time: the time the whole moving should take
options: different stuff being called

for the options just check this link
http://forums.graalonline.com/forums...ad.php?t=85584

As an extension, if you're trying to move it to a certain point in the level, you can calculate the delta:

PHP Code:

temp.origin = {player.xplayer.y};
temp.target = {3030};
temp.delta = {target[0] - origin[0], target[1] - origin[1]};

move(delta[0], delta[1], 1024); 


Johnaudi 08-31-2012 08:16 AM

I was most likely looming for the one that uses temp.i, something Tric thought me but I forgot... for() not move()...

callimuc 08-31-2012 03:09 PM

Quote:

Posted by Johnaudi (Post 190122)
I was most likely looming for the one that uses temp.i, something Tric thought me but I forgot... for() not move()...

PHP Code:

for (temp.i=player.xtemp.i<player.x+5temp.i++) {
  
this.temp.i;


something like that? i wouldnt suggest that, use move() instead

xXziroXx 08-31-2012 04:30 PM

move() is superior to manually updating the position since it gets synced to both the client and the server.

Johnaudi 09-01-2012 01:15 PM

Thanks guys :)
Okay one more, is there anywhere better to store sended pms,comments anything? And make it readable and writable, other than clientr. // also Will clientr.test= 1,2,3,4 be counted as an array? (clientr.test[0])

Emera 09-01-2012 01:42 PM

Quote:

Posted by Johnaudi (Post 190701)
Thanks guys :)
Okay one more, is there anywhere better to store sended pms,comments anything? And make it readable and writable, other than clientr. // also Will clientr.test= 1,2,3,4 be counted as an array? (clientr.test[0])

You'll have to have a custom PM system to log sent messages as there's no way to log messages sent using the default one. I'd personally store them in text files. Also, you can tokenize that clientr flag to treat it like an array like this: temp.test = player.clientr.test.tokenize(","); and then you can use temp.test[0].

Johnaudi 09-01-2012 01:59 PM

Quote:

Posted by Emera (Post 190726)
You'll have to have a custom PM system to log sent messages as there's no way to log messages sent using the default one. I'd personally store them in text files. Also, you can tokenize that clientr flag to treat it like an array like this: temp.test = player.clientr.test.tokenize(","); and then you can use temp.test[0].

I know that, most-likely that's why im asking this, because I need more space than clientr than spam it all.
I've bin working on an Assignment System, having to read two tokenizations and looking forward for any easier way?
PHP Code:

function onActionServerSide() {
  if (
params[0] == "done") {
    
temp.params[1];
    
temp.toks player.clientr.assignments.tokenize(";");
    
temp.temp.toks[temp.i].tokenize(",");
    
temp.py findplayerbycommunityname(temp.a[1]);
    
temp.int(params[3]);
    
temp.py.clientr.assignmentsIDD temp.py.clientr.assignmentsIDD ";" temp."," temp.py.account "," params[2];
  }
  if (
params[0] == "give") {
    if (
player.clientr.assignments == "") {
      
player.clientr.assignments "a";
    }
    
temp.pl findplayerbycommunityname(params[1]);
    
temp.pl.clientr.assignmentsID += 1;
    
temp.pl.clientr.assignments temp.pl.clientr.assignments ";" temp.pl.clientr.assignmentsID "," player.account "," params[2];
    
temp.pl.chat "I've received an assignment! :(";
    
printf("Assignment Sent: from %s to %s"player.accounttemp.pl.account);
  }
  if (
params[0] == "C") {
    
player.clientr.assignments "a";
    
player.clientr.assignmentsID 0;
    
player.clientr.assignmentsIDD "a";
  }
}

//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/assign") {
    
this.number 0;
    
onOpen();
  }
}

function 
onOpen() {
  
drawGUI();
  
Assgn_Window3.visible false;
  
Assgn_Window2.visible false;
  
Assgn_Window1.visible true;
  
onGetFresh();
}

function 
drawGUI() {
  new 
GuiWindowCtrl("Assgn_Window1") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "550,225";
    
canmaximize false;
    
canminimize false;
    
canmove true;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
text "Assignments";
    
= (screenwidth width) / 2;
    
= (screenheight height) / 2;
    new 
GuiScrollCtrl("Assgn_MultiLine1_Scroll") {
      
profile GuiBlueScrollProfile;
      
height 82;
      
hscrollbar "dynamic";
      
vscrollbar "dynamic";
      
width 460;
      
40;
      
36;
      new 
GuiMLTextCtrl("Assgn_MultiLine1") {
        
profile GuiBlueMLTextProfile;
        
height 17;
        
horizsizing "width";
        
htmlcompatibility false;
        
htmllinks true;
        
plaintext "You have no Assignments! Yay!";
        
width 185;
        
wordwrap false;
      }
    }
    new 
GuiButtonCtrl("Assgn_Give") {
      
profile GuiBlueButtonProfile;
      
height 45;
      
text "Give Assignment";
      
width 130;
      
40;
      
150;
    }
    new 
GuiButtonCtrl("Assgn_Done") {
      
profile GuiBlueButtonProfile;
      
height 45;
      
text "Finished Assignment";
      
width 130;
      
200;
      
150;
    }
    new 
GuiButtonCtrl("Assgn_Refr") {
      
profile GuiBlueButtonProfile;
      
height 45;
      
text "Refresh";
      
width 130;
      
370;
      
150;
    }
    new 
GuiButtonCtrl("Assgn_C") {
      
profile GuiBlueButtonProfile;
      
height 45;
      
text "C";
      
width 45;
      
503;
      
150;
    }
    new 
GuiTextCtrl("Assgn_Text1") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "| Date |";
      
width 39;
      
109;
      
15;
    }
    new 
GuiTextCtrl("Assgn_Text2") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "| From |";
      
width 42;
      
204;
      
15;
    }
    new 
GuiTextCtrl("Assgn_Text3") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "| Description |";
      
width 78;
      
308;
      
15;
    }
    new 
GuiTextCtrl("Assgn_Text6") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "| ID |";
      
width 24;
      
48;
      
15;
    }
  }
  new 
GuiWindowCtrl("Assgn_Window2") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "293,190";
    
canmaximize false;
    
canminimize false;
    
canmove true;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
text "Finished Assignment";
    
300;
    
100;
    new 
GuiTextCtrl("Assgn_Text4") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Message :";
      
width 58;
      
33;
      
73;
    }
    new 
GuiTextEditCtrl("Assgn_CommenttoDone") {
      
profile GuiBlueTextEditProfile;
      
height 20;
      
text "I have finished my Assignment.";
      
width 200;
      
90;
      
75;
    }
    new 
GuiTextCtrl("Assgn_Text5") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "ID :";
      
width 18;
      
31;
      
33;
    }
    new 
GuiTextEditCtrl("Assgn_IDtoDone") {
      
profile GuiBlueTextEditProfile;
      
height 20;
      
width 146;
      
60;
      
34;
    }
    new 
GuiButtonCtrl("Assgn_Done2") {
      
profile GuiBlueButtonProfile;
      
height 45;
      
text "Checked";
      
width 112;
      
85;
      
136;
    }
  }
  new 
GuiWindowCtrl("Assgn_Window3") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "293,190";
    
canmaximize false;
    
canminimize false;
    
canmove true;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
text "Give Assignment";
    
300;
    
100;
    new 
GuiTextCtrl("Assgn_Text8") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Comment :";
      
width 60;
      
10;
      
73;
    }
    new 
GuiTextCtrl("Assgn_Text14") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Prevent using html or ;";
      
width 150;
      
10;
      
100;
    }
    new 
GuiTextEditCtrl("Assgn_CommenttoGive") {
      
profile GuiBlueTextEditProfile;
      
height 20;
      
text "I want you to";
      
width 200;
      
90;
      
75;
    }
    new 
GuiTextCtrl("Assgn_Text9") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Account :";
      
width 60;
      
10;
      
33;
    }
    new 
GuiTextEditCtrl("Assgn_IDtoGive") {
      
profile GuiBlueTextEditProfile;
      
height 20;
      
width 146;
      
90;
      
34;
    }
    new 
GuiButtonCtrl("Assgn_Given") {
      
profile GuiBlueButtonProfile;
      
height 45;
      
text "Give";
      
width 112;
      
85;
      
136;
    }
  }
}

function 
Assgn_Done.onAction() {
  
Assgn_Window2.visible true;
}

function 
Assgn_Done2.onAction() {
  if (
Assgn_IDtoDone.text != NULL && Assgn_CommenttoDone.text != NULL) {
    
triggerserver("gui"name"done"Assgn_IDtoDone.textAssgn_CommenttoDone.textAssgn_IDtoDone.text);
    
Assgn_Window2.visible false;
  }
}

function 
Assgn_Give.onAction() {
  
Assgn_Window3.visible true;
}

function 
Assgn_Given.onAction() {
  if (
Assgn_IDtoGive.text != NULL && Assgn_CommenttoGive.text != NULL) {
    
triggerserver("gui"name"give"Assgn_IDtoGive.textAssgn_CommenttoGive.text);
    
Assgn_Window3.visible false;
  }
}

function 
Assgn_Refr.onAction() {
  
onGetFresh();
}

function 
Assgn_C.onAction() {
  
triggerserver("gui"name"C");
  
onOpen();
}

function 
onGetFresh() {
  if (
player.clientr.assignments != "a") {
    
Assgn_MultiLine1.text "";
    
temp.toks player.clientr.assignments.tokenize(";");
    
temp.player.clientr.assignmentsID;
    
temp.tokn player.clientr.assignmentsIDD.tokenize(";");
    for (
temp.1temp.<= temp.etemp.i++) {
      
temp.temp.toks[temp.i].tokenize(",");
      if (
temp.!= temp.s[0]) {
        
Assgn_MultiLine1.text Assgn_MultiLine1.text "   |" temp.a[0] @ "|                                 |" temp.a[1] @ "|                     |" temp.a[2] @ "|" "<br>";
      }
      
sleep(0.1);
    }
  }
  if (
player.clientr.assignmentsIDD != "a") {
    
temp.tokn player.clientr.assignmentsIDD.tokenize(";");
    for (
temp.0temp.<= 10temp.o++) {
      
temp.temp.tokn[temp.o].tokenize(",");
      if (
temp.s[0] != "" && temp.s[0] != "a" && temp.s[0] != 0) {
        
Assgn_MultiLine1.text "<font color=darkred>" temp.s[0] @ " Has Finished his Assignment!  |" temp.s[2] @ "|<br></font>" Assgn_MultiLine1.text;
      }
    }
  }
  
this.number += 1;
  if (
this.number 3) {
    
player.clientr.assignmentsIDD "a";
  }



Johnaudi 09-03-2012 09:59 AM

Question : how to use and give a "public function"?

Emera 09-03-2012 11:20 AM

Quote:

Posted by Johnaudi (Post 192151)
Question : how to use and give a "public function"?

Public functions are functions that other scripts can access via other scripts, level NPCs, classes and w/e.

PHP Code:

public function cheeseIsCool() {
  echo(
"Cheese is cool, pepper is not!");


PHP Code:

(@"-Weapon/Name").cheeseIsCool(); 



All times are GMT. The time now is 08:48 PM.

Powered by vBulletin/Copyright ©2000 - 2026, vBulletin Solutions Inc.