Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   setlevel 2 clientside to serverside issues (https://forums.graalonline.com/forums/showthread.php?t=134264535)

Tricxta 09-11-2011 11:12 PM

setlevel 2 clientside to serverside issues
 
Hey guys, I tried figuring this out and wasted a few hours on it.

I've also looked at the threads that some people made a few years ago and I wasn't keen to bump them. The examples given either were very non descriptive or had chunks deleted from them.

So how would I go about doing this?

Im using clientside script functions in my code so simply taking out the //#CLIENTSIDE will not work. Can someone please shed some light on this for me?

salesman 09-11-2011 11:14 PM

I don't see a question.

Tricxta 09-11-2011 11:23 PM

how do I trigger setlevel2 which is serverside from clientside?

Sorry I got carried away in explaining why I had to make a new thread :S

fowlplay4 09-11-2011 11:24 PM

Here's a couple.

Level-NPC Example:

PHP Code:

function onCreated() {
  
this.setshape(13232);
}

function 
onActionWarp() {
  
player.setlevel2("level.nw"3030);
}

//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/warp") {
    
triggeraction(this.x+1this.y+1"Warp""");
  }


Weapon-NPC Example:

PHP Code:

function onActionServerSide() {
  if (
params[0] == "warp") {
    
player.setlevel2("level.nw"3030);
  }
}

//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/warp") {
    
triggerserver("gui"this.name"warp");
  }



Tricxta 09-11-2011 11:41 PM

I don't know how I can thank you enough :0 Thank you very much fowlplay :)


All times are GMT +2. The time now is 06:31 PM.

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