Neelke
Senior Member
Posts: 668
Threads: 82
Joined: Apr 2013
Reputation:
26
|
RE: Thaler
I have to admit though, Flawless example is alot better than the one in Killings in Altstadt. I just took a look at what it looks like in their script:
void CheckCoins(string &in asTimer)
{
if (GetGlobalVarInt("Coins") == 0)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
}
else if (GetGlobalVarInt("Coins") == 10)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_10", "Coin_10.ent");
}
else if (GetGlobalVarInt("Coins") == 20)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_20", "Coin_20.ent");
}
else if (GetGlobalVarInt("Coins") == 30)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_30", "Coin_30.ent");
}
else if (GetGlobalVarInt("Coins") == 40)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_40", "Coin_40.ent");
}
else if (GetGlobalVarInt("Coins") == 50)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_50", "Coin_50.ent");
}
else if (GetGlobalVarInt("Coins") == 60)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_60", "Coin_60.ent");
}
else if (GetGlobalVarInt("Coins") == 70)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_70", "Coin_70.ent");
}
else if (GetGlobalVarInt("Coins") == 80)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_80", "Coin_80.ent");
}
else if (GetGlobalVarInt("Coins") == 90)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_90", "Coin_90.ent");
}
else if (GetGlobalVarInt("Coins") == 100)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_100", "Coin_100.ent");
}
else if (GetGlobalVarInt("Coins") == 110)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_110", "Coin_110.ent");
}
else if (GetGlobalVarInt("Coins") == 120)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_120", "Coin_120.ent");
}
else if (GetGlobalVarInt("Coins") == 130)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_130", "Coin_130.ent");
}
else if (GetGlobalVarInt("Coins") == 140)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_140", "Coin_140.ent");
}
else if (GetGlobalVarInt("Coins") == 150)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_150", "Coin_150.ent");
}
else if (GetGlobalVarInt("Coins") == 160)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_160", "Coin_160.ent");
}
else if (GetGlobalVarInt("Coins") == 170)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_170", "Coin_170.ent");
}
else if (GetGlobalVarInt("Coins") == 180)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_180", "Coin_180.ent");
}
else if (GetGlobalVarInt("Coins") == 190)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_190", "Coin_190.ent");
}
else if (GetGlobalVarInt("Coins") == 200)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_200", "Coin_200.ent");
}
else if (GetGlobalVarInt("Coins") == 210)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_210", "Coin_210.ent");
}
else if (GetGlobalVarInt("Coins") == 220)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_220", "Coin_220.ent");
}
else if (GetGlobalVarInt("Coins") == 230)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_230", "Coin_230.ent");
}
else if (GetGlobalVarInt("Coins") == 240)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_240", "Coin_240.ent");
}
else if (GetGlobalVarInt("Coins") == 250)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_250", "Coin_250.ent");
}
else if (GetGlobalVarInt("Coins") == 260)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_260", "Coin_260.ent");
}
else if (GetGlobalVarInt("Coins") == 270)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_270", "Coin_270.ent");
}
else if (GetGlobalVarInt("Coins") == 280)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_280", "Coin_280.ent");
}
else if (GetGlobalVarInt("Coins") == 290)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_290", "Coin_290.ent");
}
else if (GetGlobalVarInt("Coins") == 300)
{
RemoveItem("Coin_10");
RemoveItem("Coin_20");
RemoveItem("Coin_30");
RemoveItem("Coin_40");
RemoveItem("Coin_50");
RemoveItem("Coin_60");
RemoveItem("Coin_70");
RemoveItem("Coin_80");
RemoveItem("Coin_90");
RemoveItem("Coin_100");
RemoveItem("Coin_110");
RemoveItem("Coin_120");
RemoveItem("Coin_130");
RemoveItem("Coin_140");
RemoveItem("Coin_150");
RemoveItem("Coin_160");
RemoveItem("Coin_170");
RemoveItem("Coin_180");
RemoveItem("Coin_190");
RemoveItem("Coin_200");
RemoveItem("Coin_210");
RemoveItem("Coin_220");
RemoveItem("Coin_230");
RemoveItem("Coin_240");
RemoveItem("Coin_250");
RemoveItem("Coin_260");
RemoveItem("Coin_270");
RemoveItem("Coin_280");
RemoveItem("Coin_290");
RemoveItem("Coin_300");
GiveItemFromFile("Coin_300", "Coin_300.ent");
}
AddTimer("Recheck", 0.1f, "CheckCoins");
}
Derp.
|
|
02-17-2015, 01:04 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: Thaler
As I thought ^_^
it requires a lot of items, and if your money count exceeds the amount of items, you'll have to add more...
Trying is the first step to success.
|
|
02-17-2015, 02:11 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Thaler
I know its not your mod Neelke, but that is ridiculously inefficient coding.
I could be wrong, but something like this would could work too.
//This is untested
void CheckCoins(string &in asTimer) { RemoveItem("Coin_*"); //This is the only thing I worry about. Whether wildcard (*) can be used in Inventory. GiveItemFromFile("Coin_"+GetGlobalVarInt("Coins"), "Coin_"+GetGlobalVarInt("Coins")+".ent"); AddTimer("Recheck", 0.1f, "CheckCoins"); }
Edit: Another way to do it, using psuedocode as a reference:
BEGIN
For int = 0 to 300 step 10
RemoveItem("coin_"+int)
Next
GiveItem("coin_"+coin_count, "coin_"+coin_count+".ent")
REPEAT
Edit 2: Both methods can actually be done without a Timer, for even MORE efficiency! The value changes twice. When you get coins, or when you lose coins. Thus, when you pick up a Thaler thingy, call the code. When you lose thalers, like when you open a box that needs them, call the code. That way, it changes when appropriate and executes the normal amount of times to avoid a constant 0.1 second timer.
Discord: Romulator#0001
(This post was last modified: 02-17-2015, 05:11 PM by Romulator.)
|
|
02-17-2015, 02:16 PM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: Thaler
Yep.
And removing the coins should not be a problem. A simple for loop, like you did should do the trick.
Trying is the first step to success.
|
|
02-17-2015, 03:01 PM |
|
|