bool IsQuestUsedItem(string itmID) { aref arItm; if( Items_FindItem(itmID,&arItm)<0 ) return false; if( CheckAttribute(arItm,"price") && sti(arItm.price)>0 ) return false; return true; } void DoCharacterUsedItem(ref chref, string itmID) { aref arItm; if( Items_FindItem(itmID,&arItm)<0 ) return; TakeItemFromCharacter(chref,itmID); if( CheckAttribute(arItm,"potion.health") ) { LAi_UseHealthBottle(chref,stf(arItm.potion.health)); if(sti(chref.index)==GetMainCharacterIndex()) { Log_SetStringToLog("Health Up"); } } if( CheckAttribute(arItm,"potion.antidote") ) { LAi_UseAtidoteBottle(chref); if(sti(chref.index)==GetMainCharacterIndex()) { Log_SetStringToLog("You are cured from poison"); } } if( CheckAttribute(arItm,"potion.sound") ) { PlaySound(arItm.potion.sound); } } float MinHealthPotionForCharacter(ref chref) { float ftmp; bool isFinded = false; for(int n=0; n0 ) { if(isFinded) { if( stf(Items[n].potion.health)0 ) { ftmp = stf(Items[n].potion.health); if( ftmp0 ) { arFind = arItm; return i; } } return -1; } int FindQuestUsableItem(ref arFind, int startIdx) { int i; aref arItm; bool bSeaInterface = bSeaActive && !bAbordageStarted; if(startIdx<0) startIdx=0; for(i=startIdx; i