Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-02-2004, 02:54 PM
Zickle Zickle is offline
Awesome
Zickle's Avatar
Join Date: Dec 2002
Posts: 121
Zickle is on a distinguished road
Send a message via ICQ to Zickle Send a message via AIM to Zickle Send a message via MSN to Zickle Send a message via Yahoo to Zickle
Angry 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?
__________________
Reply With Quote
  #2  
Old 12-02-2004, 03:11 PM
calum calum is offline
Registered User
Join Date: Nov 2003
Location: Scotland
Posts: 182
calum is on a distinguished road
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'
__________________

Last edited by calum; 12-02-2004 at 05:44 PM..
Reply With Quote
  #3  
Old 12-02-2004, 03:26 PM
Zickle Zickle is offline
Awesome
Zickle's Avatar
Join Date: Dec 2002
Posts: 121
Zickle is on a distinguished road
Send a message via ICQ to Zickle Send a message via AIM to Zickle Send a message via MSN to Zickle Send a message via Yahoo to Zickle
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..
__________________
Reply With Quote
  #4  
Old 12-02-2004, 08:53 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to 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,;

__________________
Do it with a DON!
Reply With Quote
  #5  
Old 12-02-2004, 10:02 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
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; 
__________________


Last edited by ZeroTrack; 12-03-2004 at 03:15 PM..
Reply With Quote
  #6  
Old 12-02-2004, 11:16 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
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.
Reply With Quote
  #7  
Old 12-03-2004, 05:50 AM
Zickle Zickle is offline
Awesome
Zickle's Avatar
Join Date: Dec 2002
Posts: 121
Zickle is on a distinguished road
Send a message via ICQ to Zickle Send a message via AIM to Zickle Send a message via MSN to Zickle Send a message via Yahoo to Zickle
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.
__________________
Reply With Quote
  #8  
Old 12-03-2004, 03:07 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
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
__________________

Reply With Quote
  #9  
Old 12-04-2004, 04:39 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
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..
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:53 PM.


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