joaomariajs

Membro
  • Total de itens

    4
  • Registro em

  • Última visita

Reputação

0 Iniciante

1 Seguidor

Sobre joaomariajs

Últimos Visitantes

83 visualizações
  1. AI GALERA ESTOU COM UM PEQUENO PROBLEMINHA, SERÁ QUE VCS PODERIA MIM AJUDAR? AONDE EUE COLOCO ESSE DIFF??? src/map/clif.c | 3 +++ src/map/npc.c | 5 +++++ src/map/npc.h | 2 ++ src/map/pc.c | 2 ++ 4 files changed, 12 insertions(+) diff --git a/src/map/clif.c b/src/map/clif.c index 1749bdd..f717d55 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -15452,6 +15452,9 @@ void clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) { } WFIFOW(fd,2) = offset+c*11; WFIFOSET(fd,WFIFOW(fd,2)); + + // [SoulBlaker]: Open Shop Script Event + npc->script_event(sd, NPCE_OPENSHOP); } /// Cashshop Buy Ack (ZC_PC_CASH_POINT_UPDATE). diff --git a/src/map/npc.c b/src/map/npc.c index 731cd56..d2be162 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1313,6 +1313,9 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type) { clif->selllist(sd); } + // [SoulBlaker]: Open Shop Script Event + npc->script_event(sd, NPCE_OPENSHOP); + return 0; } @@ -4247,6 +4250,8 @@ void npc_read_event_script(void) {"Die Event",script->config.die_event_name}, {"Kill PC Event",script->config.kill_pc_event_name}, {"Kill NPC Event",script->config.kill_mob_event_name}, + {"NPC Pay Zeny Event","OnPayZenyEvent"}, ++ {"NPC Open Shop Event","OnOpenShopEvent"}, }; for (i = 0; i < NPCE_MAX; i++) diff --git a/src/map/npc.h b/src/map/npc.h index 1dcb840..b098da6 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -162,6 +162,8 @@ enum npce_event { NPCE_DIE, NPCE_KILLPC, NPCE_KILLNPC, + NPCE_PAYZENY, + NPCE_OPENSHOP, NPCE_MAX }; diff --git a/src/map/pc.c b/src/map/pc.c index 6adf057..16c4c47 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3768,6 +3768,7 @@ int pc_payzeny(struct map_session_data *sd,int zeny, enum e_log_pick_type type, if( sd->status.zeny < zeny ) return 1; //Not enough. + pc_setaccountreg(sd, script->add_str("PAYACHIEVEMENT"), zeny); sd->status.zeny -= zeny; clif->updatestatus(sd,SP_ZENY); @@ -3779,6 +3780,7 @@ int pc_payzeny(struct map_session_data *sd,int zeny, enum e_log_pick_type type, clif_disp_onlyself(sd,output,strlen(output)); } + npc->script_event(sd, NPCE_PAYZENY); return 0; } /*========================================== AJUDA POR FAVOR