mam dość dziwny problem z potionami u mnie na serwerze. Problem polega na tym, że gdy mam na przykład plecak potionów po 100 użyć. Wyświetla mi się komunikat
18:45 Using one of 98 health potions...
http://ots.tibiaserver.pl/tibiaserver.gif
Ostatnio zmieniony przez Grim90 : 06-09-2010, 13:45
Piszę skrypty do OTS. Chcesz mieć unikalny quest, lub skrypt na swoim serwerze? Pisz do mnie. Na pewno się dogadamy.
Piszę skrypty PHP, strony oraz gotowe serwisy, jeśli jesteś zainteresowany, napisz.
http://radeg.pl
Masz facebooka? Zapraszamy do grupy: Grim OTS!
http://www.facebook.com/?ref=logo#!/...07707075989449
int32_t LuaScriptInterface::luaGetPlayerItemCount(lua_State* L)
{
//getPlayerItemCount(cid, itemid[, subType = -1])
int32_t subType = -1;
if(lua_gettop(L) > 2)
subType = popNumber(L);
uint32_t itemId = popNumber(L);
ScriptEnviroment* env = getEnv();
if(const Player* player = env->getPlayerByUID(popNumber(L)))
lua_pushnumber(L, player->__getItemTypeCount(itemId, subType));
else
{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
}
return 1;
}
void Game::showHotkeyUseMessage(Player* player, Item* item)
{
int32_t subType = -1;
if(item->hasSubType() && !item->hasCharges())
subType = item->getSubType();
const ItemType& it = Item::items[item->getID()];
uint32_t count = player->__getItemTypeCount(item->getID(), subType, false);
char buffer[40 + it.name.size()];
if(count == 1)
sprintf(buffer, "Using the last %s...", it.name.c_str());
else
sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str());
player->sendTextMessage(MSG_INFO_DESCR, buffer);
}
Ostatnio zmieniony przez GM Esio : 08-09-2010, 19:05
http://ots.tibiaserver.pl/tibiaserver.gif
http://ots.tibiaserver.pl/tibiaserver.gif
http://ots.tibiaserver.pl/tibiaserver.gif
http://ots.tibiaserver.pl/tibiaserver.gif
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki