Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 10-11-2001, 08:38 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
I already split it into 5 parts:
Inventory
Walking
Attacking
Damage
Status Bar

Inventory is the one that is too big. See, each window mode (items, magic, skill, equipment, status, ect) has it's own keydown code, so there are like, 4 different sets of keydown codes (I managed to put Items, Magic, Skill, and Equipment codes into 1 section since they are relatively the same). So, a big chunk of the npc is keydown related stuff. Then the other big chunk is the section that does draws everything. I have a good sized function that draws each item and name in the item window, and another for drawing each item and it's name for the equipment window. So, no, I can't split the npc =[
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #17  
Old 10-11-2001, 08:57 AM
SagaTCN SagaTCN is offline
Registered User
Join Date: Aug 2001
Location: West Michigan
Posts: 190
SagaTCN is on a distinguished road
Send a message via ICQ to SagaTCN Send a message via AIM to SagaTCN Send a message via Yahoo to SagaTCN
Ah =( -Yin
Reply With Quote
  #18  
Old 10-11-2001, 10:09 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
my sys for dq is huge and yet it only takes up like 20kb
Reply With Quote
  #19  
Old 10-11-2001, 09:21 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
The thing that takes up so much space in my Custom Inventory npc is that I have to have keydown code for like, 3 or 4 different modes. This is what one looks like. This is the 'D' key code for the modes that require the default item select window to open.
NPC Code:

if (this.keys[4]==1 && !this.4kd) {
x=playerx+1.5;
y=playery+2;
play rha_system_cursorselect.wav;
if (this.inventory_mode==1) {
setstring this.inventory_itemsift,-Item;
} else if (this.inventory_mode==7) {
setstring this.inventory_itemsift,#s(this.inventory_EW_Sift) ;
} else if (this.inventory_mode==4) {
setstring this.inventory_itemsift,-Magic;
} else if (this.inventory_mode==3) {
setstring this.inventory_itemsift,-Skill;
}
set this.inventory_ItemChoose;
InventoryDrawItems();
for (this.i=0;this.i<100;this.i++) {
hideimg 1000+this.i;
}
hideimg 996;
hideimg 997;
if (!this.inventory_mode==7) {
set this.inventory_noclosesound;
this.inventory_selectedItem=0;
this.inventory_selectedItem_line=1;
this.inventory_mode=0;
for (this.i=0;this.i<100;this.i++) {
hideimg 1400+this.i;
}
InventoryClose();
callweapon this.inventory_getItem,used;
} else {
this.inventory_selectedItem=0;
this.inventory_selectedItem_line=1;
this.inventory_EW_equipitem=this.inventory_getItem ;
this.inventory_mode=2;
}
unset this.infogot;
setstring client.ItemInfo,;
set this.4kd;
}
if (this.keys[4]==0 && this.4kd) { unset this.4kd; }

__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #20  
Old 10-11-2001, 09:24 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
That is only for 1 key. There are 8 keys total that I test in that section alone. Also, this is a routine that draws some stuff on the screen:
NPC Code:

} else if (this.inventory_mode==4) {
hideimg 998;
showimg 999,rha_system_CW_#s(client.Options_Skin).png,scre enwidth-192,screenheight*0.35;
showimg 1000,rha_system_window_#s(client.Options_Skin).png ,screenwidth*0.1,screenheight*0.2;
if (this.inv_keyhelp==0) {
showimg 1400,rha_system_key_#s(client.Options_Skin).png,sc reenwidth*0.1-33,screenheight*0.2-48;
if (EarnedMagicHand) {
showimg 1401,@A: Equip Left,screenwidth*0.1-33+10,screenheight*0.2-48+21;
} else {
showimg 1401,@A:,screenwidth*0.1-33+10,screenheight*0.2-48+21;
}
showimg 1402,rha_system_key_#s(client.Options_Skin).png,sc reenwidth*0.1+138-33+3,screenheight*0.2-48;
if (EarnedMagicHand) {
showimg 1403,@S: Equip Right,screenwidth*0.1+138-33+10+3,screenheight*0.2-48+21;
} else {
showimg 1403,@S:,screenwidth*0.1+138-33+10+3,screenheight*0.2-48+21;
}
showimg 1404,rha_system_key_#s(client.Options_Skin).png,sc reenwidth*0.1+138+138-33+6,screenheight*0.2-48;
showimg 1405,@D: Select,screenwidth*0.1+138+138-33+10+6,screenheight*0.2-48+21;
changeimgvis 1400,4;
changeimgvis 1401,4;
changeimgvis 1402,4;
changeimgvis 1403,4;
changeimgvis 1404,4;
changeimgvis 1405,4;
}
changeimgvis 999,4;
changeimgvis 1000,4;
setstring this.inventory_itemsift,-Magic;
InventoryDrawItems();
}


That draws the stuff when you select Magic from the options window. I have many other routines like these, which just add up space. Hmm. I can extract the Level Up code from here. Forgot about it..... But that still won't do any good for the npc =[
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #21  
Old 10-12-2001, 02:55 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Weapons can be max 28k or so
Reply With Quote
  #22  
Old 10-12-2001, 08:48 PM
SagaTCN SagaTCN is offline
Registered User
Join Date: Aug 2001
Location: West Michigan
Posts: 190
SagaTCN is on a distinguished road
Send a message via ICQ to SagaTCN Send a message via AIM to SagaTCN Send a message via Yahoo to SagaTCN
Hmm..I'm not sure (as I haven't had much experience with the npcserver), but could you possibly place the scripts in class files and take advantage of the 'join' command? Again, I have next to no experience when it comes to scripting for the npcserver so if this idea is incredibly stupid, forgive me. -Yin
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 11:17 PM.


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