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 11-20-2005, 08:00 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
n00bie question!

arg i hate asking for this:
how do i properly use putnpc2?
VvVThat dun work VvV
NPC Code:
//#CLIENTSIDE
// NPC made by Excaliber
if(weaponfired){setani grab,;
putnpc2 #f,beer.txt,playerx,playery+3,{
//#CLIENTSIDE
if(playertouchsme){
playerhearts=playerhears+2;
destroy;
}
}
destroy;
}

Reply With Quote
  #2  
Old 11-20-2005, 08:10 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
you can't have two //#CLIENTSIDE
put your script in a class npc and do a putnpc2 with if (created) join classname;
__________________
Reply With Quote
  #3  
Old 11-20-2005, 09:22 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
it says that there's no NPCs that use it X_X
Reply With Quote
  #4  
Old 11-20-2005, 10:29 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
PHP Code:
putnpc2(xy"contents"); 
... where contents will often be a join:
PHP Code:
putnpc2(xy"join(\"classname\");"); 
For old gscript, that is:
PHP Code:
putnpc2 x,y,{join classname;}; 
Quote:
Originally Posted by excaliber7388
it says that there's no NPCs that use it X_X
That just means that nothing has joined your class yet.

When you join a class that has no current instances, it will then appear in the classes list, and future script updates will then update all instances.
__________________
Skyld
Reply With Quote
  #5  
Old 11-21-2005, 12:13 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Aside from what Skyld posted, you are trying to use putnpc2 clientside, which is not possible.
Reply With Quote
  #6  
Old 11-21-2005, 03:17 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
Well, i can now lay down beers. however, if the level is updated after they are 'drank' they re-appear X_X here's the two scripts:
beer weapon:
NPC Code:
if(created){join beer;}
if(actionserverside){
if(strequals(#p(0),lay)){
putnpc2 playerx,playery+3,
{join beer;};
}
}
//#CLIENTSIDE

// NPC made by Excaliber
if(weaponfired){setani grab,;playerdir=2;
triggeraction 0,0,serverside,Beer,lay;

destroy;
}


beer class:
NPC Code:
//#CLIENTSIDE
if(created){
setshape 1,32,32;
setimg beer.gif;
}
if(playertouchsme){
playerhearts=playerhearts+1;
setani hurt,;
hide;
destroy;
}

Reply With Quote
  #7  
Old 11-21-2005, 04:57 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
To get rid of them, destroy has to be called serverside.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #8  
Old 11-21-2005, 03:08 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
HTML Code:
if(created){join beer;}
Why exactly are you doing that?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #9  
Old 11-22-2005, 12:10 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
XD don't know i was testing something
*removed*
Reply With Quote
  #10  
Old 11-22-2005, 01:10 AM
MysticX2X MysticX2X is offline
Prince
MysticX2X's Avatar
Join Date: Sep 2005
Posts: 2,529
MysticX2X will become famous soon enough
haha even i could do that.
__________________
-Mystic

former acc: mystic2k


RIP Matt (NBK)
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 08:36 AM.


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