Jump to content

Denis

Banned
  • Posts

    1031
  • Joined

  • Last visited

  • Days Won

    53
  • Feedback

    0%

Everything posted by Denis

  1. Usually it's the variable APP_TITLE at locale/localeInfo
  2. CHARACTER::UseArrow this is what you're looking for.
  3. int guild_get_gold(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if(ch && ch->GetGuild()) { CGuild * pkGuild = CGuildManager::instance().FindGuild(ch->GetGuild()->GetID()); if(pkGuild) lua_pushnumber(L, pkGuild ? pkGuild->GetGuildMoney() : 0); } return 1; } int guild_change_money(lua_State * L) { int gold = (int)lua_tonumber(L, 1); LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if(ch && ch->GetGuild()) { CGuild * pkGuild = CGuildManager::instance().FindGuild(ch->GetGuild()->GetID()); if(pkGuild && gold > 0) pkGuild->RecvMoneyChange(gold); } return 1; } With these you don't need to pass any arguments so just call them like that: when 20091.click with pc.has_guild() begin local s = select("Get guild gold","Change guild gold","Exit") if s == 1 then say(string.format("Your guild gold: %s",guild.get_gold())) end else if s == 2 then say("Enter your amount") local gold = input("") if type(gold) == "number" then guild.change_gold(gold) say_reward(string.format("Your new guild gold ammount is: %s",guild.get_gold())) else say_reward("Only numbers are allowed") end end end I didn't really test these functions but I guess they should work.
  4. No, by default g_iPlayerCacheFlushSeconds is setted to 7 minutes at Main.cpp
  5. You can just check if the npc is valid or not, for example: DWORD npcVNUM = npc->GetRaceNum(); if(!FN_check_valid_npc(npcVNUM)) return;
  6. The current time for player cache is 7 minutes(420 seconds), but you can change it by writing PLAYER_CACHE_FLUSH_SECONDS = seconds at your conf.txt at db folder. But like Alina said you shouldn't mess up with the cache.
  7. I changed quest and the pet still disappearing when I die, someone call tell me what is wrong? I already take off the system to see if was working before, but happends the same... Actually, the pet system is working with that way.If you want to remove that open PetSystem.cpp and remove this: m_pkOwner->IsDead() ||
  8. self.TitleName.SetText(localeInfo.EXCHANGE_TITLE % (exchange.GetNameFromTarget(), int(exchange.GetLevelFromTarget())))
  9. local items = { {50615, 1},{50616, 1},{50617, 1},{31062, 1},{27993, 4},{27992, 4},{27994, 4}, {53022, 1},{71018, 1},{71019, 1},{71020, 1},{30183, 1},{30319, 1},{72703, 1}, {72704, 1},{72706, 1},{72705, 1},{71035, 1},{71102, 5},{27874, 5} } local entry = math.random(1,table.getn(items)) pc.give_item2(items[entry][1],items[entry][2]) I didn't understood very well what you wrote so I guess that's what you want.
  10. We don't support leaked files. Closed.
  11. //currently hp int npc_get_hp(lua_State * L) { DWORD vid = (DWORD) lua_tonumber(L, 1); LPCHARACTER npc = CHARACTER_MANAGER::instance().Find(vid); lua_pushnumber(L, npc->GetHP()); } //maximum hp int npc_get_max_hp(lua_State * L) { DWORD vid = (DWORD) lua_tonumber(L, 1); LPCHARACTER npc = CHARACTER_MANAGER::instance().Find(vid); lua_pushnumber(L, npc->GetMaxHP()); }
  12. //currently hp int npc_get_hp(lua_State * L) { CQuestManager& q = CQuestManager::instance(); LPCHARACTER npc = q.GetCurrentNPCCharacterPtr(); lua_pushnumber(L, npc->GetHP()); } //maximum hp int npc_get_max_hp(lua_State * L) { CQuestManager& q = CQuestManager::instance(); LPCHARACTER npc = q.GetCurrentNPCCharacterPtr(); lua_pushnumber(L, npc->GetMaxHP()); }
  13. You should edit the field bLevelLimit from player.skill_proto and skilltable.txt too.
  14. CQuestManager& q = CQuestManager::instance(); LPCHARACTER npc = q.GetCurrentNPCCharacterPtr(); lua_pushnumber(L, npc->GetLevel()); return 1;
  15. Because you requested a developer rank and you didn't get it don't flame at admins. We're not a 24h slaves to check every second if the topic is at the right section, we have personal life too.
  16. if (!NewPlayerTable2(&player_create_packet.player_table, pinfo->name, pinfo->job, pinfo->shape, d->GetEmpire())) to if (!NewPlayerTable2(&player_create_packet.player_table, pinfo->name, pinfo->job, pinfo->shape, (pinfo->job == 8 ? 4 : d->GetEmpire()))) at file input_login.cpp and the only thing you need to do is to add the new coords to start_position without creating extra functions like @Tasho did.
  17. Include stdio.h at your SIM.h and try again.
  18. You only changed python22 to python27? Or you made more changes?
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.