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 07-25-2002, 08:22 AM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan will become famous soon enough
Unhappy 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);
}

__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #2  
Old 07-25-2002, 08:27 AM
jeff335 jeff335 is offline
Registered User
Join Date: Oct 2001
Posts: 605
jeff335 is on a distinguished road
Can't set #n without NPC server.
__________________

Quote:
Some people like standing around talking to idiots in the real world, and some don't. Neither choice is inherently better than the other.

-Kaimetsu
Reply With Quote
  #3  
Old 07-25-2002, 08:44 AM
IAMNOTAFREAK IAMNOTAFREAK is offline
Registered User
Join Date: May 2002
Location: IBM Stellar Sphere
Posts: 118
IAMNOTAFREAK is on a distinguished road
Send a message via ICQ to IAMNOTAFREAK Send a message via AIM to IAMNOTAFREAK
setplayerprop #c,nameyouwant;

that should do it...
__________________
Crimson


Nocturne...it's coming.
Reply With Quote
  #4  
Old 07-25-2002, 08:56 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
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 =\.
__________________

subliminal message: 1+1=3
Reply With Quote
  #5  
Old 07-25-2002, 11:26 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
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.....
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #6  
Old 07-25-2002, 03:19 PM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan will become famous soon enough
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
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

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 04:51 PM.


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