Mirage Source
http://web.miragesource.net/forums/

check the name of a player even if he is offline...
http://web.miragesource.net/forums/viewtopic.php?f=210&t=254
Page 1 of 3

Author:  Gilgamesch [ Fri Jul 07, 2006 12:58 pm ]
Post subject:  check the name of a player even if he is offline...

hey,

how can i change something in the player account data even if he isnt online? for example his name, the only way i know is this:

n = isplaying(name)

setplayername(n,"his name")



hopefully you know what i mean :)


thanks!

Author:  Tosuxo [ Fri Jul 07, 2006 1:17 pm ]
Post subject: 

getvar and putvar i guess... hmmmm

you'll have to know their account info though... maybe if you make an accounts list tool and char list tool... so it gets all accounts from the server (their names) and so on... but this would be VERY laggy if there are alot of accounts...

Author:  Matt [ Fri Jul 07, 2006 1:32 pm ]
Post subject: 

Why don't you just make him log off, and then change his name in his account?

Author:  Gilgamesch [ Fri Jul 07, 2006 2:39 pm ]
Post subject: 

Advocate wrote:
Why don't you just make him log off, and then change his name in his account?


so, you mean, let the player log off, and then i just change it? if you mean this, nope, because i use this for something else...actually, what i want is this:

i have the Players name, and lets say he is offline, i can still change or do stuff with the client, because i am an admin, k?

thanks

Author:  Misunderstood [ Fri Jul 07, 2006 3:20 pm ]
Post subject: 

with the client?
you cant talk to the client if they arent connected to you. lol.

Author:  Matt [ Fri Jul 07, 2006 3:31 pm ]
Post subject: 

I think he wants to be able to edit player accounts from the client.

Author:  Gilgamesch [ Fri Jul 07, 2006 3:58 pm ]
Post subject: 

Advocate wrote:
I think he wants to be able to edit player accounts from the client.

exactly, but even if they are offline :)

we are getting closer xD

Author:  Tosuxo [ Fri Jul 07, 2006 4:43 pm ]
Post subject: 

notepad.

lol, nah, erm... i'm trying to think of a way that wouldn't require the server to load ALL accounts.... that would take up too much RAM etc... and make the game aloooot slower.... give me awhile lol

Author:  grimsk8ter11 [ Fri Jul 07, 2006 5:01 pm ]
Post subject: 

Me and mis ran into this problem.

We removed characters so the players are directly editable. Account = player :-D


Alternatively yopu could open every file and search for the name, possibly save the account name with with the character names in charlist.txt?

Author:  Matt [ Fri Jul 07, 2006 5:36 pm ]
Post subject: 

Just change the charlist.txt to an ini, and have the account name as the header, and list the characters they have under the header.

Author:  Gilgamesch [ Fri Jul 07, 2006 9:06 pm ]
Post subject: 

grimsk8ter11 wrote:
Alternatively yopu could open every file and search for the name, possibly save the account name with with the character names in charlist.txt?


yeah, bu thow do i open each file and read it?

Author:  Tosuxo [ Fri Jul 07, 2006 9:09 pm ]
Post subject: 

yeh, for Monster Trainer, i've changed things majorly with account saving, i've made a new thing altogether for each single player, they have a player save for their monsters. this means i can just find the file by entering the player name. then I can make an inbuild-editor for monsters e.g. "give levelup" etc. Looks good anyway

Author:  Robin [ Fri Jul 07, 2006 9:25 pm ]
Post subject: 

Whats that got to do with his problem?

Author:  Tosuxo [ Fri Jul 07, 2006 9:49 pm ]
Post subject: 

Kite wrote:
Whats that got to do with his problem?


duh.... that he should make a system like was mentioned so that it splits accounts and players apart so it has accounts folder and players folder... i was just explaining what use it has

Author:  Robin [ Fri Jul 07, 2006 9:52 pm ]
Post subject: 

but this doesnt tell him how to edit their stats when they are offline.

if the stats aren't loaded into the server, you are going to need to read the values out of the ini, change them accordingly and then write the new values into the ini, then erase all the variables used by the server to save RAM, Gilgamesch.

Author:  Tosuxo [ Fri Jul 07, 2006 9:54 pm ]
Post subject: 

Kite wrote:
but this doesnt tell him how to edit their stats when they are offline.

if the stats aren't loaded into the server, you are going to need to read the values out of the ini, change them accordingly and then write the new values into the ini, then erase all the variables used by the server to save RAM, Gilgamesch.


if they're offline... it won't have the info stored in RAM... or would it? :S

