kaiquegames069 Posted September 29, 2017 at 03:25 PM Share Posted September 29, 2017 at 03:25 PM when 691.kill or 792.kill or 1091.kill or 1304.kill or 1901.kill or 2091.kill or 2191.kill or 2206.kill begin notice_all("[Sistema]: "..pc.get_name().." Derrotou ") end Eu gostaria de saber se no anúncio dessa quest notice_all, teria como puxar o nome do monstro pelo id dele pra não ter que criar diversas linhas de notice_all! Link to comment
[Admin] tierrilopes Posted September 29, 2017 at 03:39 PM Share Posted September 29, 2017 at 03:39 PM Ve se tens esta função em questlua_global.cpp: _mob_name Link to comment
kaiquegames069 Posted September 29, 2017 at 03:45 PM Author Share Posted September 29, 2017 at 03:45 PM 5 minutes ago, Tierri Lopes said: Ve se tens esta função em questlua_global.cpp: _mob_name Tem sim. Link to comment
[Admin] tierrilopes Posted September 29, 2017 at 04:19 PM Share Posted September 29, 2017 at 04:19 PM Não testei: quest kill_notice begin state start begin when kill begin local killed_mob = npc.get_vnum0() local notice_mobs = {691,792,1091,1304,1901,2091,2191,2206} if table_is_in(notice_mobs, killed_mob) then notice_all("[Sistema]: "..pc.get_name().." Derrotou " ..npc.get_name0(killed_mob)) return end end end end Link to comment
kaiquegames069 Posted September 29, 2017 at 04:32 PM Author Share Posted September 29, 2017 at 04:32 PM 13 minutes ago, Tierri Lopes said: Não testei: quest kill_notice begin state start begin when npc.kill begin local killed_mob = npc.get_vnum0() if killed_mob == 691 or 792 or 1091 or 1304 or 1901 or 2091 or 2191 or 2206 then notice_all("[Sistema]: "..pc.get_name().." Derrotou " ..npc.get_name0(killed_mob)) return end end end end A quest compila normalmente, sendo que não aparece a mensagem de anúncio quando mato o boss! Link to comment
Mário. Posted September 29, 2017 at 07:56 PM Share Posted September 29, 2017 at 07:56 PM when kaiquegames069 state start begin when kill with not npc.is_pc() begin local monstros = { [691] = "o Chefe Orc", [792] = "o Líder Negro Elite", [1091] = "o Rei Demónio", [1304] = "o Tigre Fantasma", [1901] = "o Nove Caudas", [2091] = "a Rainha Aranha", [2191] = "a Tartaruga Gigante", [2206] = "o Rei Chama", } notice_all("[Sistema]: O jogador "pc.get_name().." derrotou "..monstros[npc.get_race()][1]..".") end end end Link to comment
kaiquegames069 Posted September 29, 2017 at 09:10 PM Author Share Posted September 29, 2017 at 09:10 PM 1 hour ago, Mário. said: when kaiquegames069 state start begin when kill with not npc.is_pc() begin local monstros = { [691] = "o Chefe Orc", [792] = "o Líder Negro Elite", [1091] = "o Rei Demónio", [1304] = "o Tigre Fantasma", [1901] = "o Nove Caudas", [2091] = "a Rainha Aranha", [2191] = "a Tartaruga Gigante", [2206] = "o Rei Chama", } notice_all("[Sistema]: O jogador "pc.get_name().." derrotou "..monstros[npc.get_race()][1]..".") end end end Olha o erro que está a dar! Link to comment
juniorsilva Posted September 30, 2017 at 12:32 AM Share Posted September 30, 2017 at 12:32 AM simplificando.... quest monster begin state start begin when 691.kill or 792.kill or 1091.kill or 1304.kill or 1901.kill or 2091.kill or 2191.kill or 2206.kill begin notice_all("[Sistema]: "..pc.get_name().." Derrotou "..mob_name(npc.get_race())) end end end Link to comment
kaiquegames069 Posted September 30, 2017 at 01:29 AM Author Share Posted September 30, 2017 at 01:29 AM 56 minutes ago, juniorsilva said: simplificando.... quest monster begin state start begin when 691.kill or 792.kill or 1091.kill or 1304.kill or 1901.kill or 2091.kill or 2191.kill or 2206.kill begin notice_all("[Sistema]: "..pc.get_name().." Derrotou "..mob_name(npc.get_race())) end end end Obrigado! Link to comment
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