summaryrefslogblamecommitdiff
path: root/npc/commands/wgm.txt
blob: c99f9cfed829e69156b5663c98d581ae12b550c7 (plain) (tree)
1
2
3
4
5
6
7
8
9

                    
                 
                               
  

                     
            
                                                              

         

                                         





                               
                                     
                                                        

                                      
 


                                                                                           
              

            
                    






                                                                                           
              

            
                    



                                                        
       

                                                        
        
 
// Author: Jesusalva

// @wgm atcommand
// High wizardry, NOT for noobs
//
// group lv: 99
// group char lv: 100
// log: True
// WARNING: DANGEROUS, may explode server, debug testing only.
//
// usage:
//    @callfunc daily_login_bonus_handler
//    @doevent @wgm::OnCall
//

-	script	@wgm	32767,{
    end;

OnCall:
    .@request$ = strcharinfo(0)+": ";
	.@request$ += implode(.@atcmd_parameters$, " ");
    atcommand("@request "+.@request$);
    end;

OnCallFunc:
    if (!$@GM_OVERRIDE) {
        dispbottom col("SEVERE ERROR: COMMAND NOT FOUND. EXECUTING SIMILAR COMMAND...", 1);
        die();
        end;
    }
    .@request$ = "";
	.@request$ += implode(.@atcmd_parameters$, " ");
    callfunc .@request$;
    end;

OnDoEvent:
    if (!$@GM_OVERRIDE) {
        dispbottom col("SEVERE ERROR: COMMAND NOT FOUND. EXECUTING SIMILAR COMMAND...", 1);
        die();
        end;
    }
    .@request$ = "";
	.@request$ += implode(.@atcmd_parameters$, " ");
    doevent .@request$;
    end;

OnInit:
    bindatcmd "callfunc", "@wgm::OnCallFunc", 99, 99, 1;
    bindatcmd "doevent", "@wgm::OnDoEvent", 99, 99, 1;
    end;
}