So ist wenn man glaubt das ein Homehosting Server der beste Auswahl ist.
Wenn dann verschwindet, gibt es kein Archiv oder Cache davon. Als nie existiert.
Nun, kannste von mir haben :-)
IMPORTANT!!
You must run this SQL Database update to fix the old survey structure. It will replace the survey table so if you need the data backed up do so before running SQL update which can be found in:
trunk\GameServer\sql\update\aionx_gs_update_survey s.sql
Quote:
|
Originally Posted by Dallas
By default, the surveys are not activated.
In default.config
Code:
# Surveys
# true = Surveys is enabled and you can integrate with Web Shops(Players receive items on logon).
# false = Surveys is disabled.
# Default: false
gameserver.enable.surveys = true
|
Description:
This is instructions for Advanced Survey System (Version 3). It modifies quite a bit so I will explain the differences. Firstly it should make surveys work properly. The Survey system has been heavily modified read through the Tutorial carefully and follow it step-by-step to learn how it all works.
Surveys are also now checked for availability when a player levels.
The database table surveys, and survey_options is used to create surveys, and player_survey is used to control those surveys are explained in Database Structure Explained.
TUTORIAL
This tutorial will show you how to create a simple Survey.
Go in-game and logon to a character with elevated admin priviliges.
Enter "//survey" will show the available commands.
Create the basic Survey:
We are adding a survey so type "//survey add" for usage syntax.
It shows several ways to do it. We are only interested in making the most basic one:
Code:
//survey add "title" "message"
So enter:
Code:
//survey add "World Survey" "Hello do you like Surveys?"
If all has gone well you should have received a message of the survey and details of it. It's important to remember the survey_id as it will be used later.
So far it's not much but we will add more to it.
Add Survey Options:
For syntax on adding a Survey Option type:
Again we are adding only a basic option so the most simple will do for now which is:
Code:
//survey addoption <surveyId> "optionText"
So lets get to it. Remember the surveyId? Good because you need to use it, check your chatbox if you have forgotten. Enter:
Code:
//survey addoption 1 "Not really."
If it was successful it should show the survey and the new option in the chatbox.
Lets add a new option, this time we going to reward the users with some

