Jump to content

Nerual

Members
  • Content Count

    5
  • Joined

  • Last visited

Posts posted by Nerual


  1.  

    -    script    gmmenu    -1,{
     
    OnAtGM_Menu:
     
        if (getgmlevel() >= 60) {
     
            .@menu$ = "menu1:menu2";
     
            switch(select(.@menu$)){
     
                case 1:    
                    mes "menu1";
                    close;
     
                case 2:
                    mes "menu2";
                    close;
                }
        }
    end;
    OnInit:
     
        bindatcmd "gmmenu",strnpcinfo(0)+"::OnAtGM_Menu";
        end;
    }
    

    PS: Also had to name the menu "::OnAt(menuname)"

    I never knew ::OnAt was anything could you explain to me exactly what that means or is? I don't see any information on that (searching ::OnAt only shows this post I made) Maybe I'm just bad at searching? Now that I'm paying attention I also see "::On" being used on some other scripts. Sorry to be a pain but id rather not just copy and paste it and say fixed. :) (Also I never knew GM Ocean had a huge scripting guide pinned here... I've been learning via trial and error... and looking at other scripts.+ the Wiki I'll def be reading that. Sorry again thanks for your help. Also to you @evilpuncker thanks! ~getgmlevel is deprecated so I just put getgroupid like my original script seems to work fine either way thanks~


  2. I'm trying to to use bindatcmd to open a menu.. not sure what I'm doing wrong I always get "npc_event: event not found"  error.

    -	script	gmmenu	-1,{
    
    OnInit:
    
    	bindatcmd "gmmenu",strnpcinfo(3)+"::GM_Menu";
    	end;
    
    GM_Menu:
    
    	if (getgroupid() >= 60){
    
    		set .@menu$,"menu1:menu2";
    
    		switch(select(.@menu$)){
    
    			case 1:	
    			    mes "menu1";
    			    close;
    
    			case 2:
    			    mes "menu2";
    			    close;
    			}
    	}
    }
    
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.