[Question] About STB files

Place your questions about osirose here

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

[Question] About STB files

Postby cedricyooo on Sat Nov 06, 2010 11:06 am

So I'm pretty newb at this (rose development) so I was wondering how tho the stb files work over rose and how can I make my own items so I could add them to the server, I'm talking about jewels like rings because I suppose making a new "suit" could be really difficult.

Hope I made myself clear if not let me know :)
cedricyooo
Little soul
Little soul
 
Posts: 6
Joined: Sat Nov 06, 2010 8:36 am

Re: [Question] About STB files

Postby PurpleYouko on Sat Nov 06, 2010 3:34 pm

Rings and other jewelry are pretty easy since they do not involve anything graphical at all.

The STBs all have column headers that should help to tell you what each column does.
If you use my editor (runs in Excel) then it also has a lot of lookup tables that tell you what all the values mean.
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: [Question] About STB files

Postby cedricyooo on Sat Nov 06, 2010 10:28 pm

Edit: "I made it" :) but now I have another question <.< sucks to be a newbie :<...Ok the thing is I looked at this thread http://forum.dev-osrose.com/viewtopic.php?f=18&t=2842&p=32531&hilit=charserver#p32531 and manage to modify the charpackets.cpp this is what I did:

  1. if(!DB->QExecute("INSERT INTO characters (account_name, char_name, face, hairStyle, sex) VALUES('%s','%s',%i,%i,%i)", thisclient->username, newname.c_str(), face, hairstyle, sex))
  2.        return false;
  3.     unsigned int mid = (unsigned)mysql_insert_id( DB->Mysql );    
  4.     MYSQL_ROW row;
  5.     if(!DB->QExecute("INSERT INTO items VALUES(%i,151,2,9,120,100,2,1,0,1,0,0)", mid))
  6.         return false;
  7.     if(!DB->QExecute("INSERT INTO items VALUES(%i,151,3,9,120,100,3,1,0,1,0,0)", mid))
  8.         return false;
  9.     if(!DB->QExecute("INSERT INTO items VALUES(%i,151,4,9,120,100,5,1,0,1,0,0)", mid))
  10.         return false;
  11.     if(!DB->QExecute("INSERT INTO items VALUES(%i,151,5,9,120,100,6,1,0,1,0,0)", mid))
  12.         return false;
  13.     if(!DB->QExecute("INSERT INTO items VALUES(%i,161,8,9,120,100,7,1,0,1,0,0)", mid))
  14.         return false;
  15.     if(!DB->QExecute("INSERT INTO items VALUES(%i,162,1,9,120,100,1,1,0,1,0,0)", mid))
  16.         return false;
  17.     if(!DB->QExecute("INSERT INTO items VALUES(%i,764,6,9,120,100,4,1,0,1,0,0)", mid))
  18.         return false;
  19.     if(sex==0)
  20.     {
  21.         if(!DB->QExecute("INSERT INTO items VALUES(%i,222,2,0,40,100,12,1,0,0,0,0)", mid))
  22.             return false;
  23.          }
  24.     else
  25.     {
  26.         if(!DB->QExecute("INSERT INTO items VALUES(%i,221,2,0,40,100,12,1,0,0,0,0)", mid))
  27.             return false;
  28.          } 
  29.     STARTPACKET( pak, 0x0713, 8 );
  30.     SETWORD    ( pak, 0x00,   0 );
  31.     thisclient->SendPacket( &pak );
  32.  
  33.     return true;
  34. }


However this doesn't make me get new items when I create a new char it still gets the visitor and sword =/ any clues what's happening?
cedricyooo
Little soul
Little soul
 
Posts: 6
Joined: Sat Nov 06, 2010 8:36 am

Re: [Question] About STB files

Postby PurpleYouko on Mon Nov 08, 2010 12:22 am

That is because new characters are created and set up in the charserver code not worldserver.

I don't remember the exact place but if you search around it's easy enough to find. Try searching on the item number for the hair bow or something like that.
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: [Question] About STB files

Postby cedricyooo on Mon Nov 08, 2010 10:01 am

I know they are on charserver I modified the charpackets.cpp which is in CharServer folder and well it didn't made me get new start items :S
cedricyooo
Little soul
Little soul
 
Posts: 6
Joined: Sat Nov 06, 2010 8:36 am

Re: [Question] About STB files

Postby MightyKai on Mon Nov 08, 2010 11:44 am

cedricyooo wrote:I know they are on charserver I modified the charpackets.cpp which is in CharServer folder and well it didn't made me get new start items :S


if you want new start items it's in INIT_AVATAR.STB
Consultation en ligne viagrasansordonnancefr.com pharmacie de Paris
MightyKai
Antares
Antares
 