yay and we are going to use the more complex add option syntax.
The Liconsis itemId is 152000470 and the count will be 5. We are now going to use:
Code:
//survey addoption <surveyId>"optionText" <item_id> <item_count>
So we now enter:
Code:
//survey addoption 1 "Yes I love Surveys!!" 152000470 5
If successful now both options should show underneath the Survey details. Ok we going to add two more simple ones Enter:
Code:
//survey addoption 1 "Damn a mistake"
And:
Code:
//survey addoption 1 "I refuse to asnwer."
Ok if all is well you should now have 4 options.
Deleting a Survey Option:
The 3rd option "Damn a mistake" is a deliberate mistake to demonstrate how to remove an Survey option.
Type in:
should give you the syntax usage. We need the surveyId and the optionId or to delete all options we use the surveyId and the all parameter.
We want to delete only one so we want the syntax:
Code:
//survey deloption <survey_id> <option_id>
So type:
Code:
//survey deloption 1 3
If it was successful you should notice the option has gone and the options after it have shifted back.
Editing Options:
Now we have three options which are ok but the 3rd option with the text: "I refuse to asnwer." has a spelling mistake so time to fix it.
We want to use the Edit Option command so enter for the syntax:
Code:
//survey editoption
Looks complex doesn't it? It's simple really the survey_id and option_id your are already familiar with the name parameter is the data name you want to change, in this case it will be the option_text, and the value will be you guessed right the new value you want.
ok so now we can enter our command to fix the spelling error previously:
Code:
//survey editoption 1 3 option_text "I refuse to answer."
On success grats you fixed your spelling mistake.
Editing Surveys:
Ok the Survey is looking good but lets make it more interesting. Lets reward the user with something just for taking the test.
We will have to edit the main Survey part so enter for syntax:
Ah you remember doing something like this for the editoptions hey? Great well here is not much different.
This time we just use the survey_id name and new value. Lets give Fresh Liconsis because we care!!
It's ItemId is 152000471 and make the count 3. This will require 2 entered commands they are:
Code:
//survey edit 1 itemId 152000471
which will modify the ItemId but the ItemCount is still zero, so we also enter:
Code:
//survey edit 1 itemCount 3
On Success you have made a base reward that will be given just for selecting any option on top of any items that may be given for a certain option.
Adding Player Surveys:
Ok now we are ready to test it. Who can be my labrat?? I know!! your Character!! ok lets do this.
Player Targetting:
First you will need to target yourself with F1 or click on your portrait on the bottom left.
A yellow circle should appear on your Character.
ok now you need to add a player Survey for a specific character since the Survey is not for all to do.
check syntax:
which is:
Code:
//survey addplayer <survey_id>
Simple huh? We know the surveyId so lets add it.
Code:
//survey addplayer 1
Successful? Great ok it's setup to take effect.
Now re-log your character and take the Survey and select option 2 "Yes I love Surveys!!".
On completion if you picked the 2nd option you should have got the base item just for doing the survey the Fresh Liconsis and the Liconsis for select the correct option (because you do love them right?).
Checking Survey Info:
Lets pretend we have forgotten which Survey and it's surveyId we want to check.
check syntax:
We can check by survey_id or by all. Since we have forgotten lets just check all of them and see if our one comes up, enter:
All surveys should show and there options. Ok so now we remember which one, it was surveyId 1 after all.
Displaying Survey Results:
Ok excellent now say I want to know who has selected which option? No problem simply check the survey result.
check syntax:
which shows:
Code:
//survey result <survey_id>
Ok easy lets enter our one:
You will see a new field beneath each option and that is playerCount, now we know which is the more popular choice!
Edit Survey to make global Survey:
Targetting players and manually adding them is tiresome isnt it cant we just survey everyone?
Yep you can just make the main survey survey_all field to 1.
Check syntax:
Too easy we know this already just use survey_all and the value equal too 1, so enter:
Code:
//survey edit 1 survey_all 1
On Success it should now apply to all players.
Check individual Player Results:
Say you want to know in a particular Survey what a certain player chose:
Highlight the player and use the syntax:
//survey infoplayer
Just needs survey_id provided so enter:
Code:
//survey infoplayer 1
Gives you info on the Survey outcome if they have taken it.
Deleting Player Surveys:
Since Surveys are so fun lets take that Survey again! Highlight you player and enter:
Code:
//survey delplayer 1
Since the Survey is now global you just need to re-log to take it again.
Ok done it a second time? Great stuff.
Edit Survey - For min/max level restrictions:
Now say we want a minimum level restriction on the survey.
Check syntax:
Awesome just edit the player_level_min and we are done. Lets make it levels 5 and up. Enter:
Code:
//survey edit 1 player_level_min 5
And done, minimum level to take the survey will now be set.
Conclusion:
Ok that explains most of the functions of this new Feature, hope you have some fun with it and enjoy.
Database Structure Explained
In table survey:
1. You can create a survey for specific player levels by setting the player_level_min and player_level_max. (use 1 and 55 respectively if you want all levels to participate).
2. It is possible to create a global player survey by simply by making survey_all=1.
3. You can award an Item regardless of the option selected by setting ItemId and ItemCount.
In table survey_options:
1. The survey_options table can be used to present the users with several options and within each option it's possible to award a different Item and a specified amount of that Item. Amounts for several Items does not display as it is bugged.
In table player_survey:
1. If you want to make survey for specific players only you insert into player_survey the player_id, survey_id and set the option_id=0.
2. When the Player takes a survey there choice is recorded and saved into player_surveys which serves two purposes. First, it gives feedback to the admins about which choice the Players have been making. Secondly, it records that the Player has taken the Survey and does not offer it again when the users re-logs or levels up.
References:
Credits:
auth ZeroSignal
Just a little test by Dallas
Just a little Example:
I LOVE SURVEYS !!!
Server Entertainment
Code:
//survey add "Discovery" "Who discovered planets stay in orbit?"
(note the survey Id, here "1")
Code:
//survey addoption 1 "da Vinci"
Code:
//survey addoption 1 "Newton" 164000076 50
Code:
//survey addoption 1 "Einstein"
Code:
//survey edit 1 survey_all 1