Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   'Q' Inventory (https://forums.graalonline.com/forums/showthread.php?t=19206)

zell12 12-19-2001 08:23 AM

'Q' Inventory
 
Ok, me and flames decided to start the server back up again... but for some of our idea's to work, we need to find out if there is a way to make a different 'Q' inventory, if someone can help it would really help scince me and him were like the only people making it full time, scince everyone quit on us :(

LiquidIce00 12-19-2001 08:35 AM

here is an example
NPC Code:

// NPC made by LiquidIce - PM MY RC plz
timeout=.05;
if (playerenters&&!isweapon) {
toweapons -Backpack;
}
if (isweapon) { disableselectweapons; }
if (timeout&&isweapon) {
this.timer=(this.timer+1)%3;
if (keydown(9)&&this.timer=2) {
if (this.inmenu=1) {
hideimg();
this.inmenu=0;
}
else { this.inmenu=1; }
}
if (this.inmenu=1) { disabledefmovement;
if (this.timer=2) {
checkkey();
}
draw();
}
}

function draw() {
//gain weapons count w/o hidden weapons
this.count=0;
for (this.i=0;this.i<weaponscount;this.i++) {
if (!startswith(-,#w(this.i))) { this.count++; }
}
//player has no weapons. shut down
if (this.count=0) { setplayerprop #c,You have no weapons; this.inmenu=0;hideimg(); return;}
//check if the current weapon is the first non hidden
this.notfirst=0;
for (this.i=0;this.i<selectedweapon;this.i++) {
if (!startswith(-,#w(this.i))) { this.notfirst=1 }
}
if (selectedweapon>0&&this.notfirst=1) { showimg 100,@<,screenwidth/2-20,screenheight/2; }
else { hideimg 100; }
showimg 101,#W,screenwidth/2,screenheight/2;
showimg 102,@#w,screenwidth/2-strtofloat(#v(strlen(#w)))*2,screenheight/2-30;

if (selectedweapon<this.count) {
showimg 103,@>,screenwidth/2+40,screenheight/2;
}
else { hideimg 103; }
for (this.i=0;this.i<4;this.i++) { changeimgvis this.i+100,4; }
}

function hideimg() {
for (this.i=0;this.i<4;this.i++) { hideimg this.i+100; }
enabledefmovement;
}

if (playerhurt&&this.inmenu=1) {
this.inmenu=0;
hideimg();
}
function checkkey() {
if (keydown(1)) {
//find index of before non hidden weapon
for (this.i=selectedweapon-1;this.i>-1;this.i--) {
if (!startswith(-,#w(this.i))) { selectedweapon=this.i; return;}
}
play nextpage.wav;
}
if (keydown(3)) { selectedweapon+=1; play nextpage.wav; }
}


Sennema 12-19-2001 08:56 AM

Re: 'Q' Inventory
 
Quote:

Originally posted by zell12
Ok, me and flames decided to start the server back up again... but for some of our idea's to work, we need to find out if there is a way to make a different 'Q' inventory, if someone can help it would really help scince me and him were like the only people making it full time, scince everyone quit on us :(
Yes, there is. Just gotta do a few minor adjustments...

first off, use "disableselectweapons" so when you press 'Q', nothing happens, then make something happen using...

NPC Code:

if(keydown(9)&&isweapon){
do stuff;
}



Ask me on MSN sometime and I'll help you out, cause I'm too lazy to do it here (though I do need the 500 posts)

zell12 12-20-2001 03:27 AM

Thankz alot liquid and Dreamus

zell12 12-20-2001 03:40 AM

what I ment liquid, was a diffrent page for the inventory... instead of that normal one

royce 12-20-2001 07:42 AM

should have said backround...ohh well, now i learned.

zell12 12-21-2001 03:49 AM

bah... lets just hope someone will come along and tell me :D

Sennema 12-21-2001 04:56 AM

Find me on MSN or something and I'll help out.

zell12 12-21-2001 05:21 AM

I found you but the codes are too complex for my "old scripting" mind
:p

ShockwaveISTHEBEST 12-21-2001 08:49 AM

NPC Code:

if (life exists
timeout=.5;
Dreamus+Liqid Ice==l33t scriptorz;
}


zell12 12-21-2001 09:36 AM

lol

if (life exists) {
timeout=.5;
Dreamus+Liqid Ice=l33t scriptorz;
}
:rolleyes:

Sennema 12-22-2001 05:39 AM

Quote:

Originally posted by zell12
lol

if (life exists) {
timeout=.5;
Dreamus+Liqid Ice=l33t scriptorz;
}
:rolleyes:

No, no. Like this!

NPC Code:

if (life exists){
timeout=.5;
Draemus+LiquidIce=elite scripting people;
}
if(timeout){
Draemus=Semi-partially-elite scripting person;
LiquidIce=elite scripting person;
}


lordhelmut 12-22-2001 06:32 AM

I would like to one day maybe make a nice one for babylon but for now the normal one is fine...

LiquidIce00 12-22-2001 06:46 AM

*loves*
erm.. you mean diff picture for the background of the inventory?
You can either do it 2 ways.
1.hard way-
this means you rescript your own inventory and put ur little BG pic as you like.
2.change img-
this means you would change the img that Graal uses as the bg (i forgot the img name.. look around in ur folder u will find it). .this sucks cuz ppl would have to d/l it manually.

zell12 12-22-2001 09:48 AM

Um... I was thinking that I could script my own... Dreamus already gave me some of the script, but its too hard to understand... he has like a menu, I just want a diffrent backround that is the same as the old inventory:)

T3CK 12-24-2001 09:25 AM

Before you can do any of that stuff you have to have a command in your system that says disableselectweapons;

Googi 12-24-2001 10:03 AM

:megaeek:

Your a pretty 1337 scripter.


All times are GMT +2. The time now is 06:36 PM.

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