Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Makeing a Staff Block script (https://forums.graalonline.com/forums/showthread.php?t=60342)

alissalee 08-03-2005 09:37 PM

Makeing a Staff Block script
 
i need help i wanna make a staff block that stays untill the staff that put it up comes and moves it out i would like to have it able to block out ppl witout boots to a lvl not done yet please help me.

Bl0nkt 08-04-2005 01:49 AM

Quote:

Originally Posted by alissalee
i need help i wanna make a staff block that stays untill the staff that put it up comes and moves it out i would like to have it able to block out ppl witout boots to a lvl not done yet please help me.

What server is this for?

AlexH 08-04-2005 02:13 AM

You've got to learn to script. All I've seen you do here is ask for scripts. And in my opinion, pretty pointless ones.

Sword 08-04-2005 02:43 AM

Here, I'll help:





NPC Code:
/// NPC made by *Sword


Then edit the level and delete it when you're ready for it to be gone.

konidias 08-04-2005 02:46 AM

All you have to do is make a class called staffblock or something, and in the class script have it block accordingly with setshape, and then have a weapon that uses putnpc to put it down.

Python523 08-04-2005 03:29 AM

Dude, seriously. This forum isn't for asking how to do things. If we don't see you putting forth any effort towards solving the problems yourself then you aren't welcome to ask for help here. We are not your slaves. I'm going to start closing and deleting your threads if you don't comply with the rules.

Good:
-Trying to learn things for yourself.
-Putting forth effort towards trying to do something before comming here.

Bad:
-Asking for someone to do something for you.
-Using this forum as a place to get someone to do work for you.

If you can't figure out how to do something, this forum has a wonderful search feature.

alissalee 08-04-2005 04:01 AM

this is 4 rocket's server playerworld14 and i tryed one no work some olne please and i trying to script

Lance 08-04-2005 04:09 AM

Quote:

Originally Posted by alissalee
this is 4 rocket's server playerworld14 and i tryed one no work some olne please and i trying to script

This reference might prove itself fairly useful. Read the parts that seem relevant. Pay special note to the "Before you ask" section.

If you have a specific question, feel free to ask it. However, don't simply throw your arms in the air helplessly and expect everyone else to do your work for you. Please, again, refer to rule 1 of this forum:

Quote:

Originally Posted by rules
1) Don't post here just asking for scripts, or asking for people to fix scripts that are beyond your skill level. The posters here aren't just some handy resource for scripting shortcuts. If you can't script something then don't try to produce it. If you're trying to make it to aid your learning then set your sights lower. If you want it for a server then go hire a scripter.


alissalee 08-04-2005 06:23 AM

well then ill try to make my own if some one would help me out on learning how to script

alissalee 08-05-2005 03:52 AM