otherwise if they're online you just call saveplayer(index) and that'll save the player and, i guess, update the stats for the player too, or you'd have to call senddatatoall(updatedstats & sep_char & shit)

so really it's not THAT hard... it's just like... updating items

Author:  Robin [ Fri Jul 07, 2006 10:01 pm ]
Post subject: 

It's not. All the items are saved into the RAM of the server because the data is constantly being sent and recieved. Players are not loaded up unless they are online, so we need a different method to check data in offline players.

Author:  Gilgamesch [ Fri Jul 07, 2006 10:05 pm ]
Post subject: 

nah tosuxo...if i did that the player HAS to be online..thats the problem :/

because "index" is the number of the player that is online, for example if 10 people are online, the number of you can be between 0 (not sure if its not 1 ) and 10, it depend on when you logged in, k?


but, how can i read them out of the ini?
oh, and kite, if you have time, could you help me with that in msn? and then i post it for the others here, in case someone else needs it too :)

thanks guys!!!

Author:  Tosuxo [ Fri Jul 07, 2006 10:07 pm ]
Post subject: 

Gilgamesch wrote:
nah tosuxo...if i did that the player HAS to be online..thats the problem :/

because "index" is the number of the player that is online, for example if 10 people are online, the number of you can be between 0 (not sure if its not 1 ) and 10, it depend on when you logged in, k?


but, how can i read them out of the ini?
oh, and kite, if you have time, could you help me with that in msn? and then i post it for the others here, in case someone else needs it too :)

thanks guys!!!


that's what i said.... if the player's online you'd have to do it like that... otherwise have a diff save system... then you won't have a problem with .ini

i meant that if you were editing online players you have to update them and save them... or just update would work...

but if they're offline then you can edit the .ini anyway

Author:  Gilgamesch [ Fri Jul 07, 2006 10:08 pm ]
Post subject: 

Tosuxo wrote:
but if they're offline then you can edit the .ini anyway


yup, but that "editing the ini" is the stuff i cant do :/, or at least, i dont know how to do it

Author:  Tosuxo [ Fri Jul 07, 2006 10:11 pm ]
Post subject: 

Gilgamesch wrote:
Tosuxo wrote:
but if they're offline then you can edit the .ini anyway


yup, but that "editing the ini" is the stuff i cant do :/, or at least, i dont know how to do it


that's why you should do as mentioned before... make accounts save to a different file to players... then you only have to do the getvar and putvar for them :)

Author:  Robin [ Fri Jul 07, 2006 10:12 pm ]
Post subject: 

Tosuxo, did you read his original post?

He was asking for a way to search through the data in offline players. The engine does not currently allow this because it can only read data which is currently stored in variables in the server/client. To, say, read a characters guidname, you would have to read the data from the ini, store it as a temp. value, use it to do what you need then dump the memory.

I'm pretty sure he knows how to save and update online player data.

Sorry Gilgamesch, i'm a bit weighed down with coursework at the moment, but ill be back on next week if you haven't sorted it out by then. :)

Author:  Gilgamesch [ Fri Jul 07, 2006 10:14 pm ]
Post subject: 

Kite wrote:
Sorry Gilgamesch, i'm a bit weighed down with coursework at the moment, but ill be back on next week if you haven't sorted it out by then. :)


k thanks man :)

and @tosuxo, i really appreciate that you are trying to help me, but like kite said, i know how to do that :)

Author:  Tosuxo [ Fri Jul 07, 2006 10:18 pm ]
Post subject: 

Kite wrote:
Tosuxo, did you read his original post?

He was asking for a way to search through the data in offline players. The engine does not currently allow this because it can only read data which is currently stored in variables in the server/client. To, say, read a characters guidname, you would have to read the data from the ini, store it as a temp. value, use it to do what you need then dump the memory.

I'm pretty sure he knows how to save and update online player data.

Sorry Gilgamesch, i'm a bit weighed down with coursework at the moment, but ill be back on next week if you haven't sorted it out by then. :)


dude, do you actually UNDERSTAND how visual basic works? you're fuckin stupid if you think it can only read from RAM...

server side make it search the data in the .ini file (which would be made easier making it so it's players have diff ini to the accounts).

Even when i'm tipsy I'm making more sense than you... lol

Author:  Matt [ Fri Jul 07, 2006 10:48 pm ]
Post subject: 

No, you're reading what he's saying wrong, he's saying Gilga doesn't know how to edit ini files, so your method won't work. He was talking about players that ARE online, you're twisting everything.

Page 1 of 3 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/