Question about Game_Receive_Url_Response

正在查看此主题的用户

glenn500

Sergeant at Arms
Hello im busy with making some website scripts for my server

now my website outputs

Gold|The_Lone_Ranger|1036467|38

Now the question i have his

On Game_Receive_Url_Response i see

integer_count
and
string_count

as stored parameters
      (eq, ":integer_count", 5),
      (eq, ":string_count", 3),

now i see those 2 lines used but i dont know how to make it correctly
 
integer_count = Amount of received integers (Numbers)
string_count = Amount of received strings (Texts)

插入代码块:
My Name is Gotha|16|Warband|Native|Good|32323|322|1|2
The result would be:

integer_count = 5 (16,32323,322,1,2)
string_count = 4  (My Name is Gotha, Warband, Native and Good)

If that would be the answer of the webpage:
插入代码块:
My Name is Gotha|16|Warband|Native|Good|32323|322|1|2
It would be saved like this:
插入代码块:
s0|reg0|s1|s2|s3|reg1|reg2|reg3|reg4

I hope I am right with that.. Can't remember it 100%ly
 
Gotha 说:
integer_count = Amount of received integers (Numbers)
string_count = Amount of received strings (Texts)

插入代码块:
My Name is Gotha|16|Warband|Native|Good|32323|322|1|2
The result would be:

integer_count = 5 (16,32323,322,1,2)
string_count = 4  (My Name is Gotha, Warband, Native and Good)

If that would be the answer of the webpage:
插入代码块:
My Name is Gotha|16|Warband|Native|Good|32323|322|1|2
It would be saved like this:
插入代码块:
s0|reg0|s1|s2|s3|reg1|reg2|reg3|reg4

I hope I am right with that.. Can't remember it 100%ly

Yeah thanks how can i edit that it drops gold when you leave?

EDIT : I mean if you leave the server the updatescript sets the gold to the current value which for example is 5000 but when you rejoin its 4456 or something lower how can i remove that it lowers on rejoin
 
glenn500 说:
Yeah thanks how can i edit that it drops gold when you leave?

EDIT : I mean if you leave the server the updatescript sets the gold to the current value which for example is 5000 but when you rejoin its 4456 or something lower how can i remove that it lowers on rejoin

you need to make some sort of database with php to store player gold.the simple way to do it is with .txt files. first make a folder(lets assume it is called "ids") that will keep all the .txt files in the root of the server(web server).

then, when the player joins the server, send the UNIQUE id of the player and also send the local id too. then with php you will check if there is a file called "ids/".$id.".txt"($id is the unique id of the player). if there is no file, then create one and write in it 5000. then echo the gold and the local id. if there is that file, then echo the contents of the file and the local id.
then in the dedicate server you want to do (player_set_gold, reg1, reg0, 15000)(depending on wich variable you put first, set those 2 regs).

then when the player exits the server, you will wanna send the unique id again(send it to a different .php file, or use a second variable as a "event") , and with php substract how much you want and store it inside .txt file.

hope it helps, i tried to explain as good as i could.
 
后退
顶部 底部