Graal Forums

Graal Forums (http://forums.graalonline.com/forums/index.php)
-   NPC Scripting (http://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Duplicate an NPC (http://forums.graalonline.com/forums/showthread.php?t=134267909)

Vatec 02-19-2013 07:28 AM

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.

cbk1994 02-19-2013 01:02 PM

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.

BlueMelon 02-19-2013 04:20 PM

The use of classes ideal for re-using the same code...

fowlplay4 02-19-2013 11:02 PM

The only proper way to do what you want is with putnpc2, and you can pass whole scripts to putnpc2:

putnpc2(x, y, "script");

Draenin 02-20-2013 01:23 AM

You're going to have a tough road ahead if you're sticking to level NPCs and not classes.

Vatec 02-20-2013 01:39 AM

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.

Jiroxys7 02-21-2013 02:19 AM

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.


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

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