summaryrefslogblamecommitdiff
path: root/npc/functions/global_event_handler.txt
blob: 460694f358422d73fa6402228bcf7d926b225afa (plain) (tree)
1
2
3
4
5
 
                                          

        
               









                                                                      

        

                                                                              

        

                         

        





                                                                       

        


                                          
        
 
-	script	#GlobalHandler	NPC32767,{
    end;

OnPCLoginEvent:
    debugmes "PCLOGIN";
    @login_event = 1;
    //callfunc "fixHeadStyles"; // convert headstyles
    //callfunc "ClearVariables"; // removes / converts old variables
    callfunc "DisplayMOTD"; // send the motd to the client, if enabled
    //callfunc "getBroadcast"; // get the scheduled broadcast, if any
    //addtimer 0, "Magic Timer::OnLogin"; // prevent cast rate abuse
    // add more here
    @login_event = 2;
    debugmes "PCLOGIN OK";
    end;

OnPCKillEvent:
    callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things
    end;

OnMobKillEvent:
    callfunc "MobPoints";
    end;

OnPCDieEvent:
    callfunc "fightclub_GoBack"; // this used by the battle master
    //callfunc "fightclub_event_die"; // this is used by the 1v1 arena
    @necromancer = 0;
    //addtimer 0, "Magic Timer::OnClear"; // reset magic block on death
    set @killerrid, 0; // reset killer rid
    end;

OnInit:
    callfunc "ClearGlobalVars";
    callfunc "MOTD"; // set the MOTD array
    end;
}