i have a script but i cannot make it work it is my freands elements
please some one see if it is not working right
if (actionserverside) {

if (strequals(#p(0),block)) {

putnpc2 #p(1),#p(2),{if (created) join block;};

}

}

//#CLIENTSIDE

if (weaponfired) {

if (this.on == 0) {

this.on = 1;

timeout = 0.05;

} else if (this.on == 1) {

this.on = 2;

hideimgs 200,210;

timeout = 0.05;

} else if (this.on == 2) {

hideimgs 200,210;

this.on = 0;

timeout = 0;

}

}

if (timeout) {

if (this.on == 0) setstring this.on,Off; else

if (this.on == 1) setstring this.on,Menu; else

if (this.on == 2) setstring this.on,On;

if (this.choice == 0) setstring
this.selection,Place Block; else

if (this.choice == 1) setstring
this.selection,Message Block; else

if (this.choice == 2) setstring
this.selection,Image Block; else

if (this.choice == 3) setstring
this.selection,Say2 Block; else

if (this.choice == 4) setstring
this.selection,Destroy Block;

showimg 211,@b@On: #s(this.on),0,134;

changeimgvis 211,4;

showimg 212,@b@Selection: #s(this.selection),0,134
+20;

changeimgvis 212,4;

if (this.on == 2) {

if (this.choice == 0) {

sleep .05;

if (leftmousebutton) triggeraction
0,0,serverside,Element/Block,block,#v(mousex),#v
(mousey);

}

if (this.choice == 1) {

sleep .05;

if (leftmousebutton) triggeraction
mousex,mousey,rightclicked,text,#c;

}

if (this.choice == 2) {

sleep .05;

if (leftmousebutton) triggeraction
mousex,mousey,rightclicked,img,#c;

}

if (this.choice == 3) {

sleep .05;

if (leftmousebutton) triggeraction
mousex,mousey,rightclicked,say2,#c;

}

if (this.choice == 4) {

sleep .05;

if (leftmousebutton) triggeraction
mousex,mousey,rightclicked,destroy,;

}

}

if (this.on == 1) {

showimg 200,@b@Place Block,280,200+(17*0);

showimg 201,@b@Message Block,280,200+(17*1);

showimg 202,@b@Image Block,280,200+(17*2);

showimg 203,@b@Say2 Block,280,200+(17*3);

showimg 204,@b@Destroy Block,280,200+(17*4);

showimg 205,@b@Close,280,200+(17*5);

//showimg 206,@b@#v(mousescreenx) - #v
(mousescreeny),300,200+(17*10);

for (i=0;i<20;i++) {

changeimgvis 200+i,5;

changeimgzoom 200+i,.9;

}

if (mousescreenx in |280,400| && mousescreeny in |
200+(17*0),200+(17*1)|) {

changeimgcolors 200,1,1,0,1;

if (leftmousebutton) {

this.choice = 0;

hideimgs 200,210;

this.on = 2;

}

} else changeimgcolors 200,1,1,1,1;

if (mousescreenx in |280,400| && mousescreeny in |
200+(18*1),200+(17*2)|) {

changeimgcolors 201,1,1,0,1;

if (leftmousebutton) {

this.choice = 1;

hideimgs 200,210;

this.on = 2;

}

} else changeimgcolors 201,1,1,1,1;

if (mousescreenx in |280,400| && mousescreeny in |
200+(18*2),200+(17*3)|) {

changeimgcolors 202,1,1,0,1;

if (leftmousebutton) {

this.choice = 2;

hideimgs 200,210;

this.on = 2;

}

} else changeimgcolors 202,1,1,1,1;

if (mousescreenx in |280,400| && mousescreeny in |
200+(18*3),200+(17*4)|) {

changeimgcolors 203,1,1,0,1;

if (leftmousebutton) {

this.choice = 3;

hideimgs 200,210;

this.on = 2;

}

} else changeimgcolors 203,1,1,1,1;

if (mousescreenx in |280,400| && mousescreeny in |
200+(18*4),200+(17*5)|) {

changeimgcolors 204,1,1,0,1;

if (leftmousebutton) {

this.choice = 4;

hideimgs 200,210;

this.on = 2;

}

} else changeimgcolors 204,1,1,1,1;

if (mousescreenx in |280,400| && mousescreeny in |
200+(18*5),200+(17*6)|) {

changeimgcolors 205,1,1,0,1;

if (leftmousebutton) {

hideimgs 200,210;

this.on = 0;

}

} else changeimgcolors 205,1,1,1,1;

}

timeout = 0.05;

}

Blitz_Hunter 08-05-2005 04:06 AM

wow... >_>

alissalee 08-05-2005 06:23 AM

Quote:

Originally Posted by Blitz_Hunter
wow... >_>

wow wat?

Tolnaftate2004 08-05-2005 06:30 AM

Quote:

Originally Posted by alissalee
putnpc2 #p(1),#p(2),{if (created) join block;};

For starters, the x and y need to be floats, which means use strtofloat() around the bolded parts.


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

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