Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Zooming (https://forums.graalonline.com/forums/showthread.php?t=134265035)

Emera 11-14-2011 12:22 AM

Zooming
 
1 Attachment(s)
So I was wondering, since I have seen it done on Era iPhone, is there any way to accomplish this (attached) using GS2? Or is it just another special iPhone code.

Astram 11-14-2011 01:19 AM

PHP Code:

/*
Script for Emera by Astram
Note: Same formula can apply for stealth using player.alpha
Saying /big will toggle the zoom for everyone, and when someone logs on the server
they will be updated to see big people
*/

function onActionServerSide() {
  
this.canuse = {"Manager""Owner""Co-Owner"};
  if (
params[0] == "ZoomCheck") {
    for (
temp.allplayers) {
      if (
p.zoom == 2) {
        
triggerclient"gui"this.name"Zoom"2p);
      }
    }
  }
  if (
params[0] == "Zoom" && player.guild in this.canuse) {
    if (
params[1] == "Big") {
      for (
temp.allplayers) {
        
p.triggerclient"gui"this.name"Zoom"2player);
      }
    }
    if (
params[1] == "Normal") {
      for (
temp.allplayers) {
        
p.triggerclient"gui"this.name"Zoom"1player);
      }
    }
  }
}

//#CLIENTSIDE
function onCreated() {
  
triggerserver"gui"this.name"ZoomCheck");
}

function 
onPlayerChats() {
  if (
player.chat == "/big") {
    if (
player.zoom != 2) {
      
triggerserver"gui"this.name"Zoom""Big");
    } else {
      
triggerserver"gui"this.name"Zoom""Normal");
    }
  }
}

function 
onActionClientSide() {
  if (
params[0] == "Zoom") {
    
findplayer(params[2]).zoom params[1];
  }



0PiX0 11-14-2011 01:20 AM

Use a gani that changes this.zoom in a ganiscript

Astram 11-14-2011 01:23 AM

Quote:

Originally Posted by 0PiX0 (Post 1674134)
Use a gani that changes this.zoom in a ganiscript

Or this...

cbk1994 11-14-2011 01:26 AM

Astram, do your guild check on serverside, not clientside.

Astram 11-14-2011 01:26 AM

1 Attachment(s)
Im not too familar with how ganiscript works but, this may work. This is my first time using gani script. Heres it's code:
PHP Code:

SCRIPT
function onCreated() {
  
player.zoom 2;
}
SCRIPTEND 

Too simple??

DustyPorViva 11-14-2011 01:35 AM

He wants to zoom everything, not just the the player, though.

0PiX0 11-14-2011 01:53 AM

If he wants to zoom everything: player.zoomfactor

DustyPorViva 11-14-2011 01:58 AM

Quote:

Originally Posted by 0PiX0 (Post 1674143)
If he wants to zoom everything: player.zoomfactor

Does this go under 1?

0PiX0 11-14-2011 02:01 AM

Under 1 it has no effect.

DustyPorViva 11-14-2011 02:29 AM

Quote:

Originally Posted by 0PiX0 (Post 1674147)
Under 1 it has no effect.

:(

cbk1994 11-14-2011 03:03 AM

Quote:

Originally Posted by DustyPorViva (Post 1674148)
:(

Don't worry, I heard that flying technology is going to be released by Christmas.

DustyPorViva 11-14-2011 03:12 AM

Quote:

Originally Posted by cbk1994 (Post 1674149)
Don't worry, I heard that flying technology is going to be released by Christmas.

I don't even want flying technology lol, but for the iPhone with such limited resolution it'd be nice to be able to zoom out if needed(since you're not seeing a good 1/10th of what's capable of being rendered(3x3 levels).

Tricxta 11-14-2011 03:52 AM

Quote:

Originally Posted by cbk1994 (Post 1674149)
Don't worry, I heard that flying technology is going to be released by Christmas.

Finally! :cool:

ffcmike 11-14-2011 06:21 PM

Quote:

Originally Posted by Tricxta (Post 1674152)
Finally! :cool:

He didn't say which Christmas.

Emera 11-14-2011 06:22 PM

Quote:

Originally Posted by Astram (Post 1674133)
PHP Code:

/*
Script for Emera by Astram
Note: Same formula can apply for stealth using player.alpha
Saying /big will toggle the zoom for everyone, and when someone logs on the server
they will be updated to see big people
*/

function onActionServerSide() {
  
this.canuse = {"Manager""Owner""Co-Owner"};
  if (
params[0] == "ZoomCheck") {
    for (
temp.allplayers) {
      if (
p.zoom == 2) {
        
triggerclient"gui"this.name"Zoom"2p);
      }
    }
  }
  if (
params[0] == "Zoom" && player.guild in this.canuse) {
    if (
params[1] == "Big") {
      for (
temp.allplayers) {
        
p.triggerclient"gui"this.name"Zoom"2player);
      }
    }
    if (
params[1] == "Normal") {
      for (
temp.allplayers) {
        
p.triggerclient"gui"this.name"Zoom"1player);
      }
    }
  }
}

//#CLIENTSIDE
function onCreated() {
  
triggerserver"gui"this.name"ZoomCheck");
}

function 
onPlayerChats() {
  if (
player.chat == "/big") {
    if (
player.zoom != 2) {
      
triggerserver"gui"this.name"Zoom""Big");
    } else {
      
triggerserver"gui"this.name"Zoom""Normal");
    }
  }
}

function 
onActionClientSide() {
  if (
params[0] == "Zoom") {
    
findplayer(params[2]).zoom params[1];
  }



Wanting to zoom everything (like in the picture)


All times are GMT +2. The time now is 09:23 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.