Graal Forums

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

DragonBladesX 09-04-2001 06:43 PM

Staff Warping
 
Does anyone know the script for the Warper Birdbird_0 has? The script MUST work so that if someone has the NPC Staff Warper, and they say warpto x y levelname.graal it warps them there and while its warping them there it uses warp3.gani and warp4.gani (just like Birdbird_0 uses, please tell me, PM me or something)

Or just post a reply on here with the script.

BocoC 09-05-2001 12:53 AM

Um. I have one. This code will only work for a free server, though:
NPC Code:

if (playerchats) {
if (startswith(warpto,#c)) {
tokenize #c;
if (tokenscount==4) {
<insert gani stuff here>
setlevel2 #t(3),strtofloat(#t(1)),strtofloat(#t(2));
}
}
}



I may have setlevel2 wrong. I think its level,x,y but it might be x,y,level... Oh well.

Merlin 09-05-2001 12:53 AM

if (playerchats&&startswith(#c,warpto)) {
setani warpani,;
}
because it's just using rc warpto

DragonBladesX 09-05-2001 03:46 AM

Can you tell me the whole script by like picking it up and it going into your items as Staff Warper?

AlexH 09-05-2001 04:15 AM

Re: Staff Warping
 
Quote:

Originally posted by DragonBladesX
Does anyone know the script for the Warper Birdbird_0 has? The script MUST work so that if someone has the NPC Staff Warper, and they say warpto x y levelname.graal it warps them there and while its warping them there it uses warp3.gani and warp4.gani (just like Birdbird_0 uses, please tell me, PM me or something)

Or just post a reply on here with the script.

he uses a simple thing called warpto
your account rights get changed and it allows you to use it

joseyisleet 09-05-2001 04:36 AM

here's a small and simple one.
 
//NPC made by Josey Hunt
if (playertouchsme) {toweapons Level Warper;hidelocal
}
if (weaponfired) {setlevel #c.graal}

it doesnt have the x,y positions but that would be easy to add.

DragonBladesX 09-05-2001 04:43 AM

Im not taking about a simple warpto :grrr: I want it to use warp3.gani when the person says warpto x y levelname.graal and when they get in that level I want warp4.gani to start nobody knows? =(

Enigma_GP6 09-05-2001 04:47 AM

Why didn't you say so?
 
okay, I cant figure that one out, wait, yes I can....
try this:

if (playertouchsme){
toweapons MEGA WARP THING!;
}
if (weaponfired){
set warping;
freezeplayer 2;
setani warp3.gani,;
setlevel2 #c.graal;
}
//Then put this in every level:
if (playerenters&&warping){
freezeplayer 2;
setani warp4.gani,;
unset warping;
}

-Rebel95

DragonBladesX 09-05-2001 04:51 AM

BRB im gonna try that, I hope it works =D

DragonBladesX 09-05-2001 04:52 AM

When i put that script in on the setlevel2 #c.graal it said error: Expected format string,real,real

Enigma_GP6 09-05-2001 04:59 AM

okay, well, try this:

if (playertouchsme){
toweapons Piece 'o' Crap;
}
if (weaponfired){
set warping;
freezeplayer 2;
setani warp3.gani,;
setlevel2 #c.graal,#c,#c;
}
//Then put this in every level:
if (playerenters&&warping){
freezeplayer 2;
setani warp4.gani,;
unset warping;
}

DragonBladesX 09-05-2001 05:04 AM

Heh, can you make it so I dont have to fire it (press D) when i wanna warp but instead if i have it in my inventory than i will be warped?

Merlin 09-05-2001 05:39 AM

"don't use flags in npcws" -kai

use this.started=true
this.started=false
or something

ownerofbabylon 09-05-2001 06:10 AM

Quote:

Originally posted by DragonBladesX
Im not taking about a simple warpto :grrr: I want it to use warp3.gani when the person says warpto x y levelname.graal and when they get in that level I want warp4.gani to start nobody knows? =(
Ok u know what, I cant see why everyone is being nice to you. You ask for a script which usually pisses everyone off and they are being nice. I was gonna help (i can atleast script these but not much else) but then you made this little post and use the angry face and u dont even know how to make it go to ur weapons! =/ that is so stupid. Oh well... I guess its cuz u got 19 post.

Hmm i guess I will make it... brb

ownerofbabylon 09-05-2001 06:17 AM

Quote:

Originally posted by DragonBladesX
Heh, can you make it so I dont have to fire it (press D) when i wanna warp but instead if i have it in my inventory than i will be warped?
hmm i guess someone already made it, i shoulda read more of it heh. if you want it so that you can control it by voice make it check to see if they have weapon and then...

if(hasweapon(warper)&&playerchats&&strequals(#c,le vel1.graal)){
action;
}

you can fix that up but just use it to check for the weapon. Wait that doesnt check for the current weapon. Sorry ignore all that heh.

do this

if(weaponfired){ //checks if weapon fired
set warper;
}
and then do check for what level the player says (and maybe x and y if u wanna be cool)

As you can see im getting better at programming but have no way to express what im saying. I guess the next post I can answer I will make the code and put it on and not talk :(

DragonBladesX 09-05-2001 06:17 AM

Its not a mean face, and they are nice to me because I am nice to them im not a mean person. I just put that face cause everybody was posting the regular warpto and not the one i want although they are trying :D

ownerofbabylon 09-05-2001 06:21 AM

sowwy

LordMatt 09-05-2001 07:33 AM

if (playertouchsme) {
this.action=0;
toweapons Warper;
say2
HOW TO USE:#b
Use just like a RC account.#b
Say warpto x y to warp to a #b
certain x and y cordinate on #b
the board.#b
Say warpto x y levelname.graal #b
to warp to a certain x,y and #b
level name.;
}
if (playerchats&&isweapon) {
tokenize #c;
if(strequals(#t(0),warpto)){
if(tokenscount==4){
this.x=strtofloat(#t(1));
this.y=strtofloat(#t(2));
setlevel2 #t(3),this.x,this.y;
}
if(tokenscount==3){
this.x=strtofloat(#t(1));
this.y=strtofloat(#t(2));
setlevel2 #L,this.x,this.y;
}
}}

Falcor 09-06-2001 02:52 AM

I dont know why people have Staff weapons. Its a waist of time that could be spent on more important things like eating and sleeping. Why waist ANY time making them when there is that WONDERFUL device that stefan made that outdoes them! REMOTE CONTROL! :eek: :rolleyes:

Tyhm 09-06-2001 04:27 AM

Amazingly, this guy's constantly bugging me on Graal. He can't wrap his head around setani warp3,; going before the setlevel, apparently...because nothing runs after a setlevel

entravial 09-06-2001 05:19 AM

I'm not gonna script out the whole thing, but I will tell how to do the ganis...

1st off, before the setlevel2, put the first gani...

2nd, also before the setlevel2, put this.mode=1

3rd... if (playerenters && this.mode=1){setani the-gani,param;this.mode=0;}

Tada =/

General 09-06-2001 06:16 AM

Quote:

Originally posted by Tyhm
Amazingly, this guy's constantly bugging me on Graal. He can't wrap his head around setani warp3,; going before the setlevel, apparently...because nothing runs after a setlevel

which is why that old jailing script that every n00b server uses doesn't work

setlevel2 jail.graal,20,20;
setstring server.jailaccount,;

I think its funny that they all stole the same script...and not a single one fixed it


All times are GMT +2. The time now is 06:32 AM.

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