Hey all,
I am tryen to collect data into a custom table via script(which I can do) but then restore it into another table based off the character ID#(I can't figure out)
The background is this. I have instances on my server and when a player zones in I am storing information like their exp, level, name, skill values, memmed spells ect. After they complete or leave the instance I am trying to restore the information back into the correct tables so everything is automated but I cannot figure out how to make the query verify the characterID then replace the information back into the table. I will post examples below. I think my main problem for example is in character_skills and character_memmedspells the information is stored repetitively down in rows instead of 1 row per ID#, meaning, each character ID will have 8 rows for memmed spells and 76 rows for skills. In my table I have everything done in 1 row. I have been reading the leaderboards plugin and anything else I can get my hands on but I cannot figure it out.
I need to get this saved information setup
instanced_saved_info table
Code:
659777 Reboot 50 164708608 200 200 200 200 200 200 200
to this setup to restore saved info back
character_skills
Code:
659777 0 60
659777 1 65
659777 2 60
659777 3 60
659777 4 60
659777 5 60
659777 6 60
659777 7 60
659777 8 60
659777 9 60
659777 10 60
659777 11 60
659777 12 60
659777 13 60
659777 14 60
659777 15 66
This is an example of what needs to be done.
Is this even possible? Or will I have to store individual rows per ID#?
EDIT: I started with globals but then realized how much information was being stored and it was just a huge mess. Using a table is much cleaner and easier to read. I also research sites like stackoverflow but I do not exactly know the proper terminology to help find my answers.