Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-31-2006, 12:45 AM
michael7849 michael7849 is offline
Playerworld21 Manager
Join Date: Aug 2006
Posts: 81
michael7849 is an unknown quantity at this point
ok i need big help

ok guyss i made a script fr my server zerati
and it seems that setlevel2 isnt working on teh server i amde it so wehn u click a button it press s on a button it carrys out that action 4 example

(PRESS S TO CONTINUE)
Story
Leave

and when u click on leave it deosnt warp you out it just continues with the story..
Reply With Quote
  #2  
Old 10-31-2006, 01:03 AM
Curt1zzle Curt1zzle is offline
Starting not to love you
Curt1zzle's Avatar
Join Date: Sep 2003
Posts: 3,669
Curt1zzle has a spectacular aura about
Send a message via AIM to Curt1zzle
I would suggest posting the script...but that's just me.
__________________

This message has been deleted by Sam. Reason: you should better stop it now
Reply With Quote
  #3  
Old 10-31-2006, 01:16 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
setlevel2 must be serverside.

That's what I'm guessing is wrong.
Reply With Quote
  #4  
Old 10-31-2006, 01:24 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally Posted by michael7849 View Post
ok guyss i made a script fr my server zerati
and it seems that setlevel2 isnt working on teh server i amde it so wehn u click a button it press s on a button it carrys out that action 4 example
Unlike us, computers aren't able to understand script commands that aren't spelt right.
__________________
Reply With Quote
  #5  
Old 10-31-2006, 03:17 AM
michael7849 michael7849 is offline
Playerworld21 Manager
Join Date: Aug 2006
Posts: 81
michael7849 is an unknown quantity at this point
okay the script is

NPC Code:
// NPC made by Element (Developer)
//#CLIENTSIDE
if (playerenters) {
stopmidi;
playery=65;
showstats 0;
timereverywhere;
timeout=0.05;
}
if(timeout){
setani idle,;
setfocus 30,30;
this.time++;
if(this.time<=80){
showimg 202+(playerid*50),@b@All Rights Reserved Registerd 2006,26.5,32;
this.light=1-(abs(40-this.time)/40);
this.min=0;
this.max=2;
image();
}else if(this.time<=120){
showimg 201+(playerid*50),seekimg.png,19.78125,23.84375;
this.light=(this.time-80)/40;
this.min=0;
this.max=1;
image();
}else if(this.time<=160){
showimg 202+(playerid*50),@b@Start,29,40;
showimg 203+(playerid*50),@b@Leave,29,42;
showimg 204+(playerid*50),broadgoldsword.png,27,40.5+(2*th is.selection);
changeimgpart 204+(playerid*50),104,24,24,12;
showimg 205+(playerid*50),@b@(Press S to Select),26,38;
if(this.time<=140) this.light=(this.time-120)/20;
this.min=1;
if(lighteffectsenabled) this.max=5;
else this.max=4;
image();
if(keydown(0)||keydown(2)){
if(this.arrow<1){
this.selection=1-this.selection;
this.arrow=1;
}
}else this.arrow=0;
if(keydown(5)){
if(this.selection=1){
set Leave;
exit();
}
this.time=161;
}else if(this.time>140) this.time=140;
}else if(this.time<=200){
this.light=1-((this.time-160)/40);
this.min=0;
this.max=5;
image();
}else if(this.time<=300){
hideimg 203+(playerid*50);

showimg 201+(playerid*50),@#e(0,this.time-200,It was #v(int(timevar/2620800)+601) You are just a lonely temple guardian.),17,20;
if(this.time>252) showimg 202+(playerid*50),@#e(0,this.time-252,you were entrusted... ),17,22;
else hideimg 202+(playerid*50);
text();
}
//#CLIENTSIDE
else if(this.time<=360){
showimg 204+(playerid*50),white.png,11.5,24;
if(this.time>340) this.light=1;
else this.light=(this.time-340)/40;
this.min=3;
this.max=4;
image();
}
//#CLIENTSIDE
else if(this.time<=500){
hideimg 204+(playerid*50);
showimg 201+(playerid*50),@#e(0,this.time-360,...to keep the Evil
Doors in the back of the temple closed.),15,20;
if(this.time>422) showimg 202+(playerid*50),@#e(0,this.time-422,you go day by day with nothing interesting
happening to you....),15,22;
else hideimg 202+(playerid*50);
text();
}
//#CLIENTSIDE
else if(this.time<=560){
showimg 204+(playerid*50),white.png,11.5,24;
if(this.time>540) this.light=1;
else this.light=(this.time-540)/40;
this.min=3;
this.max=4;
image();
}
//#CLIENTSIDE
else if(this.time<=760){
hideimg 204+(playerid*50);
showimg 201+(playerid*50),@#e(0,this.time-560,Just getting older ...and always guarding the "Sacred Seal" from
breaking.),15,19;
if(this.time>623) showimg 202+(playerid*50),@#e(0,this.time-623,Until one fatefull day. . . .),15,21;
else hideimg 202+(playerid*50);
if(this.time>698) showimg 203+(playerid*50),@#e(0,this.time-698,-End of the Story Introduction-),15,23;
else hideimg 203+(playerid*50);
text();
}else if(this.time<=820){
showimg 204+(playerid*50),white.png,11.5,24;
if(this.time>800) this.light=1;
else this.light=(this.time-800)/40;
this.min=3;
this.max=4;
image();
}else{
exit();
}
timereverywhere;
timeout=0.05;
}

function exit(){
setcharani idle,;
showstats 2047;
resetfocus;
setlevel2 onlinestartlocal.nw,30,9.5;
}


function image(){
for(this.i=this.min;this.i<this.max;this.i++){
changeimgcolors 201+this.i+(playerid*50),this.light,this.light,thi s.light,this.light;
changeimgvis 201+this.i+(playerid*50),3;
}
}

function text(){
for(this.i=0;this.i<3;this.i++){
changeimgcolors 201+this.i+(playerid*50),1,1,0.5,0.75;
changeimgvis 201+this.i+(playerid*50),3;
}
}

Reply With Quote
  #6  
Old 10-31-2006, 06:06 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
I honestly can't think of anything contructive to post, other than...

Read the wiki.
Reply With Quote
  #7  
Old 10-31-2006, 06:10 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Ok first off, use PHP code thing next time . Now, sertlevel2 must be done serverside so instead of exit(), use a trigger to serverside saying "warp" or similar. Also, you only need 1 //#CLIENTSIDE per script. Structure like this for GS2:

PHP Code:
function onActionServerSide()
{
  
//Stuff
}

//#CLIENTSIDE
function onActionClientSide()
{
  
//Stuff
}

function 
onCreated()
  
this.chat "Yay! ^-^"
or

PHP Code:
if (actionserverside)
{
  
//stuff
}

//#CLIENTSIDE

if (created)
{
  
say2 yay!;

Reply With Quote
  #8  
Old 10-31-2006, 10:18 PM
michael7849 michael7849 is offline
Playerworld21 Manager
Join Date: Aug 2006
Posts: 81
michael7849 is an unknown quantity at this point
Quote:
Ok first off, use PHP code thing next time . Now, sertlevel2 must be done serverside so instead of exit(), use a trigger to serverside saying "warp" or similar. Also, you only need 1 //#CLIENTSIDE per script. Structure like this for GS2:
ehh wat u mean?
Reply With Quote
  #9  
Old 10-31-2006, 11:41 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Which part is confusing? Be more specific.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:34 PM.


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