Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ReturnTooltip_NTT_ITEM_FARIS (string param, string TooltipType, ETooltipSourceType eSourceType, optional bool isShortcut)
- {
- local ItemInfo item;
- local EItemType EItemType;
- local EEtcItemType EEtcItemType;
- local bool bLargeWidth;
- local string SlotString;
- local int nTmp;
- local string ItemName;
- local string ItemSlotWithItemTypeStr;
- local string strAdena;
- local string strAdenaComma;
- local Color AdenaColor;
- local int nEnchantValueTextGap;
- local int nSimpleLineCountAdd;
- local int bMainIconGap;
- local int pAtkValue;
- local int mAtkValue;
- local int pAtkEnchant;
- local int mAtkEnchant;
- if ( eSourceType == 1 )
- {
- ParamToItemInfo(param,item);
- if ( isShortcut )
- {
- FindItemByServerID(item.ServerID,item);
- }
- EItemType = EItemType(item.ItemType);
- EEtcItemType = EEtcItemType(item.ItemSubType);
- ItemName = Class'UIDATA_ITEM'.static.GetRefineryItemName(item.Name,item.RefineryOp1,item.RefineryOp2);
- GetTextSize(" + Augmented " $ string(item.Enchanted) $ ItemName $ " " $ item.AdditionalName, textWidth, textHeight);
- // GetTextSize(" + Augmented " ,string(item.Enchanted),ItemName ," " ,item.AdditionalName, textWidth, textHeight);
- if ( !(AddBGByType(item)) )
- {
- if ( addItemIcon(item,item.IconName) )
- {
- bMainIconGap = 3;
- }
- } else {
- bMainIconGap = 3;
- }
- if ( (TooltipType != "InventoryPrice1HideEnchant") && (TooltipType != "InventoryPrice1HideEnchantStackable") )
- {
- AddTooltipItemEnchantfaris(item,True,5,1);
- nEnchantValueTextGap = 2;
- }
- AddTooltipItemNamefaris(ItemName,item,1,(bMainIconGap + nEnchantValueTextGap),1);
- AddTooltipItemGradefaris(item,0,1);
- if ( TooltipType != "InventoryPrice1HideEnchantStackable" )
- {
- if ( TooltipType != "QuestReward" )
- {
- if ( item.ItemNum > 0 )
- {
- AddTooltipItemCountfaris(item,0,1);
- }
- }
- }
- ItemSlotWithItemTypeStr = getSlotTypeWithItemTypeString(item);
- if ( ItemSlotWithItemTypeStr != "" )
- {
- Deobfuscated4592.SimpleLineCount = (2 + nSimpleLineCountAdd);
- AddTooltipItemBlank(1);
- AddTooltipColorText(ItemSlotWithItemTypeStr,GetColortool(176,155,121,255),False,True,False,"",40,-17);
- GetTextSize(ItemSlotWithItemTypeStr,textWidth2,textHeight);
- }
- if ( TooltipType != "InventoryList" )
- {
- CompareWithEquipedItem(item);
- }
- if ( item.ClassID == 57 )
- {
- Deobfuscated4592.SimpleLineCount = (3 + nSimpleLineCountAdd);
- AddTooltipText("(" $ ConvertNumToText(string(item.ItemNum)) $ ")", True, True);
- }
- if ( (TooltipType == "InventoryStackableUnitPrice") && !(item.bEquipped) )
- {
- strAdena = string(item.Price);
- strAdenaComma = MakeCostString(strAdena);
- AdenaColor = GetNumericColor(strAdenaComma);
- if ( IsStackableItem(item.ConsumeType) && (item.ItemNum > 1) )
- {
- AddTooltipItemBlank(4);
- AddTooltipColorText((GetSystemString(2511) $ " : "),GetColortool(255,180,0,255),True,True,False);
- AddTooltipText("(" $ ConvertNumToText(string(item.ItemNum)) $ ")", True, True);
- } else {
- AddTooltipItemOptionfaris(322, (strAdenaComma $ " " $ GetSystemString(469)), True, True, False, , , , AdenaColor);
- }
- if ( IsStackableItem(item.ConsumeType) && (item.ItemNum > 1) )
- {
- strAdena = string((item.Price * item.ItemNum));
- strAdenaComma = MakeCostString(strAdena);
- AdenaColor = GetNumericColor(strAdenaComma);
- AddTooltipItemOptionfaris(2595, (strAdenaComma $ " " $ GetSystemString(469)), True, True, False, , , , AdenaColor);
- }
- if ( item.Price > 0 )
- {
- AddTooltipItemOptionfaris(0, ("(" $ ConvertNumToText(strAdena) $ ")"), False, True, False);
- SetTooltipItemColor(AdenaColor.R,AdenaColor.G,AdenaColor.B,0);
- }
- }
- if ( (TooltipType == "InventoryPrice1") && (TooltipType == "InventoryPrice1HideEnchant") || (TooltipType == "InventoryPrice1HideEnchantStackable") || !(item.bEquipped) )
- {
- strAdena = string(item.Price);
- strAdenaComma = MakeCostString(strAdena);
- AdenaColor = GetNumericColor(strAdenaComma);
- AddTooltipItemOptionfaris(322, ("(" $ ConvertNumToText(strAdenaComma) $ " " $ GetSystemString(469) $ ")"), True, True, False);
- Deobfuscated4592.SimpleLineCount = (3 + nSimpleLineCountAdd);
- if ( item.Price > 0 )
- {
- Deobfuscated4592.SimpleLineCount = (4 + nSimpleLineCountAdd);
- AddTooltipItemOptionfaris(0, ("(" $ ConvertNumToText(strAdena) $ ")"), False, True, False);
- SetTooltipItemColor(AdenaColor.R,AdenaColor.G,AdenaColor.B,0);
- }
- }
- if ( (TooltipType == "InventoryPrice2") || (TooltipType == "InventoryPrice2PrivateShop") )
- {
- strAdena = string(item.Price);
- strAdenaComma = MakeCostString(strAdena);
- AdenaColor = GetNumericColor(strAdenaComma);
- AddTooltipItemOption2(322,468,True,True,False);
- SetTooltipItemColor(AdenaColor.R,AdenaColor.G,AdenaColor.B,0);
- AddTooltipColorText((" " $ strAdenaComma $ " " $ GetSystemString(469)), AdenaColor, False, True, , , 4);
- Deobfuscated4592.SimpleLineCount = (3 + nSimpleLineCountAdd);
- if ( item.Price > 0 )
- {
- Deobfuscated4592.SimpleLineCount = (4 + nSimpleLineCountAdd);
- AddTooltipColorText("(",AdenaColor,True,True);
- AddTooltipColorText(GetSystemString(468),AdenaColor,False,True);
- AddTooltipColorText((" " $ ConvertNumToText(strAdena) $ ")"), AdenaColor, False, True);
- }
- }
- if ( TooltipType == "InventoryPrice2PrivateShop" )
- {
- if ( IsStackableItem(item.ConsumeType) && (item.Reserved > 0) )
- {
- AddTooltipItemOptionfaris(808,string(item.Reserved),True,True,False);
- }
- }
- SlotString = "";
- SlotString = GetSlotTypeString(item.ItemType,item.SlotBitType,item.ArmorType);
- switch (EItemType)
- {
- case ITEM_WEAPON:
- bLargeWidth = True;
- if ( item.PhysicalDamage != 0 )
- {
- pAtkValue = GetPhysicalDamage(item.WeaponType,item.SlotBitType,item.CrystalType,item.Enchanted,item.PhysicalDamage);
- pAtkEnchant = ((pAtkValue - item.PhysicalDamage) / 2);
- AddTooltipItemOptionfaris(94,string(item.PhysicalDamage + pAtkEnchant),True,True,False,2,0,getInstanceL2Util().BrightWhite,getInstanceL2Util().ColorYellow);
- AddTooltipItemBonusfaris(item.PhysicalDamage,pAtkEnchant,0,4);
- }
- if ( item.MagicalDamage != 0 )
- {
- mAtkValue = GetMagicalDamage(item.WeaponType,item.SlotBitType,item.CrystalType,item.Enchanted,item.MagicalDamage);
- mAtkEnchant = ((mAtkValue - item.MagicalDamage) / 2);
- AddTooltipItemOptionfaris(98,string(item.MagicalDamage + mAtkEnchant),True,True,False,2,0,getInstanceL2Util().BrightWhite,getInstanceL2Util().ColorYellow);
- AddTooltipItemBonusfaris(item.MagicalDamage,mAtkEnchant,0,4);
- }
- AddTooltipItemOptionfaris(111,GetAttackSpeedString(item.AttackSpeed),True,True,False,2);
- if ( item.ShieldDefense > 0 )
- {
- AddTooltipItemOptionfaris(95,string(item.ShieldDefense),True,True,False,2,0,getInstanceL2Util().BrightWhite,getInstanceL2Util().ColorYellow);
- }
- if ( item.ShieldDefenseRate > 0 )
- {
- AddTooltipItemOptionfaris(317,string(item.ShieldDefenseRate),True,True,False,2);
- }
- if ( item.SoulshotCount > 0 )
- {
- AddTooltipItemOptionfaris(404,"X " $ string(item.SoulshotCount),True,True,False);
- }
- if ( item.SpiritshotCount > 0 )
- {
- AddTooltipItemOptionfaris(496,"X " $ string(item.SpiritshotCount),True,True,False);
- }
- if ( item.Weight == 0 )
- {
- AddTooltipItemOptionfaris(52," 0 ",True,True,False,2);
- } else {
- AddTooltipItemOptionfaris(52,string(item.Weight),True,True,False,2);
- }
- if ( item.MpConsume != 0 )
- {
- AddTooltipItemOptionfaris(320,string(item.MpConsume),True,True,False,2);
- }
- AddTooltipRefinery(item);
- break;
- case ITEM_ARMOR:
- bLargeWidth = True;
- if ( (item.SlotBitType == 256) || (item.SlotBitType == 128) )
- {
- if ( item.ShieldDefense != 0 )
- {
- AddTooltipItemOptionfaris(95,string(GetShieldDefense(item.CrystalType,item.Enchanted,item.ShieldDefense)),True,True,False,2,0,getInstanceL2Util().BrightWhite,getInstanceL2Util().ColorYellow);
- AddTooltipItemBonusfaris(item.ShieldDefense,(GetShieldDefense(item.CrystalType,item.Enchanted,item.ShieldDefense) - item.ShieldDefense),0,4);
- // AddTooltipItemBonusfaris(item.ShieldDefense, item.ShieldDefense - GetShieldDefense(item.CrystalType, item.Enchanted, item.ShieldDefense), 0, 4);
- }
- if ( item.ShieldDefenseRate > 0 )
- {
- AddTooltipItemOptionfaris(317,string(item.ShieldDefenseRate),True,True,False,2,0);
- }
- AddTooltipItemOptionfaris(97,string(item.AvoidModify),True,True,False,2,0);
- AddTooltipItemOptionfaris(52,string(item.Weight),True,True,False,2,0);
- } else {
- if ( IsMagicalArmor(item.ClassID) )
- {
- if ( item.MpBonus > 0 )
- {
- AddTooltipItemOptionfaris(388,string(item.MpBonus),True,True,False,2,0,getInstanceL2Util().BrightWhite,getInstanceL2Util().ColorYellow);
- }
- if ( item.PhysicalDefense != 0 )
- {
- AddTooltipItemOptionfaris(95,string(GetPhysicalDefense(item.CrystalType,item.Enchanted,item.PhysicalDefense)),True,True,False,2,0,getInstanceL2Util().BrightWhite,getInstanceL2Util().ColorYellow);
- AddTooltipItemBonusfaris(item.PhysicalDefense,(GetPhysicalDefense(item.CrystalType,item.Enchanted,item.PhysicalDefense) - item.PhysicalDefense),0,4);
- //AddTooltipItemBonusfaris(item.PhysicalDefense, item.CrystalType - item.Enchanted - item.PhysicalDefense, 0, 4);
- }
- if ( item.Weight != 0 )
- {
- AddTooltipItemOptionfaris(52,string(item.Weight),True,True,False,2,0);
- }
- } else {
- if ( item.PhysicalDefense != 0 )
- {
- AddTooltipItemOptionfaris(95,string(GetPhysicalDefense(item.CrystalType,item.Enchanted,item.PhysicalDefense)),True,True,False,2,0,getInstanceL2Util().BrightWhite,getInstanceL2Util().ColorYellow);
- AddTooltipItemBonusfaris(item.PhysicalDefense,(GetPhysicalDefense(item.CrystalType,item.Enchanted,item.PhysicalDefense) - item.PhysicalDefense),0,4);
- // AddTooltipItemBonusfaris(item.PhysicalDefense, item.CrystalType - item.Enchanted - item.PhysicalDefense, 0, 4);
- }
- if ( item.Weight != 0 )
- {
- AddTooltipItemOptionfaris(52,string(item.Weight),True,True,False,2,0);
- }
- }
- }
- break;
- case ITEM_ACCESSARY:
- bLargeWidth = True;
- if ( (item.SlotBitType != 4194304) && (item.SlotBitType != 1048576) && (item.SlotBitType != 2097152) )
- {
- if ( (GetMagicalDefense(item.CrystalType,item.Enchanted,item.MagicalDefense) > 0) )
- {
- AddTooltipItemOptionfaris(99,string(GetMagicalDefense(item.CrystalType,item.Enchanted,item.MagicalDefense)),True,True,False,0,0,getInstanceL2Util().BrightWhite,getInstanceL2Util().ColorYellow);
- }
- AddTooltipItemBonusfaris(item.MagicalDefense,(GetPhysicalDefense(item.CrystalType,item.Enchanted,item.MagicalDefense) - item.MagicalDefense),0,4);
- // AddTooltipItemBonusfaris(item.MagicalDefense, item.CrystalType - item.Enchanted - item.MagicalDefense, 0, 4);
- }
- if ( item.Weight == 0 )
- {
- AddTooltipItemOptionfaris(52," 0 ",True,True,False);
- } else {
- AddTooltipItemOptionfaris(52,string(item.Weight),True,True,False);
- }
- AddTooltipRefinery(item);
- break;
- case ITEM_ETCITEM:
- bLargeWidth = True;
- if ( EEtcItemType == 7 )
- {
- if ( item.Damaged == 0 )
- {
- nTmp = 971;
- } else {
- nTmp = 970;
- }
- AddTooltipItemOption2(969,nTmp,True,True,False);
- AddTooltipItemOptionfaris(88,string(item.Enchanted),True,True,False);
- } else {
- if ( EEtcItemType == 15 )
- {
- AddTooltipItemOptionfaris(972,string(item.Enchanted),True,True,False);
- } else {
- if ( EEtcItemType == 13 )
- {
- AddTooltipItemOptionfaris(670,string(item.Blessed),True,True,False);
- AddTooltipItemOptionfaris(671,GetLottoString(item.Enchanted,item.Damaged),True,True,False);
- } else {
- if ( EEtcItemType == 14)
- {
- AddTooltipItemOptionfaris(670,string(item.Enchanted),True,True,False);
- AddTooltipItemOptionfaris(671,GetRaceTicketString(item.Blessed),True,True,False);
- AddTooltipItemOptionfaris(744,string(item.Damaged * 100),True,True,False);
- }
- }
- }
- }
- if ( item.Weight == 0 )
- {
- AddTooltipItemOptionfaris(52," 0 ",True,True,False);
- } else {
- if ( item.ItemNum > 1 )
- {
- AddTooltipItemOptionfaris(52,string(item.Weight * item.ItemNum),True,True,False);
- } else {
- AddTooltipItemOptionfaris(52,string(item.Weight),True,True,False);
- }
- }
- break;
- default:
- }
- AddTooltipItemDurability(item);
- addDescTooltip(item);
- addSetitemTooltip(item);
- // addDescTooltipfaris(item);
- // addSetitemTooltipfaris(item);
- // SetTierBar(item,False);
- addAcquireItem(item);
- addTooltipID(item);
- } else {
- return;
- }
- if ( bLargeWidth )
- {
- Deobfuscated4592.MinimumWidth = 250;
- }
- ReturnTooltipInfo(Deobfuscated4592);
- }
- function addSetitemTooltip (ItemInfo item)
- {
- local int idx;
- local string strTmp;
- local int ClassID;
- local int SetID;
- local array<int> arrID;
- local bool bLargeWidth;
- if ( item.ClassID > 0 )
- {
- AddTooltipItemBlank(3);
- idx = 0;
- if ( idx < 3 )
- {
- Class'UIDATA_ITEM'.static.GetSetItemIDList(item.ClassID,idx,arrID);
- SetID = 0;
- if ( SetID < arrID.Length )
- {
- bLargeWidth = True;
- ClassID = arrID[SetID];
- if ( item.ClassID != ClassID )
- {
- strTmp = Class'UIDATA_ITEM'.static.GetItemName(ClassID);
- if ( Len(strTmp) > 0 )
- {
- StartItem();
- Deobfuscated2336.eType = DIT_TEXTURE;
- Deobfuscated2336.nOffSetX = 3;
- Deobfuscated2336.nOffSetY = 4;
- Deobfuscated2336.bLineBreak = True;
- Deobfuscated2336.t_bDrawOneLine = True;
- Deobfuscated2336.u_nTextureWidth = 18;
- Deobfuscated2336.u_nTextureHeight = 18;
- Deobfuscated2336.u_nTextureUWidth = 18;
- Deobfuscated2336.u_nTextureUHeight = 18;
- Deobfuscated2336.u_strTexture = "L2FARIS_CH3.Tooltip.lifeBG";
- EndItem();
- StartItem();
- Deobfuscated2336.eType = DIT_TEXTURE;
- Deobfuscated2336.nOffSetX = -17;
- Deobfuscated2336.nOffSetY = 5;
- Deobfuscated2336.t_bDrawOneLine = True;
- Deobfuscated2336.u_nTextureWidth = 16;
- Deobfuscated2336.u_nTextureHeight = 16;
- Deobfuscated2336.u_nTextureUWidth = 32;
- Deobfuscated2336.u_nTextureUHeight = 32;
- Deobfuscated2336.u_strTexture = Class'UIDATA_ITEM'.static.GetItemTextureName(ClassID);
- EndItem();
- StartItem();
- Deobfuscated2336.eType = DIT_TEXT;
- Deobfuscated2336.nOffSetX = 5;
- Deobfuscated2336.nOffSetY = 6;
- Deobfuscated2336.t_bDrawOneLine = True;
- Deobfuscated2336.t_color.R = 100;
- Deobfuscated2336.t_color.G = 100;
- Deobfuscated2336.t_color.B = 65;
- Deobfuscated2336.t_color.A = 255;
- Deobfuscated2336.t_strText = strTmp;
- ParamAdd(Deobfuscated2336.Condition,"Type","Equip");
- ParamAdd(Deobfuscated2336.Condition,"ServerID",string(item.ServerID));
- ParamAdd(Deobfuscated2336.Condition,"EquipID",string(ClassID));
- ParamAdd(Deobfuscated2336.Condition,"NormalColor","100,100,65");
- ParamAdd(Deobfuscated2336.Condition,"EnableColor","255,250,160");
- EndItem();
- AddTooltipItemBlank(1);
- }
- }
- SetID++;
- }
- strTmp = Class'UIDATA_ITEM'.static.GetSetItemEffectDescription(item.ClassID,idx);
- if ( Len(strTmp) > 0 )
- {
- bLargeWidth = True;
- StartItem();
- Deobfuscated2336.eType = DIT_TEXT;
- Deobfuscated2336.nOffSetX = 5;
- Deobfuscated2336.nOffSetY = 6;
- Deobfuscated2336.bLineBreak = True;
- Deobfuscated2336.t_color.R = 100;
- Deobfuscated2336.t_color.G = 70;
- Deobfuscated2336.t_color.B = 0;
- Deobfuscated2336.t_color.A = 255;
- Deobfuscated2336.t_strText = strTmp;
- ParamAdd(Deobfuscated2336.Condition,"Type","SetEffect");
- ParamAdd(Deobfuscated2336.Condition,"ServerID",string(item.ServerID));
- ParamAdd(Deobfuscated2336.Condition,"ClassID",string(item.ClassID));
- ParamAdd(Deobfuscated2336.Condition,"EffectID",string(idx));
- ParamAdd(Deobfuscated2336.Condition,"NormalColor","100,70,0");
- ParamAdd(Deobfuscated2336.Condition,"EnableColor","255,180,0");
- EndItem();
- AddTooltipItemBlank(2);
- AddCrossLine();
- }
- idx++;
- }
- strTmp = Class'UIDATA_ITEM'.static.GetSetItemEnchantEffectDescription(item.ClassID);
- if ( Len(strTmp) > 0 )
- {
- bLargeWidth = True;
- StartItem();
- Deobfuscated2336.eType = DIT_TEXT;
- Deobfuscated2336.nOffSetX = 5;
- Deobfuscated2336.nOffSetY = 2;
- Deobfuscated2336.bLineBreak = True;
- Deobfuscated2336.t_color.R = 74;
- Deobfuscated2336.t_color.G = 92;
- Deobfuscated2336.t_color.B = 104;
- Deobfuscated2336.t_color.A = 255;
- Deobfuscated2336.t_strText = strTmp;
- ParamAdd(Deobfuscated2336.Condition,"Type","EnchantEffect");
- ParamAdd(Deobfuscated2336.Condition,"ServerID",string(item.ServerID));
- ParamAdd(Deobfuscated2336.Condition,"ClassID",string(item.ClassID));
- ParamAdd(Deobfuscated2336.Condition,"NormalColor","74,92,104");
- ParamAdd(Deobfuscated2336.Condition,"EnableColor","110,140,170");
- EndItem();
- }
- }
- }
- function addDescTooltip(ItemInfo item)
- {
- local string tmp;
- local array<int> arrID;
- Class'UIDATA_ITEM'.static.GetSetItemIDList(item.ClassID, 0, arrID);
- if (arrID[0] > 0)
- {
- AddTooltipItemBlank(4);
- AddTitleIconWithHeadLine("setBG", "Armor Set", "");
- }
- else
- {
- if (Mid(item.Description, 0, 5) == "<Soul")
- {
- AddTooltipItemBlank(4);
- AddTitleIconWithHeadLine("SaBG", "Special Ability: ", item.AdditionalName);
- if (InStr(item.Description, "\n") > 0)
- {
- tmp = Replace(Mid(item.Description, 29), ". I", "\nI");
- }
- else
- {
- tmp = Replace(Mid(item.Description, 27), ". I", "\nI");
- }
- AddTooltipItemBlank(4);
- AddTooltipColorText(tmp, GetColortool(110, 140, 160, 255), True, False);
- }
- else
- {
- if (Len(item.Description) > 1)
- {
- AddCrossLine();
- AddTooltipColorText(item.Description, GetColortool(178, 190, 207, 255), True, False);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement