Jump to content

darkpatow

Members
  • Content Count

    1
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

Community Reputation

0 Neutral

About darkpatow

  • Rank
    New Member
  1. Hi there, i have a script where i summon a random monster, based on an array, and announce who killed it and which monster it was. It's working, it does summon the random monster, but when it announces the killed monster, the "getmonsterinfo" function is returning "null" (O Mini-Chefe null foi MORTO pelo guerreiro [Player Name]) .mvp_mapa$ is the string "pay_dun03" .mvp_quant is an integer to set the number of monsters. set .mvp_mapa$,"pay_dun03"; set .mvp_quant,1; [email protected] is an array of integers with some monters' id: setarray [email protected][0] ,1096 // Angeling ,1388 // ArchAngeling ,1295 // Barão Coruja ,1582 // Deviling ,1093 // Eclipse ,1307 // Gato de Nove Caudas ,1120 // Ghostring ,1200 // Jirtas ,1091 // Libélula ,1296 // Líder Cobold ,1299 // Líder Goblin ,1092 // Lobo Errante ,1090 // Mastering ,1289 // Maya Macho ,1283 // Quimera ,1089 // Sapo-Cururu ,1088 // Vocal ; .idsalamvp is a random integer limited to the array size. set .idsalamvp, rand(getarraysize([email protected][0])); Here's the part that summons and announces when the monster gets killed: monster .mvp_mapa$,0,0,getmonsterinfo([email protected][.idsalamvp],0),[email protected][.idsalamvp],.mvp_quant,"salamb::OnDeadMVP"; end; OnDeadMVP: areaannounce .mvp_mapa$,20,20,280,280, "O Mini-Chefe "+getmonsterinfo([email protected][.idsalamvp],0)+" foi MORTO pel"+(Sex?"o":"a")+" guerreir"+(Sex?"o":"a")+" "+strcharinfo(0)+"!",bc_map; ps: I don't see why it wouldn't work with local variables but it may be relevant to mention that i have a second script just like this one, using global variables and working. I had to use local variables so i have two independent scripts. I tried to find what could be wrong with the script but i didn't manage to fix it. Any help will be appreciated.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.