killedrid variable don't work with script command monster

luizragna

New member
Messages
114
Points
0
Location
In their hearts
Emulator
Hello guys. When a kill monster with @mosnter the mod id is added to variable killedrid.

But when i kill a monster summoned with script command monster he is not added to killedrid.

monster "pay_dun04",122,123,"[DG] Red Plant",1078,1,strnpcinfo(0)+"::OnBonus";
end;

OnBonus:

mes "Do you killed a monster";

if (killedrid == 1078){
mes "This monster is Red Plant";
close2;
percentheal 15,0;
specialeffect(7, SELF, playerattached());
}
end;


In the above example, the script not enter in if (killedrid == 1078). 

Whats is the problem?? (In the rAthena i not have this problem)

 
In the above example, the script not enter in if (killedrid == 1078). 

Whats is the problem?? (In the rAthena i not have this problem)
ok this need some testing ...

Code:
prontera,155,190,5    script    test    1_F_MARIA,{
    mes "the monster you just killed is ";
    mes getmonsterinfo( killedrid, MOB_NAME );
    select "summon";
    monster "this", -1,-1, "--ja--", 1002,1, strnpcinfo(0)+"::Onaaa";
    mes "monster summoned";
    close;
Onaaa:
    end;
}

rathena -> yup it shows Poring

hercules -> you are right, it shows null

you are right, rathena fixed this

https://github.com/rathena/rathena/pull/1286

 
Last edited by a moderator:
Back
Top