|
You last visited: Today at 09:22
Advertisement
[Help Thread] Please post your questions here.
Discussion on [Help Thread] Please post your questions here. within the Rappelz Private Server forum part of the Rappelz category.
04/10/2015, 19:01
|
#4441
|
elite*gold: 0
Join Date: Jul 2014
Posts: 8
Received Thanks: 0
|
Quote:
Originally Posted by thndr
You need to correct your billing SMPs you should refer to the 9.1 guide I am not sure if you are running the 9.1 release but the guide has the billing fixes posted in it.
|
i am using the 9.1 files from revoultion
i used the fixes and the same problem
i tryed the telecaster from ismoke but it should have sql 2014 installed and i tryed installing it but it keep crashes every time i run the install -_-"
|
|
|
04/10/2015, 20:04
|
#4442
|
elite*gold: 0
Join Date: Nov 2011
Posts: 127
Received Thanks: 12
|
what the titles code ?
|
|
|
04/10/2015, 20:12
|
#4443
|
Moderator
elite*gold: 1
Join Date: Dec 2012
Posts: 4,912
Received Thanks: 1,490
|
Quote:
Originally Posted by zackfire96
i am using the 9.1 files from revoultion
i used the fixes and the same problem
i tryed the telecaster from ismoke but it should have sql 2014 installed and i tryed installing it but it keep crashes every time i run the install -_-"
|
Well the is definitely something wrong with your dbo.smp_check_purchased_item
|
|
|
04/10/2015, 20:32
|
#4444
|
elite*gold: 27
Join Date: Dec 2013
Posts: 54
Received Thanks: 8
|
Cane some 1 help me i get this error when i login to my server.
DB COM ERROR : DB_EULAAccept : Die gespeicherte Prozedur 'dbo.web_nflavor_accept' wurde nicht gefunden.
and when i login i see from my friends acc the character and he mine O.o ?
|
|
|
04/10/2015, 22:44
|
#4445
|
elite*gold: 0
Join Date: Aug 2014
Posts: 83
Received Thanks: 17
|
i need some help with telnet for captain 9.1
the connection is successful but when i send command
it response "invalid command... " i tried every thing
and look for some topic here in epvp but nothing help
here is sample of command: #notice("WELCOME")
----------------------
note that nothing on captin herlock appear not even a wrong message
when i work on S:console._password
but when i try to connect using N:io.port
the telnet response will be login failed and
invalid message appear on captin herlock
|
|
|
04/10/2015, 23:48
|
#4446
|
elite*gold: 0
Join Date: Oct 2012
Posts: 130
Received Thanks: 13
|
Quote:
Originally Posted by sapir619
monster_type
You can use this method for the old pets (not soul pet).
For soul pets you should use one of the following commands:
1.insert_summon_by_monster_id(monster_id)
2.insert_summon_by_summon_id(summon_id)
Or simply download SoulPetHelper.exe from here:

