Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-19-2013, 07:28 AM
Vatec Vatec is offline
Lurking
Join Date: Oct 2012
Posts: 27
Vatec is on a distinguished road
Duplicate an NPC

Hey everyone, just got a quick question, is there a function for duplicating an NPC? I thought about putnpc2 but that wouldn't copy the code of the first NPC.

Also I can't use classes, I need to be able to duplicate it without the use of classes.
__________________


Quote:
Originally Posted by GULTHEX View Post
so i think the problem is that onactionclientside isint a real function
Reply With Quote
  #2  
Old 02-19-2013, 01:02 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
There's no way to duplicate an NPC without resorting to hackish methods (reading the NPC's code from the npcs folder), which I would advise against.

Can you describe what you're trying to do? If you tell us what you're trying to accomplish we might be able to give you better advice.
__________________
Reply With Quote
  #3  
Old 02-19-2013, 04:20 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
The use of classes ideal for re-using the same code...
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #4  
Old 02-19-2013, 11:02 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
The only proper way to do what you want is with putnpc2, and you can pass whole scripts to putnpc2:

putnpc2(x, y, "script");
__________________
Quote:
Reply With Quote
  #5  
Old 02-20-2013, 01:23 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin Send a message via Skype™ to Draenin
You're going to have a tough road ahead if you're sticking to level NPCs and not classes.
Reply With Quote
  #6  
Old 02-20-2013, 01:39 AM
Vatec Vatec is offline
Lurking
Join Date: Oct 2012
Posts: 27
Vatec is on a distinguished road
I understand what you mean, but I was asked to script an NPC which could do that WITHOUT the use of classes. Anyway it seems there was no simple way to do that so end of thread.
__________________


Quote:
Originally Posted by GULTHEX View Post
so i think the problem is that onactionclientside isint a real function
Reply With Quote
  #7  
Old 02-21-2013, 02:19 AM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Well tell us why exactly you feel that you're restricted to not using classes?
There's likely to be a workaround that you're not aware of.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 05:53 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.