Graal Forums

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

XeroMaster 01-17-2002 08:33 AM

GGRRRrrrrr.....
 
this is my 3RD post on this subject!!!!
no one will help me....
I need the script to make a menu thing like in the graal 2001 chothes helper weapon......(the thing that cost 100g)

i need a weapon so when i fire it, it will have 6-9 choses..
please help

TDO2000 01-17-2002 10:04 PM

u got help on how to do it, but noone will do it for u
what u normally need again:

showimg index,@text here,x,y;

a timeoutout and keydown-event...
next thing, u wanted to have it like the one Liquid made in his Space-game so just watch the code and how he did it (just say watch how he did it not copy his code!!!)

Saga2001 01-18-2002 12:17 AM

I personally suggest the use of this:
NPC Code:

if (created) {
this.maxsel=the max number of items;
// The starting X Position of the menu;
this.startx = 5;
// The starting Y Position of the menu;
this.starty = 100;
}
if (timeout) {
if (keydown(0)&&this.place>0) {this.place--;}
if (keydown(2)&&this.place<this.maxsel) {this.place++;}
showimg 401,@#-->,this.startx,this.starty+(this.place*10);
changeimgvis 401,4;
changeimgzoom 401,.5;
timeout=.05;
}



thats for the cursor that points out your items.

Slaktmaster 01-18-2002 12:23 AM

I made one for the N-Pulse warper, inspired from Shadow Knight's old warper for N-Pulse.

XeroMaster 01-18-2002 05:52 AM

um..
 
I do not understand.
how do I activate the script?

if (created)
{ this.maxsel=6;
// The starting X Position of the menu;
this.startx = 5;
// The starting Y Position of the menu;
this.starty = 100; }
if (timeout) {
if (keydown(0)&&this.place>0)
{this.place--;}
if (keydown(2)&&this.place<this.maxsel)
{this.place++;}
showimg 401,@#-->,this.startx,this.starty+
(this.place*10); changeimgvis 401,4;
changeimgzoom 401,.5; timeout=.05; }

LiquidIce00 01-18-2002 07:17 AM

mess w/ x,y's to change things around .. and yah u can use a loop but this is simple to understand..

NPC Code:

if (playertouchsme) {
disabledefmovement;
this.on=1;
timeout=.1;
setani idle,;
}
if (keydown(1)&&this.on=1) { this.pos=0; }
if (keydown(3)&&this.on=1) { this.pos=1; }

if (keydown(4)&&this.on=1) {
if (this.pos=1) { this.on=0; }
else {
quit();
//put below here whatever you want it to do when the player chooses yes
setlevel2 whateveryourhouse.graal,30,30;
//end
}
}

if (timeout) {
showimg 200,@Go under house?,screenwidth/2-50,(screenheight/2)-30;
if (this.pos=0) {
showimg 201,@@b@yes,(screenwidth/2)-20,screenheight/2;
showimg 202,@no,(screenwidth/2)+20,screenheight/2;
}
else {
showimg 201,@yes,(screenwidth/2)-20,screenheight/2;
showimg 202,@@b@no,(screenwidth/2)+20,screenheight/2;
}
changeimgvis 200,4;
changeimgvis 201,4;
changeimgvis 202,4;
if (this.on=1) { timeout=.1; }
else { quit(); }
}
function quit() {
this.on=0; hideimg 200;hideimg 201; hideimg 202; enabledefmovement;
}


Saga2001 01-18-2002 11:33 PM

ooops, lol i forgot to put the timeout in mine...lol


All times are GMT +2. The time now is 10:01 PM.

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