PDA

View Full Version : ok i need big help


michael7849
10-31-2006, 12:45 AM
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..

Curt1zzle
10-31-2006, 01:03 AM
I would suggest posting the script...but that's just me.

Bl0nkt
10-31-2006, 01:16 AM
setlevel2 must be serverside.

That's what I'm guessing is wrong.

Googi
10-31-2006, 01:24 AM
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.

michael7849
10-31-2006, 03:17 AM
okay the script is

// 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),@[email protected] 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),@[email protected],29,40;
showimg 203+(playerid*50),@[email protected],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),@[email protected](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;
}
}

Yen
10-31-2006, 06:06 AM
I honestly can't think of anything contructive to post, other than...

Read the wiki.

Twinny
10-31-2006, 06:10 AM
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:


function onActionServerSide()
{
//Stuff
}

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

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


or


if (actionserverside)
{
//stuff
}

//#CLIENTSIDE

if (created)
{
say2 yay!;
}

michael7849
10-31-2006, 10:18 PM
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?

Twinny
10-31-2006, 11:41 PM
Which part is confusing? Be more specific.