Search the Community
Showing results for tags 'getequippedon'.
Found 1 result
-
Hello , I found this function but can not remember where , everything works as expected, but would like to make a change in function and do not know how. The function lists all the teams of the character, wanna listed only head - top , armor, shield , boots and robe, also list only those who have without this item , those already equipped stay off the list. it's possible? Could someone please help me? it's possible it's possible Function source: /*======================================================= * Returns where the current item is equipped. *-------------------------------------------------------*/ BUILDIN(getequippedon) { int i = status->current_equip_item_index; struct map_session_data *sd; if (( sd = script->rid2sd(st) ) != NULL) { switch (i) { case EQI_HAND_L: script_pushint(st, ( sd->inventory_data[i]->type == IT_ARMOR ? EQP_SHIELD : EQP_WEAPON )); break; default: script_pushint(st, sd->status.inventory[i].equip); break; } } else script_pushint(st, 0); return 0; } Item_db: Id: 9999 AegisName: "Diablo_Enchant" Name: "Diablo Enchant" Type: 11 Script: <" callfunc( "F_DiabloEnchant",9999,909 ); "> }, { Id: 909 AegisName: "Jellopy" Name: "Jellopy" Buy: 6 Weight: 10 BuyingStore: true Script: <" .@eqp = getequippedon(); if (.@eqp & EQP_ARMOR) { bonus bVit,100; } if (.@eqp & EQP_HEAD_TOP) { bonus bInt,100; } if (.@eqp & EQP_SHOES) { bonus bAgi,100; } ">