kleinerMann
Member
- Joined
- May 27, 2013
- Messages
- 64
Hi AknA,
your plugin didnt work for german wow cause you use the english names of empty containers hardcoded in your script
e.g. "Empty Redbelly Mandarin Container"
why dont you use the API-Function GetItemInfo(itemID) ?
and later
for every container.
this should work now with every client.
Greets
kleinerMann
(sorry for bad english)
your plugin didnt work for german wow cause you use the english names of empty containers hardcoded in your script
e.g. "Empty Redbelly Mandarin Container"
why dont you use the API-Function GetItemInfo(itemID) ?
Code:
#region MerchantBuy
private static void MerchantBuy(int a, int b) {
if (b > 20) { b = 20; }
itemID)
string itemName = Lua.GetReturnVal<string>("itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(" + a + "); return itemName", 0);
Lua.DoString("for i=1, GetMerchantNumItems() do local l=GetMerchantItemLink(i) if l then if l:find(\"" + itemName + "\") then BuyMerchantItem(i, " + b + ")end end end");
ShopTimer.Restart();
}
#endregion
and later
Code:
if (UpdateShoppingList(74856) >= 20) { // Jade Lungfish
var a = BagCount(UpdateShoppingList(74856), UpdateShoppingList(87678), 20);
if (!_buying && (a > 0)) {
_buying = true;
MerchantBuy(87678, a);
}
}
this should work now with every client.
Greets
kleinerMann
(sorry for bad english)