Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   if (hit) {warpplayer } (https://forums.graalonline.com/forums/showthread.php?t=56268)

Zickle 12-02-2004 02:54 PM

if (hit) {warpplayer }
 
Hey, I'm tring to make a NPC do something like this:
NPC Code:
  if (playerhurt) {
setlevel2 darkrose-eh-main.nw,40.5,19;
}


The server I'm doing it for does have an NPC Server.

Anything I can do to make it work online?

calum 12-02-2004 03:11 PM

NPC Code:

if (actionserverside)
{
if (strequals(#p(0),warp)){
setlevel2 darkrose-eh-main.nw,40.5,19;
}
}
//#CLIENTSIDE
if (playerhurt) {
triggeraction x,y,serverside,<weaponname>,warp,#a;
}



setlevel2 has to be done serverside using 'triggeraction'

Zickle 12-02-2004 03:26 PM

Hmm, it still doesn't work...
Don't really know what to say though but I do think you made something that worked better. I would look at it more but school time..

zokemon 12-02-2004 08:53 PM

If it is in a level npc try this:

NPC Code:
if (created) setshape 1,1,1;

if (actionplayerhit) setlevel2 darkrose-eh-main.nw,40.5,19;

//#CLIENTSIDE

if (playerhit) triggeraction x,y,playerhit,;


ZeroTrack 12-02-2004 10:02 PM

Quote:

Originally Posted by calum
setlevel2 has to be done serverside using 'triggeraction'

it doesnt HAVE to be triggeraction , i think that playerhurt is just clientside, you can use setlevel without using triggeraction


PHP Code:

if(created && strcontains(#s(this.banned),#a)) setlevel2 banned.nw,30,30; 


Lance 12-02-2004 11:16 PM

Quote:

Originally Posted by calum
NPC Code:

if (actionserverside)
{
if (strequals(#p(0),warp)){
setlevel2 darkrose-eh-main.nw,40.5,19;
}
}
//#CLIENTSIDE
if (playerhurt) {
triggeraction x,y,serverside,<weaponname>,warp,#a;
}


Please be consistent in your styling. That's ugly.

Quote:

setlevel2 has to be done serverside using 'triggeraction'
It has to be done serverside, sure. I hope you are not saying that triggeractions are always required to use setlevel2...

Quote:

Originally Posted by ZeroTrack
if(created && strcontains(#s(this.banned),#a) setlevel2 banned.nw,30,30;

Dude, KSI-GS.

Zickle 12-03-2004 05:50 AM

Quote:

Originally Posted by zokemon
If it is in a level npc try this:

NPC Code:
if (created) setshape 1,1,1;

if (actionplayerhit) setlevel2 darkrose-eh-main.nw,40.5,19;

//#CLIENTSIDE

if (playerhit) triggeraction x,y,playerhit,;


Thanks man, and everyone else for the help. This is the one is the one that worked for me.

ZeroTrack 12-03-2004 03:07 PM

Quote:

Originally Posted by Lance

Dude, KSI-GS.

<3 hahahah alwayysss gotta pick on me lance =( , it shows you deep down you truely love me ;) bah i was a quick example anyways i'll add the code block to it but only cause you show you really care :)

xAndrewx 12-04-2004 04:39 PM

Sern, Why did you post a script what isn't finished?
if(created && strcontains(#s(this.banned),#a) setlevel2 banned.nw,30,30;
This kinda has nothing to do with anything relevent to what he is asking either..


All times are GMT +2. The time now is 03:05 AM.

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