Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Nick changing NPC problem (https://forums.graalonline.com/forums/showthread.php?t=34219)

HoudiniMan 07-25-2002 08:22 AM

Nick changing NPC problem
 
I'm trying to make a nick setting NPC.
I'm a developer for Doomsday and I made an NPC the otherday for the Police, however i couldn't test it because I don't have a (Police) tag :(. I figured I'd set about making something like the "control nick" NPC on g2k1. I hoped I would be able to set my nick to anything and thus be able to have a (Police) tag for a while, but it doesn't work at all. We have no npcserver and I don't need it to change other people's names etc, only mine.

Here's my script:
NPC Code:

// NPC made by HoudiniMan (Developer)
if (playertouchsme) {
toweapons Changenick;
}
if (playerchats&&startswith(changenick,#c)&&isweapon) {
tokenize #c;
for (i=1;i<tokenscount;i++){
setstring this.newnick,#s(this.newnick) #t(i);
}
setplayerprop #n,#s(this.newnick);
}


jeff335 07-25-2002 08:27 AM

Can't set #n without NPC server.

IAMNOTAFREAK 07-25-2002 08:44 AM

setplayerprop #c,nameyouwant;

that should do it...

Falcor 07-25-2002 08:56 AM

why are tokenizing the chat? when all you have to do is ommit the first part of it?

#e(start,end,str)

so try...
setplayerprop #c,setnick #T(#e(10,-1,#c));

although it is a crude meathod of setting a nickname, its the only real way to do it w/o npcs server =\.

adam 07-25-2002 11:26 AM

HoudiniMan



............

I made a nick changing npc

about.... 1234997324X on doomsday


So give it up. If you want to see it I'll glady show you how it works.....

HoudiniMan 07-25-2002 03:19 PM

still doesn't solve problem of setting nick to a guild you're not in... I've been informed this cannot be done without an npcserver though... thanks guys


All times are GMT +2. The time now is 05:41 PM.

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