Jump to content

[duvida]Como obter o rank ou level de um mob através da função mysql_query


Luffy
 Share

Recommended Posts

 @Luffy  podes fazer por mysql, mas não sei de todo se é a forma mais correcta de o fazer.  Eu aconselho-te a fazer isso por quest.

 

Spoiler
Citar

quest get_lvl_npc begin
    state start begin
        when kill with not npc.is_pc() begin
            chat("Acabas-te de matar o bicho feio com o nível: "..npc.get_level().."")
        end
    end
end

 

 

Link to comment
Share on other sites

func......

int npc_get_level(lua_State* L)
    {
        lua_pushnumber(L, CQuestManager::instance().GetCurrentNPCCharacterPtr()->GetLevel());
        return 1;
    }
    
    int npc_get_rank(lua_State* L)
    {
        lua_pushnumber(L, CQuestManager::instance().GetCurrentNPCCharacterPtr()->GetMobRank());
        return 1;
    }
    
    { "get_level",                    npc_get_level},
    { "get_rank",                    npc_get_rank},

quest_functions
npc.get_level()
npc.get_rank()

Link to comment
Share on other sites

6 horas atrás, juniorsilva disse:

func......

 


int npc_get_level(lua_State* L)
    {
        lua_pushnumber(L, CQuestManager::instance().GetCurrentNPCCharacterPtr()->GetLevel());
        return 1;
    }
    
    int npc_get_rank(lua_State* L)
    {
        lua_pushnumber(L, CQuestManager::instance().GetCurrentNPCCharacterPtr()->GetMobRank());
        return 1;
    }
    
    { "get_level",                    npc_get_level},
    { "get_rank",                    npc_get_rank},

 

quest_functions
npc.get_level()
npc.get_rank()

A primeira parte vai no questlib.lua?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...