Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Tailor System (https://forums.graalonline.com/forums/showthread.php?t=14635)

nyghtGT 10-14-2001 11:46 PM

Tailor System
 
I need a little help getting the keydown to work ... plus ... i need help of how i can hold the player still so he doesn't move while the taylor is open:
NPC Code:

// NPC made by Nyght *Asst* (LAT Admin)
if (playerenters) {
toweapons Babylon Taylor;
}
if (weaponfired) {
showimg 203,babylontaylor2.gif,200,200;
changeimgvis 203,10;
changeimgzoom 203,10;
showimg 204,#3,230,225;
changeimgvis 204,10;
changeimgzoom 204,10;
changeimgpart 204,0,63,32,32;
showimg 205,b_selectarrow.gif,205,235;
changeimgvis 205,10;
changeimgzoom 205,10;
this.arrowlocation=0;
set tayloropen;
this.head=510;
}
if (keydown(1) && tayloropen) {
this.head--;
showimg 204,head#v(this.head).gif,230,225;
changeimgvis 204,10;
changeimgzoom 204,10;
changeimgpart 204,0,63,32,32;
}
if (keydown(3) && tayloropen) {
this.head++;
showimg 204,head#v(this.head).gif,230,225;
changeimgvis 204,10;
changeimgzoom 204,10;
changeimgpart 204,0,63,32,32;
}
if (keydown(0) && tayloropen) {
this.arrowlocation++;
play nextpage.wav;
hideimg 205;
}
if (this.arrowlocation=6) {
showimg 205,b_selectarrow.gif,205,480;
changeimgvis 205,10;
changeimgzoom 205,10;
}
if (keydown(6)) {
hideimg 203;
hideimg 204;
hideimg 205;
unset tayloropen;
}


nyghtGT 10-14-2001 11:49 PM

also ...
 
try to keep in mind that this is my first time doing scrpiting with 'showimg' so please cut back on the criticism ....

SagaTCN 10-14-2001 11:56 PM

You could use disabledefmovement; to stop the player from moving (to renable movement, use enabledefmovement). -Yin

nyghtGT 10-14-2001 11:57 PM

keydown ...
 
when i do that it disables all the keydown stuff .....

LiquidIce00 10-14-2001 11:59 PM

Re: keydown ...
 
Quote:

Originally posted by nyghtGT
when i do that it disables all the keydown stuff .....
when u do that it just will stop the player from moving and using weapons.. keydown should still work

btedji 10-15-2001 12:16 AM

Re: Tailor System
 
10 is not a vis level, the max is either 4 or 5

LiquidIce00 10-15-2001 12:22 AM

Re: Re: Tailor System
 
Quote:

Originally posted by btedji
10 is not a vis level, the max is either 4 or 5
I believe u can have as high as you want .. if not its higher then 5 im sure of that

nyghtGT 10-15-2001 12:34 AM

Re: Re: keydown ...
 
Quote:

Originally posted by LiquidIce00

when u do that it just will stop the player from moving and using weapons.. keydown should still work

well when i do disabledefmovement my keydown doesn't work .... I dunno though i'll just finish it then worry about the keydown ...

btedji 10-15-2001 12:39 AM

Re: Re: Re: keydown ...
 
Quote:

Originally posted by nyghtGT

well when i do disabledefmovement my keydown doesn't work .... I dunno though i'll just finish it then worry about the keydown ...

keydown works when disabledefmovement is on

ownerofbabylon 10-15-2001 12:51 AM

the problem with that is its a weapon and if you do disablemovement it disables weapons making it you cant refire the weapon to make it go away

SagaTCN 10-15-2001 12:55 AM

Add an option in the tailor NPC to 'close' the menu (enabling movement again, and hiding the images). -Yin

btedji 10-15-2001 01:29 AM

Quote:

Originally posted by ownerofbabylon
the problem with that is its a weapon and if you do disablemovement it disables weapons making it you cant refire the weapon to make it go away
that is why you do a keydown(d) sort of thing

Falcor 10-15-2001 01:32 AM

Dont use flags for the weapons.

Do like this.on = 1; and this.on = 0;

btedji 10-15-2001 01:39 AM

Quote:

Originally posted by Falcor
Dont use flags for the weapons.

Do like this.on = 1; and this.on = 0;

unless you want to save the status when the player logs off but that is not the case this time :D

nyghtGT 10-15-2001 02:54 AM

dumbass
 
Quote:

Originally posted by SagaTCN
Add an option in the tailor NPC to 'close' the menu (enabling movement again, and hiding the images). -Yin
no offense but i am not a ******* ....

SagaTCN 10-15-2001 03:02 AM

That reply was intended for Lord Helmut. -Yin

Xaviar 10-15-2001 03:47 AM

And try not to use disabledefmovement on babylon npc's, if you want me to explain why, you can pm me...But I will refrain from posting it here


All times are GMT +2. The time now is 03:43 PM.

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