Jump to content

Recommended Posts

Posted

//:) me too like to add some reply... I would like to answer bodebruno...

if you can notice almost every month official server releases new items with new functions/skill..

and ATM there are already skills designated for 700+

// New NPC Wide Status AoE Skills And Others
//700,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_WIDEHEALTHFEAR,Wide Health Fear
//701,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_WIDEBODYBURNNING,Wide Body Burnning
//702,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_WIDEFROSTMISTY,Wide Freezing
//703,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_WIDECOLD,Wide Crystalize
//704,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_WIDE_DEEP_SLEEP,Wide Deep Sleep
//705,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_WIDESIREN,Wide Siren's Voice
//706,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_VENOMFOG,Venom Fog
//707,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_MILLENNIUMSHIELD,Millenium Shield 2
//708,0,0,0,0,0,0,??,0,no,0,0,0,none,0, NPC_COMET,Comet 2

:meow:

Posted (edited)

Well I guess I will continue to post here. These armors created, even if used with elemental stones or SC, the SC and elemental stone do not affect the armor at all.

For instance a Fire Chain mail acts exactly like a regular chain mail. I am looking around the source, but as I'm teaching it to myself, it is very difficult to read. Where would I put the code to check the armor for an element? Im assuming in the status.c but the battle.c also has a couple of elemental checks in it. So I cant seem to find the location at which the data is actually used in the calculations.

Any help on this would be much appreciated.

EDIT: I was able to get the element taking effect though I am sure that this is a crude piece of code. Here is my code, hope it helps someone.

//Parse Cards
for( i = 0; i < EQI_MAX - 4; i++ )
{
 current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
 if( index < 0 )
  continue;
 if( i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index )
  continue;
 if( i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index )
  continue;
 if( i == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index) )
  continue;
 if( sd->inventory_data[index] )
 {
  int j, c;
  struct item_data *data;
  //Card script execution.
  if( itemdb_isspecial(sd->status.inventory[index].card[0]) ) {
+	if(sd->status.inventory[index].card[1]&0x0f){
+	 switch(sd->status.inventory[index].card[1]&0x0f) {
+	  case 1: status->def_ele=ELE_WATER; break;
+	  case 2: status->def_ele=ELE_EARTH; break;
+	  case 3: status->def_ele=ELE_FIRE; break;
+	  case 4: status->def_ele=ELE_WIND; break;
+	 }
+	}
   continue;
+   }
  for( j = 0; j < MAX_SLOTS; j++ )
  { // Uses MAX_SLOTS to support Soul Bound system [inkfish]
current_equip_card_id = c = sd->status.inventory[index].card[j];
if( !c )
 continue;
data = itemdb_exists(c);
if( !data )
 continue;
if( first && data->equip_script )
  { //Execute equip-script on login
 run_script(data->equip_script,0,sd->bl.id,0);
 if( !calculating )
  return 1;
}

EDIT2: I was able to make the Star crumbs work as well. Here is my code for that:

else if(sd->inventory_data[index]->type == IT_ARMOR) {
+   int r, s;
+   s = 0;
+   if(sd->status.inventory[index].card[0]==CARD0_FORGE && sd->equip_index[EQI_ARMOR] == index) 
+   { // Forged Armor, Smith, Forge, Armor 
+    r += (sd->status.inventory[index].card[1]>>8);  //while weapons get 5 atk, armors get 2 def (hence the 2/5 calc)
+    s = (r*2)/5;
+    if(s >= 6) s = 8; // 3 Star Crumbs now give +11 def
+    if(pc_famerank(MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]) ,MAPID_BLACKSMITH))
+	 s += 4; //Ranked Smiths give +4 def to armors
+   }
+   status->def += s;
  if ( (r = sd->status.inventory[index].refine) )
   refinedef += refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
  if(sd->inventory_data[index]->script) {
   if( i == EQI_HAND_L ) //Shield
 sd->state.lr_flag = 3;
   run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
   if( i == EQI_HAND_L ) //Shield
 sd->state.lr_flag = 0;
   if (!calculating) //Abort, run_script retriggered this. [skotlex]
 return 1;
  }
 }

Edited by rocky6861
  • 4 years later...
  • 10 months later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...