Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Unstick me rebuild (https://forums.graalonline.com/forums/showthread.php?t=1232)

grim_squeaker_x 04-10-2001 10:02 PM

I've managed to rebuilt unstick me in a NPCW which is 1.28 compatible, so "yay!" to me.
Ahem, well anyway here's the code:
NPC Code:
// NPC made by Grim Squeaker
if (playerenters) toweapons Unstick me;
if (playerenters||timeout) {
setarray this.loc,playerscount*2;
setarray this.time,playerscount;
for (this.i=0;this.i<playerscount;this.i++) {
if (players[this.i].x==this.loc[this.i*2]&&playery==this.loc[this.i*2+1]) this.time[this.i]++;
else {
this.time[this.i]=0;
this.loc[this.i*2]=players[this.i].x;
this.loc[this.i*2+1]=players[this.i].y;
}
}
timeout=0.05;
}
if (playerchats) {
if (strequals(#c,unstick me)) {
for (this.i=0;this.i<playerscount;this.i++) {
if (this.time[this.i]>=600) {
setplayerprop #c,Warped;
playerx=31;
playery=31;
setlevel house1.graal;
}
else setplayerprop #c,Wait 30 seconds before doing 'Unstick me'!;
}
}
}



Only problem with it is that when you are online it won't work in the room where you get the NPC.

grim_squeaker_x 04-10-2001 11:15 PM

Yeah.
 
I for some reason just decided to script it for 1.28, and since 1.28 hasn't got isweapon built in yet I just had to do it without isweapon ;)

sniperjoe10 04-11-2001 01:12 AM

Good job, Grim.

MoonAngel 04-11-2001 02:14 AM

im posting this cause.. its not working =P ur sig isnt working, itll probably be working when others see this post, just fix it, cause.. we can't see Lycia's work =P

Komieko 04-11-2001 10:17 AM

Now we only need sethead setshield,and setsword commands for 1.28 @_@

Spearman 04-11-2001 10:21 AM

Nice job, how long did you spend on that?

grim_squeaker_x 04-11-2001 06:37 PM

Quote:

Originally posted by Spearman
Nice job, how long did you spend on that?
1 hour :D
And that is 1 huor only because I had to downgrade some of the commands I'm used to for 1.28 @_@

Komieko 04-15-2001 02:17 AM

problemo
 
There is a problem..when you get the weapon u can't open your weapons menu which is kinda important =/

grim_squeaker_x 04-15-2001 03:23 AM

Re: problemo
 
Quote:

Originally posted by Komieko
There is a problem..when you get the weapon u can't open your weapons menu which is kinda important =/
Strange, I could just perfectly open my weapons menu... Maybe it helps if you assign an image to the weapon.

Komieko 04-15-2001 03:44 AM

yep!
 
yeah I assigned an image and it worked!


All times are GMT +2. The time now is 12:00 PM.

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