insarius Posted October 15, 2012 Posted October 15, 2012 So, I want to open this to my players, but it need like 10000 donations of 50k. Which variable do I need to edit to read it as if 10000 times have been donated? Quote
Brian Posted October 15, 2012 Posted October 15, 2012 trunk/npc/quests/quests_rachel.txt //= Sanctuary Quest: //= - Actually two quests in one. Donation and dungeon quest. //= - Requires 10000 donations before players can start the quest. //= - Variable in use: ra_tem_q (max 23) (unset at end) //= - Variable in use: Once completed MISC_QUEST bit 8192 is set //= - Variable in use: ra_have_donated (0 no/1 yes) //= - Variable in use: $rachel_donate (max 10000) Rachel Sanctuary will open after $rachel_donate is greater than or equal to 10000. Quote
insarius Posted October 15, 2012 Author Posted October 15, 2012 Yes but $rachel_donate gets read out tons of times, I don't know what the source to edit is. Quote
Brian Posted October 15, 2012 Posted October 15, 2012 Permanent server variables are stored in the `mapreg` SQL table. If at least one player has donated (and the $rachel_donate variable exists), you can view it with this SQL query: SELECT * FROM `mapreg` WHERE `varname`='$rachel_donate'; Edit the `value` column using phpMyAdmin or your Query Browser program, or you can edit the value using a SQL query: UPDATE `mapreg` SET `value`=10000 WHERE `varname`='$rachel_donate'; If no players have donated yet and the first query did not return any rows, you can insert (create) the variable like this: INSERT INTO `mapreg` VALUES ('$rachel_donate', 0, 10000); Note: to edit variables this way, you have to stop the server first, then run the SQL queries. The alternate method is set the variable using a script while the server is running. Copy-paste this into a script, @loadnpc, and click it if necessary (prior to r16130). prontera,155,188,0 open_rachel_sanct 910,{ OnInit: set $rachel_donate, 10000; atcommand "@unloadnpc " + strnpcinfo(3); } Quote
insarius Posted October 15, 2012 Author Posted October 15, 2012 Permanent server variables are stored in the `mapreg` SQL table. If at least one player has donated (and the $rachel_donate variable exists), you can view it with this SQL query: SELECT * FROM `mapreg` WHERE `varname`='$rachel_donate'; Edit the `value` column using phpMyAdmin or your Query Browser program, or you can edit the value using a SQL query: UPDATE `mapreg` SET `value`=10000 WHERE `varname`='$rachel_donate'; If no players have donated yet and the first query did not return any rows, you can insert (create) the variable like this: INSERT INTO `mapreg` VALUES ('$rachel_donate', 0, 10000); Note: to edit variables this way, you have to stop the server first, then run the SQL queries. The alternate method is set the variable using a script while the server is running. Copy-paste this into a script, @loadnpc, and click it if necessary (prior to r16130). prontera,155,188,0 open_rachel_sanct 910,{ OnInit: set $rachel_donate, 10000; atcommand "@unloadnpc " + strnpcinfo(3); } Thanks, in the meantime I found a simpler sollution. ra_temple,116,174,3 script Nemma#ra_temple 920,{ cutin "ra_nemma02",2; if ($rachel_donate < 10000) { if (ra_have_donated != 0) { cutin "ra_nemma03",2; mes "[Priestess Nemma]"; mes "Good day, adventurer."; mes "May I ask what brings"; mes "you to the temple today?"; set ra_have_donated,1; next; Simply made it set the donation fulfilled syntax at the end of the first dialogue, haha. Quote
AnnieRuru Posted October 15, 2012 Posted October 15, 2012 - script blah blah blah -1,{ OnInit: if ( $rachel_donate < 10000 ) $rachel_donate = 10000; end; } solved Quote
Question
insarius
So, I want to open this to my players, but it need like 10000 donations of 50k.
Which variable do I need to edit to read it as if 10000 times have been donated?
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.