Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Character NPC (https://forums.graalonline.com/forums/showthread.php?t=32140)

Glory 06-23-2002 07:57 AM

Character NPC
 
Well I wanted to make an NPC. SO that when it is fired it makes a replica of the person who fired it...but I seem to be having trouble *yes I suck at npc making* Here is what is in the txt script.

NPC Code:
if (created) {
// Initialize the attributes
showcharacter;
setcharprop #n(-1),#n;
setcharprop #c(-1),#c;
sprite=playersprite;
setcharprop #C0(-1),#C0;
setcharprop #C1(-1),#C1;
setcharprop #C2(-1),#C2;
setcharprop #C3(-1),#C3;
setcharprop #C4(-1),#C4;
setcharprop #P1(-1),#P1;
setcharani #m,;
setcharprop #3(-1),#3;
setcharprop #8(-1),#8;
dir=playerdir;
ap=playerap;



and here is what is in the actual NPC.
NPC Code:

if (playertouchsme) {toweapons Cloner;
}
if (weaponfired)
putnpc ,staffdollnews.txt,playerx,playery;


Falcor 06-23-2002 08:57 AM

It is quite imposible to do without an NPCs server, unless you want to set server strings. You could try using string arrays

such as

setstring server.putdoll,#C0,#C1,#C2,#C3,#C4,#3,.....etc;

use put npc


and then use #I in the NPC to get the color (or image) such as
setcharprop #C0,#I(server.putdoll,0);
setcharprop #C1,#I(server.putdoll,1);

....

setcharprop #3,#I(server.putdoll,5);

etc.

Python523 06-23-2002 09:56 AM

eww, putnpc

Glory 06-23-2002 11:18 AM

Quote:

Originally posted by Python523
eww, putnpc
hey I suck at scripting so please do not mock ;(

Falcor 06-23-2002 11:55 AM

Its not like he has an NPCs server jagen =\

Python523 06-23-2002 12:10 PM

Quote:

Originally posted by Falcor
Its not like he has an NPCs server jagen =\
I can't imagine myself not having access to an npc server anymore :(

Glory 06-23-2002 02:51 PM

>.< LOL If I still worked on Andor I think I could of gained access quit easily ;)


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

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