dev rev-4 rose

A forum to show of the stuff you did for your server.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

dev rev-4 rose

Postby harem on Fri Aug 07, 2015 11:08 am

online for 3 mounts..
please give me info if there is a bug in my server..
and who need client for dev-rev4, can download at http://rosehero.com/do-mode-client.html
rosehero.com
harem
Little soul
Little soul
 
Posts: 4
Joined: Wed Jul 29, 2015 9:50 pm

Re: dev rev-4 rose

Postby PurpleYouko on Sun Aug 09, 2015 9:24 pm

Are your timed quests working?
During development of DR4 we never solved that problem for the client version we were using. The code still does it the old way so if you are using a client from before the timer format change then it would still work.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: dev rev-4 rose

Postby harem on Mon Aug 10, 2015 3:06 am

quest test at npc Lampa, for "quest Jelly bean Roundup", timed runs, although not 100% as it should be.
I have to change some code in playerfunction.cpp the function "SendQuestUpdate ()";
  1.  
  2.     long int waktu2=time(NULL)-131076;
  3.     long int waktu3=time(NULL)-waktu2;
  4.  
  5.     BEGINPACKET (pak, 0x723);
  6.     for(dword i = 0; i < 5; i++) ADDWORD( pak, quest.EpisodeVar[i]);
  7.     for(dword i = 0; i < 3; i++) ADDWORD( pak, quest.JobVar[i]);
  8.     for(dword i = 0; i < 7; i++) ADDWORD( pak, quest.PlanetVar[i]);
  9.     for(dword i = 0; i < 10; i++) ADDWORD( pak, quest.UnionVar[i]);
  10.  
  11.     for( unsigned i = 0; i < 10; i++ )
  12.     {
  13.         ADDWORD( pak,  quest.quests[i].QuestID );
  14.         long int Time = 0;
  15.         //Log( MSG_DEBUG, "Initialized Time");
  16.         //Log( MSG_DEBUG, "This Quest quest id = %i",quest.quests[i].QuestID);
  17.         //Log( MSG_DEBUG, "This Quest timer = %i",GServer->STB_QUEST.rows[quest.quests[i].QuestID][1]);
  18.         if (quest.quests[i].QuestID > 0 && GServer->STB_QUEST.rows[quest.quests[i].QuestID][1] > 0)
  19.         {
  20.             //Log( MSG_DEBUG, "This Quest timer = %i",GServer->STB_QUEST.rows[quest.quests[i].QuestID][1]);
  21.             Time += quest.quests[i].StartTime; // Start time
  22.             //Log( MSG_DEBUG, "start time = %i",quest.quests[i].StartTime);
  23.             //Time += GServer->STB_QUEST.rows[quest.quests[i].QuestID][1] * 1000; // Time to finish
  24.             Time+= GServer->STB_QUEST.rows[quest.quests[i].QuestID][1]*10;
  25.             //Log( MSG_DEBUG, "time at finish = %i",Time);
  26.             Time -= time(NULL); // Current time
  27.             //Log( MSG_DEBUG, "current time = %i",time(NULL));
  28.             if (Time < 0) Time = 0; // Time is up
  29.             else
  30.             {
  31.                 Time /= 10;
  32.                 Time += waktu3;
  33.             }
  34.             //Time+= GServer->STB_QUEST.rows[quest.quests[i].QuestID][1];
  35.  
  36.             //Time /= 10; // Divide to get 10's of seconds
  37.  
  38.             //1374230282
  39.             //long int timeawal = 1374230282-GServer->Config.hitungan;
  40.             //Time = time(NULL)-timeawal;
  41.             //nol /nol 131086
  42.             //Time = 131086;
  43.             //Time+= GServer->STB_QUEST.rows[quest.quests[i].QuestID][1];
  44.             //Time = ((GServer->STB_QUEST.rows[quest.quests[i].QuestID][1]/60)*GServer->Config.hitungan);
  45.  
  46.             //Log( MSG_DEBUG, "This Quest time remaining = %i",Time-waktu3);
  47.         }
  48. ............................................................
  49.  

I hope there is a coder who can provide input to further make this "quest timer" a more perfect.
rosehero.com
harem
Little soul
Little soul
 
Posts: 4
Joined: Wed Jul 29, 2015 9:50 pm

Re: dev rev-4 rose

Postby PurpleYouko on Tue Aug 11, 2015 2:22 pm

The problem that we encountered is that they changed the way that timers worked.
They used to be simple. Just a value for remaining seconds.
Then they decided to take a leaf out of Microsoft's date recognition system. All dates and times in microsoft are stored as seconds since 0:00 (midnight) on jan 1st 1900
Rose decided to use a similar system but instead of Jan 1 1900 they used the date on which they opened their doors. I think it was September 1st 2006 but I could be remembering that wrong. it has been a couple of years since i worked on this. They also modified the packet structure to make this timer value a DWORD rather than a WORD (if i remember correctly) so all the rest of the stuff in the packet is pushed back 2 bytes.

So now when you start a timed quest it adds the duration of the quest to the number of seconds since opening day and stores that in it's system. The opening day will always be a constant so recoding it it shouldn't be all that hard.
I don't have the time to do it myself.

Looks like your code is doing something along these lines already
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: dev rev-4 rose

Postby harem on Fri Aug 14, 2015 6:32 am

After check and do some test, i think we must mark time every player do event at :pakdoid();
then get time amount from pakdoid to start new quest;
and add it to time formula that send to client.
this is my change and time send to client more better then above code;
  1.  
  2.     long int lastdoid_times = 0;
  3.     long int databatasquest = 1310720;
  4.  
  5.     BEGINPACKET (pak, 0x723);
  6.     for(dword i = 0; i < 5; i++) ADDWORD( pak, quest.EpisodeVar[i]);
  7.     for(dword i = 0; i < 3; i++) ADDWORD( pak, quest.JobVar[i]);
  8.     for(dword i = 0; i < 7; i++) ADDWORD( pak, quest.PlanetVar[i]);
  9.     for(dword i = 0; i < 10; i++) ADDWORD( pak, quest.UnionVar[i]);
  10.  
  11.     for( unsigned i = 0; i < 10; i++ )
  12.     {
  13.         ADDWORD( pak,  quest.quests[i].QuestID );
  14.         long int Time = 0;
  15.  
  16.         if (quest.quests[i].QuestID > 0 && GServer->STB_QUEST.rows[quest.quests[i].QuestID][1] > 0)
  17.         {
  18.             Time += quest.quests[i].StartTime; // Start time
  19.             Time += GServer->STB_QUEST.rows[quest.quests[i].QuestID][1]*10;
  20.             Time -= time(NULL); // Current time
  21.             if (Time < 0) Time = 0; // Time is up
  22.  
  23.             lastdoid_times = (time(NULL)-Status->awalstartquest); //awalstartquest = time when player do pakdoid.
  24.             Time += databatasquest+lastdoid_times;
  25.             Time = Time/10;
  26.         }
  27.         ADDDWORD( pak, Time ); // Time Left
  28.  


note: this code test on local server and single player.
rosehero.com
harem
Little soul
Little soul
 
Posts: 4
Joined: Wed Jul 29, 2015 9:50 pm


Return to Pimp My Rose

Who is online

Users browsing this forum: No registered users and 2 guests