Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 12:25 AM.


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