PDA

View Full Version : Enter Tutorial and Return Home buttons at Character Select


Derision
09-20-2008, 11:58 AM
This patch enables the 'Enter Tutorial' and 'Return Home' buttons in Character Select, and also sends
newly created characters to tutorialb if the 'Start Tutorial' button is selected.

Their are a couple of differences from Live:

Newly created characters sent to tutorialb are not bound there, they remain bound in their starting city.

'Return Home' returns you to your bind point, not your home city.

http://www.rama.demon.co.uk/tutgohome.patch


RULE_BOOL ( World, EnableTutorialButton, true)
RULE_BOOL ( World, EnableReturnHomeButton, true)
RULE_INT ( World, MaxLevelForTutorial, 10)
RULE_INT ( World, MinOfflineTimeToReturnHome, 21600) // 21600 seconds is 6 Hours


Note that the MaxLevelForTutorial rule has no effect in the 6.2 client, as it has a hardcoded cap of level 10.

Andrew80k
09-20-2008, 10:38 PM
Dude! You are doing awesome stuff. Thanks for this.

leslamarch
09-20-2008, 10:53 PM
Dude! You are doing awesome stuff. Thanks for this.
I agree works perfect :) Thanks so much for all the work :-D

cavedude
09-21-2008, 02:07 PM
Newly created characters sent to tutorialb are not bound there, they remain bound in their starting city.


Not a problem, I already wrote a script that binds new players to tutorialb when they first enter at level 1. I also added your popup to the script as well, for people running that code.

mplayer254
11-13-2008, 11:36 AM
Is there a way to make start tutorial button point to tutoriala rather than tutorialb? I am utilizing the jail break/mines of gloomingdeep(a) map as a sort of pre tutorial but want players to be able to choose between tuta and their home city at char. creation if possible. Anyone know how this could be accomplished?

mplayer254
11-15-2008, 01:03 AM
This is the line I found in the above patch link that leads me to believe if it is possible to change where the button points new characters to:

diff -u --recursive /tmp/EQEmu-0.7.0-1129/world/client.cpp ./world/client.cpp
--- /tmp/EQEmu-0.7.0-1129/world/client.cpp 2008-08-15 05:58:23.000000000 +0100
+++ ./world/client.cpp 2008-09-20 14:43:19.000000000 +0100
@@ -76,6 +76,7 @@
char_name[0] = 0;
charid = 0;
pwaitingforbootup = 0;
+ StartInTutorial = false;
numclients++;
}

@@ -438,6 +439,8 @@
QueuePacket(outapp);
safe_delete(outapp);
}
+ else
+ StartInTutorial = true;

SendCharInfo();

@@ -479,7 +482,15 @@
eqs->Close();
break;
}
-
+
+ if(!pZoning && ew->return_home)
+ zoneID = database.MoveCharacterToBind(charid);
+
+ if(!pZoning && (RuleB(World, EnableTutorialButton) && (ew->tutorial || StartInTutorial))) {
+ database.MoveCharacterToZone(charid, "tutorialb");
+ zoneID = 189;
+ }

I assume that is part of the source (since I have seen .cpp files in there before), so what would need to happen in order for me to change the highlighted text to tutoriala and 188, respectively?

Derision
11-15-2008, 01:56 PM
what would need to happen in order for me to change the highlighted text to tutoriala and 188, respectively?

Go to:

http://code.google.com/p/projecteqemu/downloads/list

and download Revision201.zip.

Then add a row to your rule_values table, rule_name=World:TutorialZoneID, rule_value=188 and restart your server using the executables from Reivision201.zip.

Remember to source in any files from the SQL folder with prefix numbers higher than the Revision you are currently running.

mplayer254
11-16-2008, 08:49 PM
Awesome, worked like a charm, sorry I kept bumping this thread, you do great work Derision!

mplayer254
11-17-2008, 01:09 AM
Ugh, I hope you guys don't hate me for making so many posts on a minor issue. Anyway, the first time I tried the Enter Tutorial Button it took me to 188...the other tests I've done have not done so well and I think I found why. The first time I tested the button I used the same character I have been using to tweak the 188 zone, so he was already in that zone when I pressed the Enter Tut button. The next two characters were new ones, and they zoned into 189 when I pressed the button, as well as when I toggled the Start Tutorial button in character creation. I saw that these errors had popped up in the World log after a closer look:

[Debug] [RULES__ERROR] Unable to find rule 'World:TutorialZoneID'
[Debug] [RULES__ERROR] Unable to interpret rule record for World:TutorialZoneID

I noticed while looking for other threads with these errors that the solution seems to be updating your EQEMU files, but I used Revision 201 (copy and pasted all the files in first folder and sourced in sqls), so I am (as always it seems) at a loss as to what else to try. I input the new row in Navicat 8 and have tested both 0 and 1 as the value for rules_set, 0 did not work (but also made no errors), and 1 failed to work and produced the errors above. Any ideas? Was also wondering if this rule will set both buttons or if two rules would be needed, one for each. Again, sorry to be a pain, feel free to ignore as I am sure there are more important things for you guys to do, I just appreciate the help.

AndMetal
11-17-2008, 02:42 AM
I would check your common/ruletypes.h (http://code.google.com/p/projecteqemu/source/browse/trunk/EQEmuServer/common/ruletypes.h#80) file to make sure it has the following around line 80:
RULE_INT ( World, TutorialZoneID, 189)
just in case it didn't make it over during the copying of files.

Derision
11-17-2008, 04:30 AM
[Debug] [RULES__ERROR] Unable to find rule 'World:TutorialZoneID'
[Debug] [RULES__ERROR] Unable to interpret rule record for World:TutorialZoneID


That error (unable to interpret rule), would suggest that the version of world.exe you are running is not the one from the Rev201 zip. It does work (I tested it).

mplayer254
11-17-2008, 11:12 AM
Not sure why it didn't work the first time but I keep all my custom DB stuff separate so I can install fresh when needed and that fixed the issue. Thanks for all the help, did my due diligence testing it this time so no worries.