Luffy Posted December 3, 2017 Share Posted December 3, 2017 Pessoal eu tava tentando conseguir o hp maximo de um mob através do mysql.query, mas parece não funcionar o código é esse logo abaixo Alguém pode me ajudar? Spoiler quest testmaxhpmob begin state start begin when kill with not npc.is_pc() begin local hp = mysql.query("SELECT max_hp FROM player.mob_proto WHERE vnum ='"..npc.get_race().."' LIMIT 1;") chat(""..hp.."') end end end Link to comment Share on other sites More sharing options...
juniorsilva Posted December 3, 2017 Share Posted December 3, 2017 (edited) Não seria mais fácil assim? Vá em questlua_npc.cpp e adicione abaixo da função: int npc_set_vid_damage_mul(lua_State* L) Hidden Content Give reaction to this post to see the hidden content. depois vá em void RegisterNPCFunctionTable() e adicione isso : Hidden Content Give reaction to this post to see the hidden content. abaixo da definição: {"set_vid_damage_mul", npc_set_vid_damage_mul}, Mini quest com a nova função npc.get_max_hp() : Hidden Content Give reaction to this post to see the hidden content. Edited December 3, 2017 by juniorsilva Link to comment Share on other sites More sharing options...
znyR Posted December 3, 2017 Share Posted December 3, 2017 10 horas atrás, juniorsilva disse: Não seria mais fácil assim? Vá em questlua_npc.cpp e adicione abaixo da função: int npc_set_vid_damage_mul(lua_State* L) Hidden Content Give reaction to this post to see the hidden content. depois vá em void RegisterNPCFunctionTable() e adicione isso : Hidden Content Give reaction to this post to see the hidden content. abaixo da definição: {"set_vid_damage_mul", npc_set_vid_damage_mul}, Mini quest com a nova função npc.get_max_hp() : Hidden Content Give reaction to this post to see the hidden content. Tudo dito aqui, bom trabalho. Link to comment Share on other sites More sharing options...
Luffy Posted December 4, 2017 Author Share Posted December 4, 2017 21 horas atrás, juniorsilva disse: Não seria mais fácil assim? Vá em questlua_npc.cpp e adicione abaixo da função: int npc_set_vid_damage_mul(lua_State* L) Hidden Content Give reaction to this post to see the hidden content. depois vá em void RegisterNPCFunctionTable() e adicione isso : Hidden Content Give reaction to this post to see the hidden content. abaixo da definição: {"set_vid_damage_mul", npc_set_vid_damage_mul}, Mini quest com a nova função npc.get_max_hp() : Hidden Content Give reaction to this post to see the hidden content. Muito Obrigado, Junior! Eu até tentei criar algumas funções, mas ainda não compreendo a "lógica" da source do metin Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now