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 04-15-2002, 01:16 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
Same Script, Different Problem

I can't seem to find what's wrong with this. It's supposed to show the player's current weapon in the middle of a box, then the player's next weapon below it, and previous weapon above it.

NPC Code:

function ws() {
showimg 100,wpn2.png,x*16,y*16;
changeimgvis 100,4;
showimg 102,#W,x*16+7,y*16+43;
changeimgvis 102,4;
if(selectedweapon > 0) {
if(!startswith(-,#w(selectedweapon-1))) {
showimg 103,#W(selectedweapon-1),x*16+7,y*16+7;
changeimgcolors 103,1,1,1,0.99;
changeimgvis 103,4;
}else{
showimg 103,#W(selectedweapon-2),x*16+7,y*16+7;
changeimgcolors 103,1,1,1,0.99;
changeimgvis 103,4;
}
}else{hideimg 103;}

if(selectedweapon < (weaponscount-1)) {
if(!startswith(-,#w(selectedweapon-1))) {
showimg 104,#W(selectedweapon+1),x*16+7,y*16+79;
changeimgcolors 104,1,1,1,0.99;
changeimgvis 104,4;
}else{
showimg 104,#W(selectedweapon21),x*16+7,y*16+79;
changeimgcolors 104,1,1,1,0.99;
changeimgvis 104,4;
}
}else{hideimg 104;}
}

__________________

Solemn Destiny - Owner
Reply With Quote
  #2  
Old 04-15-2002, 01:47 AM
Dustey Dustey is offline
Registered User
Join Date: Nov 2001
Location: Do You Think I Know?
Posts: 193
Dustey is on a distinguished road
Send a message via AIM to Dustey
so whats the problem?
__________________
And Yes I work For.... Renegade
Reply With Quote
  #3  
Old 04-15-2002, 02:00 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
.

Well, if you aren't going to bother thinking about it, the problem is what happens to invisible weapons, and at the start and end of the list.
__________________

Solemn Destiny - Owner
Reply With Quote
  #4  
Old 04-15-2002, 03:14 AM
Dustey Dustey is offline
Registered User
Join Date: Nov 2001
Location: Do You Think I Know?
Posts: 193
Dustey is on a distinguished road
Send a message via AIM to Dustey
Re: .

Quote:
Originally posted by zallus-k
Well, if you aren't going to bother thinking about it, the problem is what happens to invisible weapons, and at the start and end of the list.
thinking is hard and for people who dont play graal
__________________
And Yes I work For.... Renegade
Reply With Quote
  #5  
Old 04-15-2002, 06:14 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
I was not posting a complete script, as I had no idea which part of this code wasn't functioning. But as I do now, and no longer need help with this individual script, I'll stop caring.:o
__________________

Solemn Destiny - Owner
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 08:39 AM.


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