|
thanks mate , i'll use
insert_summon_by_summon_id(summon_id)
to skip any errors at all
|
|
|
04/11/2015, 09:41
|
#4447
|
elite*gold: 0
Join Date: Feb 2013
Posts: 119
Received Thanks: 13
|
hey guys , i have an Accounts Manager .php script ..
i don't now how to configuring it ...
there is Database name " Login Data" , i don't now where it must be @@ in sql or some php admin.
and is a connection in the script's for the data i think "Login Data"
1- $DB_connect_this ->connect("127.0.0.1","root","adskasu1564-","shop");
i think it some php data connection cos the (root)
I hop if any one now something about " how to configuring the Loging Data " tell me@@
regards
|
|
|
04/12/2015, 11:25
|
#4448
|
elite*gold: 0
Join Date: Oct 2011
Posts: 84
Received Thanks: 12
|
Quote:
Originally Posted by Aigens1337
Cane some 1 help me i get this error when i login to my server.
DB COM ERROR : DB_EULAAccept : Die gespeicherte Prozedur 'dbo.web_nflavor_accept' wurde nicht gefunden.
and when i login i see from my friends acc the character and he mine O.o ?
|
Auth db -- account table -- result change its value to 1
Quote:
|
and when i login i see from my friends acc the character and he mine O.o
|
check the account_id
|
|
|
04/12/2015, 16:32
|
#4449
|
elite*gold: 0
Join Date: May 2010
Posts: 85
Received Thanks: 15
|
Hello all,
Wondering whats the way to disable consuming fairy's lock upon death? I have sat the server PK to 0, still consumes it upon death. Any ideas?
Thanks,
|
|
|
04/13/2015, 14:45
|
#4450
|
elite*gold: 0
Join Date: Aug 2010
Posts: 9
Received Thanks: 2
|
Hi, I need help regarding my noob question. I tried search function but still can't find the answer
Just finish installing rappelz 8.1 offline and have questions below :
1. Change items sold by NPC (ex : NPC at rondo sell Empty E-Angel instead of food) ?
2. Change probability of Taming Creature (ex : taming Angel from 0,1% to 100% success) ?
3. Make NPC sell items at cash shop (ex : NPC at rondo sell Wings, Decorative items etc) ?
4. How to change pet skill (ex : Angel can use Kenta's unity)?
5. Do I need to edit those database via SQL Server Management Studio ?
Thanks a lot before, and please bear with me since I'm not too good with this programming stuff
|
|
|
04/13/2015, 15:09
|
#4451
|
elite*gold: 0
Join Date: Oct 2010
Posts: 2,555
Received Thanks: 2,460
|
1) MarketResource
2) MonsterResource
3) MarketResource/LUA
4) SkillResource / JPResource / SkillTreeResource
5)
My friend, a big part of working in this community is showing initiative, if you can't be bothered to search some threads and google for a bit of info, you're pretty much screwed. GL.
|
|
|
04/13/2015, 15:17
|
#4452
|
Moderator
elite*gold: 1
Join Date: Dec 2012
Posts: 4,912
Received Thanks: 1,490
|
Quote:
Originally Posted by stivenson2005
Hello all,
Wondering whats the way to disable consuming fairy's lock upon death? I have sat the server PK to 0, still consumes it upon death. Any ideas?
Thanks,
|
If you have set the server to a non hardcore PK server then why do you still need the fairy's locks?
Quote:
Originally Posted by werrior
Hi, I need help regarding my noob question. I tried search function but still can't find the answer
Just finish installing rappelz 8.1 offline and have questions below :
1. Change items sold by NPC (ex : NPC at rondo sell Empty E-Angel instead of food) ?
2. Change probability of Taming Creature (ex : taming Angel from 0,1% to 100% success) ?
3. Make NPC sell items at cash shop (ex : NPC at rondo sell Wings, Decorative items etc) ?
4. How to change pet skill (ex : Angel can use Kenta's unity)?
5. Do I need to edit those database via SQL Server Management Studio ?
Thanks a lot before, and please bear with me since I'm not too good with this programming stuff 
|
1. Enter the items in market resource to a market that the NPC opens. You should really take a look at the old guide for custom NPCs. The tools may not be valid anymore but the steps to make it happen will be.
2. Change the taming chance in the monster database for the monsters you want to increase. 1.00 is 100 %. You may need to resource the db_monster.rdb for the client resource folder. You should also read the old guide on resourcing, again the tools may not apply anymore but you will at least begin to understand the relationship between the SQL database and the clients...
3. The easiest way is to make an NPC open the cash shop market used on the KTS I think it is called crush_shop, but you can also add all of your cash shop items you would like available to a market in the dbo.MarketResource and then make an NPC open the market. Again refer to the old custom NPC guide. GMs with permission 100 can just use the command //open_market 'market_name_here'
4. A little more complicated but you will need to look at the skill databases and see how they are set up.
5. Refer to the guide "resourcing for dummies" If you change things in the database you will need to define the change in the clients RDB files.
|
|
|
04/14/2015, 05:33
|
#4453
|
elite*gold: 0
Join Date: Aug 2010
Posts: 9
Received Thanks: 2
|
Quote:
Originally Posted by thndr
If you have set the server to a non hardcore PK server then why do you still need the fairy's locks?
1. Enter the items in market resource to a market that the NPC opens. You should really take a look at the old guide for custom NPCs. The tools may not be valid anymore but the steps to make it happen will be.
2. Change the taming chance in the monster database for the monsters you want to increase. 1.00 is 100 %. You may need to resource the db_monster.rdb for the client resource folder. You should also read the old guide on resourcing, again the tools may not apply anymore but you will at least begin to understand the relationship between the SQL database and the clients...
3. The easiest way is to make an NPC open the cash shop market used on the KTS I think it is called crush_shop, but you can also add all of your cash shop items you would like available to a market in the dbo.MarketResource and then make an NPC open the market. Again refer to the old custom NPC guide. GMs with permission 100 can just use the command //open_market 'market_name_here'
4. A little more complicated but you will need to look at the skill databases and see how they are set up.
5. Refer to the guide "resourcing for dummies" If you change things in the database you will need to define the change in the clients RDB files.
|
Thanks a lot, that's really clear explanation for me
To be honest I don't really get how to do RDB files so what I did is to edit those databases using SQL management Studio Directly.
One more question, it seems I altered too much on the SkillResources and ItemResources. Any Idea how to restore only those two ? (I have unmodified arcadia8_1.bak as back-up)
or I have no choice but to delete the entire Arcadia database and re-restore all of it again ?
Thank you
|
|
|
04/14/2015, 12:59
|
#4454
|
Moderator
elite*gold: 1
Join Date: Dec 2012
Posts: 4,912
Received Thanks: 1,490
|
Quote:
Originally Posted by werrior
To be honest I don't really get how to do RDB files so what I did is to edit those databases using SQL management Studio Directly.
|
That's why I linked the resourcing guide, so you can choose for yourself to learn how to do it. The guide will show you the way. Not everything will show through to the client unless you create the associative RDB file to define it.
Quote:
Originally Posted by werrior
One more question, it seems I altered too much on the SkillResources and ItemResources. Any Idea how to restore only those two ? (I have unmodified arcadia8_1.bak as back-up)
|
You will need to restore to your last database back up. You can do a little bit of work, test the work and then create your own new updated back up files.
|
|
|
04/14/2015, 15:00
|
#4455
|
elite*gold: 0
Join Date: Oct 2010
Posts: 2,555
Received Thanks: 2,460
|
This is why before I edit a table I will script a backup .sql of it so that I can just restore to that data in the event something goes wrong.
As my previous guide says, reading .rdb is easy
Header: TOTAL 128 BYTES
Header-Date: TOTAL 8 of the first 128 Bytes
Header-Padding: TOTAL 120 of the first 128 Bytes
File-Row Count: First four bytes after 128 Byte Header
First Column/Field (commonly id) = 2 Bytes [INT16] / 4 Bytes [INT32/Single] / 8 Bytes [INT64/Double]
Second Column Field
and so on to last column/field
at which point the next row will start with it's first column/field (commonly id)
This file will repeat this row read process to the end of the file
OLD ACRM Based Example (db_monster):
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;
namespace ACRM
{
public class DB_MONSTERRESOURCE_62
{
public Int32 id { get; set; }
public Int32 monster_group { get; set; }
public Int32 name_id { get; set; }
public Int32 location_id { get; set; }
public String model { get; set; }
public Int32 motion_file_id { get; set; }
public Int32 transform_level { get; set; }
public Int32 walk_type { get; set; }
public Int32 slant_type { get; set; }
public Single size { get; set; }
public Single scale { get; set; }
public Single target_fx_size { get; set; }
public Int32 camera_x { get; set; }
public Int32 camera_y { get; set; }
public Int32 camera_z { get; set; }
public Single target_x { get; set; }
public Single target_y { get; set; }
public Single target_z { get; set; }
public Int32 level { get; set; }
public Int32 grp { get; set; }
public Int32 magic_type { get; set; }
public Int32 race { get; set; }
public Int32 visible_range { get; set; }
public Int32 chase_range { get; set; }
public Int32 f_fisrt_attack { get; set; }
public Int32 f_group_first_attack { get; set; }
public Int32 f_response_casting { get; set; }
public Int32 f_response_race { get; set; }
public Int32 f_response_battle { get; set; }
public Int32 monster_type { get; set; }
public Int32 stat_id { get; set; }
public Int32 fight_type { get; set; }
public Int32 monster_skill_link_id { get; set; }
public Int32 material { get; set; }
public Int32 weapon_type { get; set; }
public Int32 attack_motion_speed { get; set; }
public Int32 ability { get; set; }
public Int32 standard_walk_spped { get; set; }
public Int32 standard_run_spped { get; set; }
public Int32 walk_speed { get; set; }
public Int32 run_speed { get; set; }
public Decimal attack_range { get; set; }
public Decimal hidesense_range { get; set; }
public Int32 hp { get; set; }
public Int32 mp { get; set; }
public Int32 attack_point { get; set; }
public Int32 magic_point { get; set; }
public Int32 defence { get; set; }
public Int32 magic_defence { get; set; }
public Int32 attack_speed { get; set; }
public Int32 magic_speed { get; set; }
public Int32 accuracy { get; set; }
public Int32 avoid { get; set; }
public Int32 magic_accuracy { get; set; }
public Int32 magic_avoid { get; set; }
public Int32 taming_id { get; set; }
public Single taming_percentage { get; set; }
public Single taming_exp_mod { get; set; }
public Int32 exp { get; set; }
public Int32 jp { get; set; }
public Int32 gold_drop_percentage { get; set; }
public Int32 gold_min { get; set; }
public Int32 gold_max { get; set; }
public Int32 chaos_drop_percentage { get; set; }
public Int32 chaos_min { get; set; }
public Int32 chaos_max { get; set; }
public Int32 exp_2 { get; set; }
public Int32 jp_2 { get; set; }
public Int32 gold_min_2 { get; set; }
public Int32 gold_max_2 { get; set; }
public Int32 chaos_min_2 { get; set; }
public Int32 chaos_max_2 { get; set; }
public Int32 drop_table_link_id { get; set; }
public Int32 texture_group { get; set; }
public Int32 local_flag { get; set; }
public String script_on_dead { get; set; }
public void ReadFile(BinaryReader br)
{
this.id = ACRM_SCRAMBLE_MAP.bits_descramble(br.ReadInt32());
this.monster_group = br.ReadInt32();
this.monster_type = br.ReadInt32();
this.name_id = br.ReadInt32();
this.location_id = br.ReadInt32();
this.race = br.ReadInt32();
this.grp = br.ReadInt32();
this.transform_level = br.ReadInt32();
this.level = br.ReadInt32();
this.size = br.ReadSingle();
this.scale = br.ReadSingle();
this.target_fx_size = br.ReadSingle();
this.walk_type = br.ReadInt32();
this.slant_type = br.ReadInt32();
this.visible_range = br.ReadInt32();
this.chase_range = br.ReadInt32();
this.magic_type = br.ReadInt32();
Int32 f = br.ReadInt32();
this.f_fisrt_attack = (f & 1);
this.f_group_first_attack = (f & 2) >> 1;
this.f_response_casting = (f & 4) >> 2;
this.f_response_race = (f & 8) >> 3;
this.f_response_battle = (f & 16) >> 4;
this.hp = br.ReadInt32();
this.mp = br.ReadInt32();
this.attack_point = br.ReadInt32();
this.magic_point = br.ReadInt32();
this.defence = br.ReadInt32();
this.magic_defence = br.ReadInt32();
this.attack_speed = br.ReadInt32();
br.ReadInt32(); // const 15662004
this.magic_speed = br.ReadInt32();
this.accuracy = br.ReadInt32();
this.avoid = br.ReadInt32();
this.magic_accuracy = br.ReadInt32();
this.magic_avoid = br.ReadInt32();
this.taming_id = br.ReadInt32();
this.taming_percentage = br.ReadSingle();
this.taming_exp_mod = br.ReadSingle();
this.exp = br.ReadInt32();
this.jp = br.ReadInt32();
this.monster_skill_link_id = br.ReadInt32();
this.stat_id = br.ReadInt32();
this.ability = br.ReadInt32();
this.standard_walk_spped = br.ReadInt32();
this.standard_run_spped = br.ReadInt32();
this.walk_speed = br.ReadInt32();
this.run_speed = br.ReadInt32();
this.attack_range = Convert.ToDecimal(br.ReadInt32()) / 100;
this.hidesense_range = Convert.ToDecimal(br.ReadInt32()) / 100;
this.gold_drop_percentage = br.ReadInt32();
this.gold_min = br.ReadInt32();
this.gold_max = br.ReadInt32();
this.chaos_drop_percentage = br.ReadInt32();
this.chaos_min = br.ReadInt32();
this.chaos_max = br.ReadInt32();
this.exp_2 = br.ReadInt32();
this.jp_2 = br.ReadInt32();
this.gold_min_2 = br.ReadInt32();
this.gold_max_2 = br.ReadInt32();
this.chaos_min_2 = br.ReadInt32();
this.chaos_max_2 = br.ReadInt32();
this.drop_table_link_id = br.ReadInt32();
this.texture_group = br.ReadInt32();
this.local_flag = br.ReadInt32();
this.model = ACRM_BYTE_CONVERTER.BytesToString(br.ReadBytes(256));
this.motion_file_id = br.ReadInt32();
this.weapon_type = br.ReadInt32();
this.camera_x = br.ReadInt32();
this.camera_y = br.ReadInt32();
this.camera_z = br.ReadInt32();
this.target_x = br.ReadSingle();
this.target_y = br.ReadSingle();
this.target_z = br.ReadSingle();
this.material = br.ReadInt32();
this.attack_motion_speed = br.ReadInt32();
this.fight_type = br.ReadInt32();
this.script_on_dead = "";
}
public void SaveFile(BinaryWriter bw)
{
bw.Write(this.mobidconvert(this.id.ToString()));
bw.Write(this.monster_group);
bw.Write(this.monster_type);
bw.Write(this.name_id);
bw.Write(this.location_id);
bw.Write(this.race);
bw.Write(this.grp);
bw.Write(this.transform_level);
bw.Write(this.level);
bw.Write(this.size);
bw.Write(this.scale);
bw.Write(this.target_fx_size);
bw.Write(this.walk_type);
bw.Write(this.slant_type);
bw.Write(this.visible_range);
bw.Write(this.chase_range);
bw.Write(this.magic_type);
Int32 f = 0;
if (f_fisrt_attack != 0) f |= 1;
if (f_group_first_attack != 0) f |= 2;
if (f_response_casting != 0) f |= 4;
if (f_response_race != 0) f |= 8;
if (f_response_battle != 0) f |= 16;
bw.Write(f);
bw.Write(this.hp);
bw.Write(this.mp);
bw.Write(this.attack_point);
bw.Write(this.magic_point);
bw.Write(this.defence);
bw.Write(this.magic_defence);
bw.Write(this.attack_speed);
bw.Write(Convert.ToInt32(15662004));
bw.Write(this.magic_speed);
bw.Write(this.accuracy);
bw.Write(this.avoid);
bw.Write(this.magic_accuracy);
bw.Write(this.magic_avoid);
bw.Write(this.taming_id);
bw.Write(this.taming_percentage);
bw.Write(this.taming_exp_mod);
bw.Write(this.exp);
bw.Write(this.jp);
bw.Write(this.monster_skill_link_id);
bw.Write(this.stat_id);
bw.Write(this.ability);
bw.Write(this.standard_walk_spped);
bw.Write(this.standard_run_spped);
bw.Write(this.walk_speed);
bw.Write(this.run_speed);
bw.Write(Convert.ToInt32(attack_range) * 100);
bw.Write(Convert.ToInt32(hidesense_range) * 100);
bw.Write(this.gold_drop_percentage);
bw.Write(this.gold_min);
bw.Write(this.gold_max);
bw.Write(this.chaos_drop_percentage);
bw.Write(this.chaos_min);
bw.Write(this.chaos_max);
bw.Write(this.exp_2);
bw.Write(this.jp_2);
bw.Write(this.gold_min_2);
bw.Write(this.gold_max_2);
bw.Write(this.chaos_min_2);
bw.Write(this.chaos_max_2);
bw.Write(this.drop_table_link_id);
bw.Write(this.texture_group);
bw.Write(this.local_flag);
bw.Write(ACRM_BYTE_CONVERTER.StringToBytes(this.model));
bw.Write(new Byte[256 - this.model.Length]);
bw.Write(this.motion_file_id);
bw.Write(this.weapon_type);
bw.Write(this.camera_x);
bw.Write(this.camera_y);
bw.Write(this.camera_z);
bw.Write(this.target_x);
bw.Write(this.target_y);
bw.Write(this.target_z);
bw.Write(this.material);
bw.Write(this.attack_motion_speed);
bw.Write(this.fight_type);
}
private Int32 mobidconvert(string id)
{
int[] encodeMap = new int[32] { 4, 21, 1, 18, 11, 26, 5, 0, 3, 31, 2, 27, 20, 13, 24, 14, 6, 8, 7, 9, 15, 17, 19, 29, 12, 10, 23, 30, 16, 22, 25, 28 };
int[] decodeMap = new int[32];
int i;
int[] decode = new int[32];
decode = GetIntBitArray((Convert.ToInt32(id)));
for (i = 0; i < 32; i++)
decodeMap[encodeMap[i]] = decode[i];
Int32 checkmobid = GetBitArrayInt(decodeMap);
return checkmobid;
}
private int GetBitArrayInt(int[] n)
{
string abc = null;
for (int i = 0; i < 32; i++)
abc = abc + n[i].ToString();
return Convert.ToInt32(abc, 2);
}
private static int[] GetIntBitArray(int n)
{
int[] b = new int[32];
int pos = 31;
int i = 0;
while (i < 32)
{
if ((n & (1 << i)) != 0)
{
b[pos] = 1;
}
else
{
b[pos] = 0;
}
pos--;
i++;
}
string abc = null;
for (int k = 0; k < 32; k++)
abc = abc + b[k].ToString();
//MessageBox.Show(abc);
return b;
}
public string ToDatabase()
{
return "INSERT [dbo].[MonsterResource] ([id], [monster_group], [name_id], [location_id], [model], [motion_file_id], [transform_level], [walk_type], [slant_type], [size], [scale], [target_fx_size], [camera_x], [camera_y], [camera_z], [target_x], [target_y], [target_z], [level], [grp], [magic_type], [race], [visible_range], [chase_range], [f_fisrt_attack], [f_group_first_attack], [f_response_casting], [f_response_race], [f_response_battle], [monster_type], [stat_id], [fight_type], [monster_skill_link_id], [material], [weapon_type], [attack_motion_speed], [ability], [standard_walk_spped], [standard_run_spped], [walk_speed], [run_speed], [attack_range], [hidesense_range], [hp], [mp], [attack_point], [magic_point], [defence], [magic_defence], [attack_speed], [magic_speed], [accuracy], [avoid], [magic_accuracy], [magic_avoid], [taming_id], [taming_percentage], [taming_exp_mod], [exp], [jp], [gold_drop_percentage], [gold_min], [gold_max], [chaos_drop_percentage], [chaos_min], [chaos_max], [exp_2], [jp_2], [gold_min_2], [gold_max_2], [chaos_min_2], [chaos_max_2], [drop_table_link_id], [texture_group], [local_flag], [script_on_dead]) VALUES ( @Pid, @Pmonster_group, @Pname_id, @Plocation_id, @Pmodel, @Pmotion_file_id, @Ptransform_level, @Pwalk_type, @Pslant_type, @Psize, @Pscale, @Ptarget_fx_size, @Pcamera_x, @Pcamera_y, @Pcamera_z, @Ptarget_x, @Ptarget_y, @Ptarget_z, @Plevel, @Pgrp, @Pmagic_type, @Prace, @Pvisible_range, @Pchase_range, @Pf_fisrt_attack, @Pf_group_first_attack, @Pf_response_casting, @Pf_response_race, @Pf_response_battle, @Pmonster_type, @Pstat_id, @Pfight_type, @Pmonster_skill_link_id, @Pmaterial, @Pweapon_type, @Pattack_motion_speed, @Pability, @Pstandard_walk_spped, @Pstandard_run_spped, @Pwalk_speed, @Prun_speed, @Pattack_range, @Phidesense_range, @Php, @Pmp, @Pattack_point, @Pmagic_point, @Pdefence, @Pmagic_defence, @Pattack_speed, @Pmagic_speed, @Paccuracy, @Pavoid, @Pmagic_accuracy, @Pmagic_avoid, @Ptaming_id, @Ptaming_percentage, @Ptaming_exp_mod, @Pexp, @Pjp, @Pgold_drop_percentage, @Pgold_min, @Pgold_max, @Pchaos_drop_percentage, @Pchaos_min, @Pchaos_max, @Pexp_2, @Pjp_2, @Pgold_min_2, @Pgold_max_2, @Pchaos_min_2, @Pchaos_max_2, @Pdrop_table_link_id, @Ptexture_group, @Plocal_flag, @Pscript_on_dead )";
}
public static String FromDatabase()
{
String rString = "SELECT ";
foreach (FieldInfo fieldInfo in typeof(DB_MONSTERRESOURCE_62).GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public | BindingFlags.Static))
{
rString += string.Format("[{0}], ", fieldInfo.Name.Substring(1, fieldInfo.Name.IndexOf('>') - 1));
}
return rString.Substring(0, rString.Length - 2) + " FROM MonsterResource";
}
public void FromDatabaseExecute(System.Data.SqlClient.SqlDataReader drExecute)
{
foreach (FieldInfo fieldInfo in typeof(DB_MONSTERRESOURCE_62).GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public | BindingFlags.Static))
{
String sTempName = null;
sTempName = fieldInfo.Name.Substring(1, fieldInfo.Name.IndexOf('>') - 1);
if (fieldInfo.FieldType == typeof(String))
{
fieldInfo.SetValue(this, drExecute[sTempName].ToString());
}
else if (fieldInfo.FieldType == typeof(Int16))
{
fieldInfo.SetValue(this, Convert.ToInt16(drExecute[sTempName]));
}
else if (fieldInfo.FieldType == typeof(Int32))
{
fieldInfo.SetValue(this, Convert.ToInt32(drExecute[sTempName]));
}
else if (fieldInfo.FieldType == typeof(Single))
{
fieldInfo.SetValue(this, Convert.ToSingle(drExecute[sTempName]));
}
else if (fieldInfo.FieldType == typeof(Decimal))
{
fieldInfo.SetValue(this, Convert.ToDecimal(drExecute[sTempName]));
}
else if (fieldInfo.FieldType == typeof(Double))
{
fieldInfo.SetValue(this, Convert.ToDouble(drExecute[sTempName]));
}
else if (fieldInfo.FieldType == typeof(Byte))
{
fieldInfo.SetValue(this, Convert.ToByte(drExecute[sTempName]));
}
}
}
}
}
|
|
|
Similar Threads
|
[Helping Topic] 24/7 Helping Services!
08/27/2008 - EO PServer Hosting - 31 Replies
stucked on anything while setuping your server?
post your problem here and you will get answer as fast as possible better than spamming with posts :cool:
first of all try reading Ahmedpotop's Pserver All thing guide.
if your couldn't solve it out post your problem down here
""That includes PHP rankings pages / registrations pages / Status pages""
|
All times are GMT +1. The time now is 09:25.
|
|