View Single Post
  #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