View Single Post
  #36  
Old 10-03-2011, 02:47 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
After some thinking, I ain't really going to use this warp menu, but some of you guys might! Here is the code. Better to give than to keep and forget!
PHP Code:
function onActionServerSide() {
  if (
params[0] == "3") {
    
setlevel2("lexia_store1.nw"3142.68);
  }
  if (
params[0] == "1") {
    
setlevel2("lexia_osl.nw"serveroptions.unstickmexserveroptions.unstickmey);
  }
  if (
params[0] == "2") {
    
setlevel2("lexia-lumber.gmap"3030);
  }
}

//#CLIENTSIDE
function onCreated() {
  
this.menu_on false;
  
setTimer(0.05);
  
GraalControlhasfocus();
  
this.selected "MenuText1";
}

function 
onTimeout() {
  if (
this.menu_on == true) {
    
showMenu();
  }
  if (
this.menu_on == false) {
    
hidemenu();
  }
  
setTimer(0.05);
}

function 
ShowMenu() {
  new 
GuiShowImgCtrl("Menu") {
    
0;
    
0;
    
width GraalControl.width;
    
height GraalControl.height;
    
polygon = {
      
00width0widthheight0height
    
};
    
red green blue 0;
    
alpha 0.8;
    new 
GuiShowImgCtrl("MenuText1") {
      
GraalControl.width 2;
      
GraalControl.height 2;
      
text "Warp to OSL";
      
style "b";
      
height 150;
      
zoom 0.75;
      
font "Tempsitc";
      
width 150;
    }
    new 
GuiShowImgCtrl("MenuText2") {
      
GraalControl.width 2;
      
GraalControl.height 20;
      
text "Warp to Lumbering";
      
style "b";
      
height 150;
      
zoom 0.75;
      
font "Tempsitc";
      
width 150;
    }
    new 
GuiShowImgCtrl("MenuText3") {
      
GraalControl.width 2;
      
GraalControl.height 40;
      
text "Warp to Store";
      
style "b";
      
height 150;
      
zoom 0.75;
      
font "Tempsitc";
      
width 150;
    }
    new 
GuiShowImgCtrl("MenuTextArr") {
      
GraalControl.width 10;
      
text ">";
      
style "b";
      
height 150;
      
zoom 0.75;
      
font "Tempsitc";
      
width 15;
    }
  }
}

function 
HideMenu() {
  
Menu.visible false;
}

function 
onKeyPressed(codeKey) {
  if (
Key == "[") {
    
this.menu_on true;
    
Menu.visible true;
  }
  if (
Key == "]") {
    
this.menu_on false;
  }
}

function 
MenuText1.onMouseDown() {
  
triggerserver("gui"this.name"1");
  
MenuText3.alpha 0.7;
  
MenuText1.alpha 1;
  
MenuText2.alpha 0.7;
  
MenuTextArr.GraalControl.height 2;
  
this.selc MenuText1;
}

function 
MenuText2.onMouseDown() {
  
triggerserver("gui"this.name"2");
  
MenuText3.alpha 0.7;
  
MenuText1.alpha 0.7;
  
MenuText2.alpha 1;
  
MenuTextArr.GraalControl.height 20;
  
this.selc MenuText2;
}

function 
MenuText3.onMouseDown() {
  
triggerserver("gui"this.name"3");
  
MenuText3.alpha 1;
  
MenuText1.alpha 0.7;
  
MenuText2.alpha 0.7;
  
MenuTextArr.GraalControl.height 40;
  
this.selc MenuText3;

Attached Thumbnails
Click image for larger version

Name:	selc.PNG
Views:	160
Size:	110.0 KB
ID:	53743  
__________________
Reply With Quote