Posts: 335
Joined: Mon May 24, 2010 7:34 pm

Re: [Question] About STB files

Postby PurpleYouko on Mon Nov 08, 2010 3:36 pm

MightyKai wrote:
cedricyooo wrote:I know they are on charserver I modified the charpackets.cpp which is in CharServer folder and well it didn't made me get new start items :S


if you want new start items it's in INIT_AVATAR.STB


Except the osrose servers don't actually read that. :lol:

I wondered about actually incorporating that STB but in the end it didn't seem worth the hassle to code it.
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: [Question] About STB files

Postby PurpleYouko on Mon Nov 08, 2010 3:46 pm

cedricyooo wrote:Edit: "I made it" :) but now I have another question <.< sucks to be a newbie :<...Ok the thing is I looked at this thread http://forum.dev-osrose.com/viewtopic.php?f=18&t=2842&p=32531&hilit=charserver#p32531 and manage to modify the charpackets.cpp this is what I did:

  1. if(!DB->QExecute("INSERT INTO characters (account_name, char_name, face, hairStyle, sex) VALUES('%s','%s',%i,%i,%i)", thisclient->username, newname.c_str(), face, hairstyle, sex))
  2.        return false;
  3.     unsigned int mid = (unsigned)mysql_insert_id( DB->Mysql );    
  4.     MYSQL_ROW row;
  5.     if(!DB->QExecute("INSERT INTO items VALUES(%i,151,2,9,120,100,2,1,0,1,0,0)", mid))
  6.         return false;
  7.     if(!DB->QExecute("INSERT INTO items VALUES(%i,151,3,9,120,100,3,1,0,1,0,0)", mid))
  8.         return false;
  9.     if(!DB->QExecute("INSERT INTO items VALUES(%i,151,4,9,120,100,5,1,0,1,0,0)", mid))
  10.         return false;
  11.     if(!DB->QExecute("INSERT INTO items VALUES(%i,151,5,9,120,100,6,1,0,1,0,0)", mid))
  12.         return false;
  13.     if(!DB->QExecute("INSERT INTO items VALUES(%i,161,8,9,120,100,7,1,0,1,0,0)", mid))
  14.         return false;
  15.     if(!DB->QExecute("INSERT INTO items VALUES(%i,162,1,9,120,100,1,1,0,1,0,0)", mid))
  16.         return false;
  17.     if(!DB->QExecute("INSERT INTO items VALUES(%i,764,6,9,120,100,4,1,0,1,0,0)", mid))
  18.         return false;
  19.     if(sex==0)
  20.     {
  21.         if(!DB->QExecute("INSERT INTO items VALUES(%i,222,2,0,40,100,12,1,0,0,0,0)", mid))
  22.             return false;
  23.          }
  24.     else
  25.     {
  26.         if(!DB->QExecute("INSERT INTO items VALUES(%i,221,2,0,40,100,12,1,0,0,0,0)", mid))
  27.             return false;
  28.          } 
  29.     STARTPACKET( pak, 0x0713, 8 );
  30.     SETWORD    ( pak, 0x00,   0 );
  31.     thisclient->SendPacket( &pak );
  32.  
  33.     return true;
  34. }


However this doesn't make me get new items when I create a new char it still gets the visitor and sword =/ any clues what's happening?


OK I had a good look at your code.
It should be working by the looks of it.

The only way it can still be giving new characters the normal items is if the code in the compiled charserver is set to do that.
If you are still getting the same normal items then the only possible reasons would be that you either
a) didn't recompile the charserver after making changes
b) or are running the wrong charserver version. (i.e. not the one you just modified)



The only potential problems i see with your code is that you are assigning a durability value of greater than 100. I'm not sure if the server is able to handle numbers bigger than 100. Even so that should not stop it from writing the values to the database when a new character is created.
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: [Question] About STB files

Postby MightyKai on Mon Nov 08, 2010 4:27 pm

PurpleYouko wrote:
MightyKai wrote:
cedricyooo wrote:I know they are on charserver I modified the charpackets.cpp which is in CharServer folder and well it didn't made me get new start items :S


if you want new start items it's in INIT_AVATAR.STB


Except the osrose servers don't actually read that. :lol:

I wondered about actually incorporating that STB but in the end it didn't seem worth the hassle to code it.



thats why it still does not work here after 3 years :D :D :D
Consultation en ligne viagrasansordonnancefr.com pharmacie de Paris
MightyKai
Antares
Antares
 
Posts: 335
Joined: Mon May 24, 2010 7:34 pm


Return to Question Zone

Who is online

Users browsing this forum: No registered users and 6 guests