Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-11-2002, 11:25 AM
zallus-k zallus-k is offline
Registered User
Join Date: Sep 2001
Location: AC0265, Zaroke
Posts: 122
zallus-k is on a distinguished road
Hidden NPCW Skipping

Does anyone know of a process to skip past nidden NPCWs in a menu system? I tried several times without luck. Oh, and in case it matters, the NPC only shows the current, previous, and next NPCWs in the list.
__________________

Solemn Destiny - Owner
Reply With Quote
  #2  
Old 05-11-2002, 11:33 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight

Jagen:
if(!startswith(-,#w(index)))
try somethin like that
Reply With Quote
  #3  
Old 05-11-2002, 11:42 AM
zallus-k zallus-k is offline
Registered User
Join Date: Sep 2001
Location: AC0265, Zaroke
Posts: 122
zallus-k is on a distinguished road
How about I tried
NPC Code:

for(this.zix=0;startswith(-,#w(selectedweapon-this.zix));this.zix++){;}
selectedweapon=selectedweapon-(this.zix+1);


And it didn't work?
__________________

Solemn Destiny - Owner
Reply With Quote
  #4  
Old 05-11-2002, 12:04 PM
zallus-k zallus-k is offline
Registered User
Join Date: Sep 2001
Location: AC0265, Zaroke
Posts: 122
zallus-k is on a distinguished road
Hey.

I really need this quickly, seeing as electricity to this laptop is running out. Please, does anyone know?
__________________

Solemn Destiny - Owner
Reply With Quote
  #5  
Old 05-11-2002, 08:48 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Quote:
Originally posted by Neonight

Jagen:
if(!startswith(-,#w(index)))
try somethin like that
It doesnt work because the "-" is not in the weapons name...
I made a script long time ago that I had to use something like, I just saw that I usully didnt put images on the hidden weapons so I used "if(!startswith(-,#W(index)))", but I dunno if there is another way
Reply With Quote
  #6  
Old 05-11-2002, 10:57 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by zallus-k
How about I tried
NPC Code:

for(this.zix=0;startswith(-,#w(selectedweapon-this.zix));this.zix++){;}
selectedweapon=selectedweapon-(this.zix+1);


And it didn't work?
I would say create a string array or a string list of acceptable or allowable NPCW names and check from there...just leave out the hidden weapons
__________________
Reply With Quote
  #7  
Old 05-11-2002, 11:57 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
keep a string or something with the weapon list in it (of the player)
NPC Code:

for (this.inc=0;this.inc<weaponscount;this.inc++) {
if (!startswith(-,#w(this.inc))) {
addstring player.weaponlist,#w(this.inc);
}
}

__________________
[signature]insert here[/signature]
Reply With Quote
  #8  
Old 05-12-2002, 12:38 AM
zallus-k zallus-k is offline
Registered User
Join Date: Sep 2001
Location: AC0265, Zaroke
Posts: 122
zallus-k is on a distinguished road
Bah.

I have pretty much lost all hope of figuring this out. Here's the code that I ended up with, try to figure it out if you can:

PHP Code:
function WeaponSelect() {
  if((
keydown(9) && !inws) || (mousescreenx 70 && mousescreeny 70 && mousedown)) {
    
disabledefmovement;
    
sleep 0.2;
    
setani idle,;
    
set inws;
    
setarray this.wlist,256;
    
this.p=0;
    for (
this.zfm=0;this.zfm<weaponscount;this.zfm++) {if (!startswith(-,#w(this.zfm))) this.wlist[this.p]==zfm;this.p++;}
  
}
  if (
inws) {
    for(
this.pi=0;selectedweapon!=this.wlist[this.pi];this.pi++) {;}
    if(
selectedweapon!=0)this.pi++;
    
showimg 1032,wpn2.png,13,74;
    
changeimgvis 1032,4;
    
showimg 1033,#W,13+7,74+43;
    
changeimgvis 1033,4;
    
showimg 1036,@ - #w,13+7+32+4+5,74+43+7;
    
changeimgvis 1036,4;
    if(
selectedweapon 0) {
      
showimg 1034,#W(this.wlist[this.pi-1]),13+7,74+7;
      
changeimgcolors 1034,1,1,1,0.99;
      
changeimgvis 1034,4;
    }else{
hideimg 1034;}
    if(
selectedweapon < (weaponscount-1)) {
      
showimg 1035,#W(this.wlist[this.pi+1]),13+7,74+79;
      
changeimgcolors 1035,1,1,1,0.99;
      
changeimgvis 1035,4;
    }else{
hideimg 1035;}
    if((
keydown(5) || keydown(9)) || ((mousescreenx 52 || mousescreeny 185) && mousedown)) {
      
hideimg 1032;
      
hideimg 1033;
      
hideimg 1034;
      
hideimg 1035;
      
hideimg 1036;
      
enabledefmovement;
      unset 
inws;
      
sleep 0.2;
    }
    if((
keydown(0) || keydown(1)) || (mousescreenx 20 && mousescreeny 81 && mousescreenx 52 && mousescreeny 113 && mousedown)) {
      for(
this.zix=0;startswith(-,#w(selectedweapon-this.zix));this.zix++){;}
      
selectedweapon=selectedweapon-(this.zix+1);
      
sleep 0.1;
    }
    if((
keydown(2) || keydown(3)) || (mousescreenx 20 && mousescreeny 153 && mousescreenx 52 && mousescreeny 185 && mousedown)) {
      if(
startswith(-,#w(selectedweapon+1))) {
        
selectedweapon=selectedweapon+2;
      }else{
        
selectedweapon=selectedweapon+1;
      }
      
sleep 0.1;
    }

  }

__________________

Solemn Destiny - Owner
Reply With Quote
  #9  
Old 05-13-2002, 08:45 AM
Bhala Bhala is offline
Disgruntled Monkey
Bhala's Avatar
Join Date: Mar 2001
Posts: 779
Bhala is on a distinguished road
make sure all your weapons use a clear img & just check for that img on the weapon.... ie make them use null.png & do
if(!strequals(#W,null.png)){
//do stuff here
}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:48 PM.


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