Issue information

Issue ID
#6872
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Nov 8, 2012 16:00
Last Post
Hercules Elf Bot
Nov 9, 2012 2:13
Confirmation
N/A

Hercules Elf Bot - Nov 8, 2012 16:00

Originally posted by [b]Dragonstorm[/b]
Hello.

I want to make a npc that is activated only when you break a emperium, my problem is that breaking the Emperium, the killedrid returns no value and therefore the script does not work.

Is there a problem with identifying the emperium killedrid?

[code]- script SistemaRegiones -1,{
end;
OnNPCKillEvent:
getmapxy(@Map$,@Mapx,@Mapy,0);

//============================================
// Al romper un emper
//============================================
if(killedrid == 1288) {
announce ""+strcharinfo(0)+" a roto el emperium.",bc_all,0x9FB6CD;
setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05";
setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05";
setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05";
setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
setarray .@maps$[20],"nguild_alde","nguild_gef","nguild_pay","nguild_prt";
setarray .@maps$[24],"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
setarray .@maps$[24],"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
setarray .@maps$[29],"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05";
for( set .@i, 0; .@i <= 33; set .@i, .@i+1 ) {
// Si rompen el emper ...
if (.@maps$[.@i] == @Map$) {
// Ranking emper char
query_sql("select `breaks` from `woe_pbreaks` where `char_id` = '"+getcharid(0)+"'",@player);
if(@player < 1) {
query_sql("INSERT INTO `woe_pbreaks` (`char_id` ,`name` ,`breaks`) VALUES ('"+getcharid(0)+"', '"+strcharinfo(0)+"', '1');");
} else {
set @player, @player + 1;
query_sql("UPDATE `woe_pbreaks` SET `breaks` = "+@player+" WHERE `char_id` ="+getcharid(0)+";");
}
// Ranking emper guild
query_sql("select `breaks` from `woe_gbreaks` where `guild_id` = '"+getcharid(2)+"'",@guild);
if(@guild < 1) {
query_sql("INSERT INTO `woe_pbreaks` (`guild_id` ,`name` ,`breaks`) VALUES ('"+getcharid(0)+"', '"+strcharinfo(0)+"', '1');");
} else {
set @guild, @guild + 1;
query_sql("UPDATE `woe_pbreaks` SET `breaks` = "+@guild+" WHERE `guild_id` ="+getcharid(2)+";");
}
}
}
}
end;
}[/code]

PD: Only fails with emperium, if I put another mob if it works.

[hr]
Hola.

Quiero hacer un npc que se active solo cuando se rompe un emperium, mi problema es que al romper el emperium, el killedrid no devuelve ningún valor y por lo tanto el script no funciona.

¿Hay algún problema con el killedrid para identificar el emperium?

PD: Solamente falla con el emperium, si pongo otro mob si funciona.

This post has been edited by Dragonstorm on Nov 8, 2012 16:06

Hercules Elf Bot - Nov 9, 2012 2:13

Originally posted by [b]Ind[/b]
mobs with a existent event do not trigger OnNPCKillEvent