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 06-13-2002, 11:05 AM
Shorty2Dope Shorty2Dope is offline
Psychopathic
Shorty2Dope's Avatar
Join Date: Oct 2001
Location: Insane Asylum
Posts: 3,290
Shorty2Dope is on a distinguished road
Send a message via AIM to Shorty2Dope Send a message via Yahoo to Shorty2Dope
Setting another users attributes?

How do you do it with NPC server or if it is possible, without NPC server.

ex: I want to set another users name. I would say "setname account 'name to give' "

I don't understand how it is possible to do.. if someone can just explain to me how its done and how each command works, that would be great

The only thing I know how to do is set the attributes of the player actually interacting with the NPC. I don't know how to tell the NPC to do something to someone else
__________________
blah
Reply With Quote
  #2  
Old 06-13-2002, 11:37 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
set it w/o the npcs server? you could use server.strings...

like set a string such as..

server.#a_attr //i use #a so it will be unique for all players.

and then give it a value like

setmp 0 //the space between setmp and 0 is used for tokenizing

then tokenize #a(server.#a_attr); in a weapon that the person that you wanna change has (such as maybe a system weapon) and then change his stuff accordingly.

he would check for a server.#a_attr string to be set for him to change his attributes and you could make the weapon he has do what you want.

tokenizing the string would give you 2 tokens

#t(0) = setmp
#t(1) = 0

you would read token 1 to see what you want to do (in this case, set mp)

so

if(strequals(#t(0),setmp)) {
yourcode;
delete the server string; //bc if you dont he gets more mp over and over
}

within your code for setting mp you could use the value of #t(1) to set his mp.
__________________

subliminal message: 1+1=3
Reply With Quote
  #3  
Old 06-13-2002, 12:44 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Falcor
set it w/o the npcs server? you could use server.strings...

like set a string such as..

server.#a_attr //i use #a so it will be unique for all players.

and then give it a value like

setmp 0 //the space between setmp and 0 is used for tokenizing

then tokenize #a(server.#a_attr); in a weapon that the person that you wanna change has (such as maybe a system weapon) and then change his stuff accordingly.

he would check for a server.#a_attr string to be set for him to change his attributes and you could make the weapon he has do what you want.

tokenizing the string would give you 2 tokens

#t(0) = setmp
#t(1) = 0

you would read token 1 to see what you want to do (in this case, set mp)

so

if(strequals(#t(0),setmp)) {
yourcode;
delete the server string; //bc if you dont he gets more mp over and over
}

within your code for setting mp you could use the value of #t(1) to set his mp.
See pickles can solve problems too.
Kinda sad that I haven't posted here for 3-5 days and thats the first thing I think to post...*dissappointed in self*
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #4  
Old 06-14-2002, 01:44 AM
Shorty2Dope Shorty2Dope is offline
Psychopathic
Shorty2Dope's Avatar
Join Date: Oct 2001
Location: Insane Asylum
Posts: 3,290
Shorty2Dope is on a distinguished road
Send a message via AIM to Shorty2Dope Send a message via Yahoo to Shorty2Dope
I still don't get what part of that is telling the NPC to set someone elses attributes. I would think that it would have some sort of command saying what account it sets it to.
__________________
blah
Reply With Quote
  #5  
Old 06-14-2002, 02:42 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
The whole point is getting data from one client to another. It first gotes through the server (hence, i used server strings) then it is read by the other client. What is ther to get? Everyone in their system NPC has a code to read their server string and do what it says..


when it reads the server string it will do commands like

setmp strtofloat(#t(1));
setplayerprop #C0,#t(1);

etc.
__________________

subliminal message: 1+1=3
Reply With Quote
  #6  
Old 06-16-2002, 08:21 AM
zallus-k zallus-k is offline
Registered User
Join Date: Sep 2001
Location: AC0265, Zaroke
Posts: 122
zallus-k is on a distinguished road
BTW, that 'setname' is not a good example. #n is a read-only attribute, so it wouldn't work on a non-NPCServed server.
__________________

Solemn Destiny - Owner
Reply With Quote
  #7  
Old 06-16-2002, 08:51 AM
jeff335 jeff335 is offline
Registered User
Join Date: Oct 2001
Posts: 605
jeff335 is on a distinguished road
He wanted to know how to pass stuff from one client to another WITH the npc server, aka Admin NPC. You do it using with(getplayer(account))
__________________

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
  #8  
Old 06-16-2002, 09:58 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
hmmm

The only thing wrong with that, is it would create a TON of server strings. It would be easier to do something like.....

setstring server.editplayer,#a,atribute,color/feature/value;

so

if (playerchats&&startswith(setplayer,#c)) {
// First account
// Second what youre editing
// value
// setplayer mikepg coat blue
tokenize #c;
setstring server.editplayer,#t(1),#t(2),#t(3);
}

in the client's system you'd want to have a timeout or some other action that reads in those variables constantly, checking to see if it's their account, and what features to change.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
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 07:08 AM.


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