Graal Forums

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

Thrashsoul3 06-10-2005 04:49 PM

Problem
 
Well Ive been working on a new quest for babylon, but for some odd reason,
I cant get this to work.

PHP Code:

// Graal2002 NPC by Stefan Knorr
//#CLIENTSIDE
if (created){
  
// Initialize the attributes
  
showcharacter;
  
setcharprop #3,head19.png;
  
setcharprop #C0,orange;
  
setcharprop #C1,gray;
  
setcharprop #C2,gray;
  
setcharprop #C3,brown;
  
setcharprop #C4,black;
  
setcharprop #2,noshield.gif;
  
shieldpower 1;
  
dir 2;
}
if (
playertouchsme && strtofloat(#s(clientr.ucquest)) == 2){

  
say2 Hmm.... I wonder how #b
  
the curator found out about #b
  
thatAnyways he told the #b
  
story to you wrong, as the #b
  
Captain was throwing it Joe #b
  
jumped into the water and #b
  
dived for itI'd don't know #b
  
why he did it but he probably #b
  
brought it to his house north #b
  
of here.;
  
triggeraction 0,0,serverside,-System/System,conquest,3;


Then the part in the system npc.
PHP Code:

 if (action == "conquest"clientr.ucquest params[1]; 


Rick 06-10-2005 05:09 PM

HTML Code:

if (actionserverside) {
}

Is what you want.

Or, if you are using GScript2 (which it looks like you may... from that params[]).
HTML Code:

function onActionServerSide()
{
}

It also may be a better idea to do the triggeraction before the say2, as say2 probably is blocking (eg; the triggeraction does not occur until after the player has read the entire message and closed it).

Thrashsoul3 06-10-2005 05:36 PM

PHP Code:

function onActionserverside(action) {
  if (
action == "conquest"clientr.ucquest params[1];


that was already in the code above it, I got the same thing working on a different npc but it wont work on this one.

xAndrewx 06-10-2005 06:25 PM

Why is the character clientside? It's only serverside. :O

Thrashsoul3 06-10-2005 06:51 PM

Nevermind nothing was wrong gmap just needed updating ROFL

Ajira 06-10-2005 09:38 PM

Quote:

Originally Posted by xAndrewx
Why is the character clientside? It's only serverside. :O

What?

xAndrewx 06-11-2005 09:29 AM

//#CLIENTSIDE
if (created){
// Initialize the attributes
showcharacter;
setcharprop #3,head19.png;
setcharprop #C0,orange;
setcharprop #C1,gray;
setcharprop #C2,gray;
setcharprop #C3,brown;
setcharprop #C4,black;
setcharprop #2,noshield.gif;
shieldpower = 1;
dir = 2;
}

Is serverside. Not client :o..(Pretty sure it's only serverside :o)

xManiamaNx 06-11-2005 03:13 PM

showcharacter npcs can be both serverside and clientside.

Ajira 06-11-2005 03:52 PM

Quote:

Originally Posted by xAndrewx
//#CLIENTSIDE
if (created){
// Initialize the attributes
showcharacter;
setcharprop #3,head19.png;
setcharprop #C0,orange;
setcharprop #C1,gray;
setcharprop #C2,gray;
setcharprop #C3,brown;
setcharprop #C4,black;
setcharprop #2,noshield.gif;
shieldpower = 1;
dir = 2;
}

Is serverside. Not client :o..(Pretty sure it's only serverside :o)

Nope, they can be both Clientside and Serverside.

xAndrewx 06-11-2005 05:23 PM

Oh, my mistake. Jenn allways made it serverside on Era. I learned from Jenn :p.


All times are GMT +2. The time now is 03:16 PM.

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