insarius Posted October 15, 2012 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 106 Reputation: 3 Joined: 09/21/12 Last Seen: August 20, 2015 Share 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 Link to comment Share on other sites More sharing options...
Brian Posted October 15, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 594 Joined: 10/26/11 Last Seen: June 2, 2018 Share 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 Link to comment Share on other sites More sharing options...
insarius Posted October 15, 2012 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 106 Reputation: 3 Joined: 09/21/12 Last Seen: August 20, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
Brian Posted October 15, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 594 Joined: 10/26/11 Last Seen: June 2, 2018 Share 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 Link to comment Share on other sites More sharing options...
insarius Posted October 15, 2012 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 106 Reputation: 3 Joined: 09/21/12 Last Seen: August 20, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
AnnieRuru Posted October 15, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted October 15, 2012 - script blah blah blah -1,{ OnInit: if ( $rachel_donate < 10000 ) $rachel_donate = 10000; end; } solved Quote Link to comment Share on other sites More sharing options...
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?
Link to comment
Share on other sites
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.