Guest User

l2world up

a guest
Mar 19th, 2013
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 53.78 KB | None | 0 0
  1. USE lin2world
  2. GO
  3.  
  4. ALTER  TABLE user_data ADD
  5.     aio_data INT NOT NULL DEFAULT 0
  6. GO
  7.  
  8. USE lin2world
  9. GO
  10.  
  11. IF EXISTS (SELECT 1
  12.     FROM INFORMATION_SCHEMA.TABLES
  13.     WHERE TABLE_NAME='BuffList')
  14.         DROP TABLE BuffList
  15.  
  16. GO
  17.  
  18. CREATE TABLE BuffList(
  19.     char_id INT NOT NULL,
  20.     summon INT NOT NULL DEFAULT 0,
  21.     subjob_idx INT NOT NULL DEFAULT 0,
  22.     b0 INT NOT NULL DEFAULT 0,
  23.     b1 INT NOT NULL DEFAULT 0,
  24.     b2 INT NOT NULL DEFAULT 0,
  25.     b3 INT NOT NULL DEFAULT 0,
  26.     b4 INT NOT NULL DEFAULT 0,
  27.     b5 INT NOT NULL DEFAULT 0,
  28.     b6 INT NOT NULL DEFAULT 0,
  29.     b7 INT NOT NULL DEFAULT 0,
  30.     b8 INT NOT NULL DEFAULT 0,
  31.     b9 INT NOT NULL DEFAULT 0,
  32.     b10 INT NOT NULL DEFAULT 0,
  33.     b11 INT NOT NULL DEFAULT 0,
  34.     b12 INT NOT NULL DEFAULT 0,
  35.     b13 INT NOT NULL DEFAULT 0,
  36.     b14 INT NOT NULL DEFAULT 0,
  37.     b15 INT NOT NULL DEFAULT 0,
  38.     b16 INT NOT NULL DEFAULT 0,
  39.     b17 INT NOT NULL DEFAULT 0,
  40.     b18 INT NOT NULL DEFAULT 0,
  41.     b19 INT NOT NULL DEFAULT 0,
  42.     b20 INT NOT NULL DEFAULT 0,
  43.     b21 INT NOT NULL DEFAULT 0,
  44.     b22 INT NOT NULL DEFAULT 0,
  45.     b23 INT NOT NULL DEFAULT 0,
  46.     b24 INT NOT NULL DEFAULT 0,
  47.     b25 INT NOT NULL DEFAULT 0,
  48.     b26 INT NOT NULL DEFAULT 0,
  49.     b27 INT NOT NULL DEFAULT 0,
  50.     b28 INT NOT NULL DEFAULT 0,
  51.     b29 INT NOT NULL DEFAULT 0,
  52.     b30 INT NOT NULL DEFAULT 0,
  53.     b31 INT NOT NULL DEFAULT 0,
  54.     b32 INT NOT NULL DEFAULT 0,
  55.     b33 INT NOT NULL DEFAULT 0,
  56.     b34 INT NOT NULL DEFAULT 0,
  57.     b35 INT NOT NULL DEFAULT 0,
  58.     b36 INT NOT NULL DEFAULT 0,
  59.     b37 INT NOT NULL DEFAULT 0,
  60.     b38 INT NOT NULL DEFAULT 0,
  61.     b39 INT NOT NULL DEFAULT 0
  62.     )
  63. GO
  64.  
  65. USE [lin2world]
  66. GO
  67.  
  68. ALTER TABLE [user_item] ADD
  69.     donated tinyint NOT NULL DEFAULT 0
  70. GO
  71.  
  72. USE lin2world
  73. GO
  74.  
  75. ALTER  TABLE user_data ADD
  76.     ST_hair_deco INT NOT NULL DEFAULT 0,
  77.     ST_hair_all INT NOT NULL DEFAULT 0
  78. GO
  79.  
  80. USE lin2world
  81. GO
  82.  
  83. IF EXISTS (SELECT 1
  84.     FROM sys.procedures
  85.     WHERE [name]='lin_AddKillDeathStat')
  86.         DROP PROCEDURE lin_AddKillDeathStat
  87. GO
  88.  
  89. IF EXISTS (SELECT 1
  90.     FROM INFORMATION_SCHEMA.TABLES
  91.     WHERE TABLE_NAME='KillDeathStat')
  92.         DROP TABLE KillDeathStat
  93. GO
  94.  
  95. CREATE TABLE KillDeathStat(
  96.     victim_id INT NOT NULL,
  97.     victim_class_id INT NOT NULL DEFAULT 0,
  98.     victim_level INT NOT NULL DEFAULT 0,
  99.     killer_id INT NOT NULL,
  100.     killer_class_id INT NOT NULL DEFAULT 0,
  101.     killer_level INT NOT NULL DEFAULT 0,
  102.     killer_hp INT NOT NULL DEFAULT 0,
  103.     killer_max_hp INT NOT NULL DEFAULT 0,
  104.     killer_cp INT NOT NULL DEFAULT 0,
  105.     killer_max_cp INT NOT NULL DEFAULT 0,
  106.     x INT NOT NULL DEFAULT 0,
  107.     y INT NOT NULL DEFAULT 0,
  108.     z INT NOT NULL DEFAULT 0,
  109.     pvp INT NOT NULL DEFAULT 0,
  110.     skill_id INT NOT NULL DEFAULT 0,
  111.     skill_level INT NOT NULL DEFAULT 0,
  112.     death_time INT NOT NULL DEFAULT 0
  113.     )
  114. GO
  115.  
  116. CREATE PROCEDURE lin_AddKillDeathStat
  117.     @victim_id AS INT,
  118.     @victim_class_id AS INT,
  119.     @victim_level AS INT,
  120.     @killer_id AS INT,
  121.     @killer_class_id AS INT,
  122.     @killer_level AS INT,
  123.     @killer_hp AS INT,
  124.     @killer_max_hp AS INT,
  125.     @killer_cp AS INT,
  126.     @killer_max_cp AS INT,
  127.     @x AS INT,
  128.     @y AS INT,
  129.     @z AS INT,
  130.     @pvp AS INT,
  131.     @skill_id AS INT,
  132.     @skill_level AS INT,
  133.     @death_time AS INT
  134. AS
  135. BEGIN
  136.  
  137.     SET NOCOUNT ON;
  138.  
  139.     INSERT INTO KillDeathStat( victim_id, victim_class_id, victim_level, killer_id, killer_class_id, killer_level, killer_hp, killer_max_hp, killer_cp, killer_max_cp, x, y, z, pvp, skill_id, skill_level, death_time)
  140.     VALUES ( @victim_id, @victim_class_id, @victim_level, @killer_id, @killer_class_id, @killer_level, @killer_hp, @killer_max_hp, @killer_cp, @killer_max_cp, @x, @y, @z, @pvp, @skill_id, @skill_level, @death_time )
  141.  
  142. END
  143. GO
  144.  
  145. USE lin2world
  146. GO
  147.  
  148. CREATE TABLE PrivateStore(
  149.     char_id INT NOT NULL,
  150.     store_type INT NULL,
  151.     x_loc INT NULL,
  152.     y_loc INT NULL,
  153.     z_loc INT NULL,
  154.     is_offline INT NULL,
  155.     item1_id INT NULL,
  156.     item1_count INT NULL,
  157.     item1_price INT NULL,
  158.     item1_enchant INT NULL,
  159.     item2_id INT NULL,
  160.     item2_count INT NULL,
  161.     item2_price INT NULL,
  162.     item2_enchant INT NULL,
  163.     item3_id INT NULL,
  164.     item3_count INT NULL,
  165.     item3_price INT NULL,
  166.     item3_enchant INT NULL,
  167.     item4_id INT NULL,
  168.     item4_count INT NULL,
  169.     item4_price INT NULL,
  170.     item4_enchant INT NULL,
  171.     item5_id INT NULL,
  172.     item5_count INT NULL,
  173.     item5_price INT NULL,
  174.     item5_enchant INT NULL,
  175.     item6_id INT NULL,
  176.     item6_count INT NULL,
  177.     item6_price INT NULL,
  178.     item6_enchant INT NULL,
  179.     item7_id INT NULL,
  180.     item7_count INT NULL,
  181.     item7_price INT NULL,
  182.     item7_enchant INT NULL,
  183.     item8_id INT NULL,
  184.     item8_count INT NULL,
  185.     item8_price INT NULL,
  186.     item8_enchant INT NULL
  187.     )
  188. GO
  189.  
  190. USE [lin2world]
  191. GO
  192. CREATE PROCEDURE lin_UpdatePrivateStore
  193.     @char_id AS INT,
  194.     @store_type AS INT,
  195.     @x_loc AS INT,
  196.     @y_loc AS INT,
  197.     @z_loc AS INT,
  198.     @is_offline AS INT,
  199.     @item1_id AS INT,
  200.     @item1_count AS INT,
  201.     @item1_price AS INT,
  202.     @item1_enchant AS INT,
  203.     @item2_id AS INT,
  204.     @item2_count AS INT,
  205.     @item2_price AS INT,
  206.     @item2_enchant AS INT,
  207.     @item3_id AS INT,
  208.     @item3_count AS INT,
  209.     @item3_price AS INT,
  210.     @item3_enchant AS INT,
  211.     @item4_id AS INT,
  212.     @item4_count AS INT,
  213.     @item4_price AS INT,
  214.     @item4_enchant AS INT,
  215.     @item5_id AS INT,
  216.     @item5_count AS INT,
  217.     @item5_price AS INT,
  218.     @item5_enchant AS INT,
  219.     @item6_id AS INT,
  220.     @item6_count AS INT,
  221.     @item6_price AS INT,
  222.     @item6_enchant AS INT,
  223.     @item7_id AS INT,
  224.     @item7_count AS INT,
  225.     @item7_price AS INT,
  226.     @item7_enchant AS INT,
  227.     @item8_id AS INT,
  228.     @item8_count AS INT,
  229.     @item8_price AS INT,
  230.     @item8_enchant AS INT
  231.  
  232. AS
  233. BEGIN
  234.  
  235.     SET NOCOUNT ON;
  236.  
  237.     UPDATE PrivateStore SET store_type=@store_type, x_loc=@x_loc, y_loc=@y_loc, z_loc=@z_loc, is_offline = @is_offline,
  238.     @item1_id=@item1_id, item1_count=@item1_count, item1_price=@item1_price, item1_enchant=@item1_enchant,
  239.     @item2_id=@item2_id, item2_count=@item2_count, item2_price=@item2_price, item2_enchant=@item2_enchant,
  240.     @item3_id=@item3_id, item3_count=@item3_count, item3_price=@item3_price, item3_enchant=@item3_enchant,
  241.     @item4_id=@item4_id, item4_count=@item4_count, item4_price=@item4_price, item4_enchant=@item4_enchant,
  242.     @item5_id=@item5_id, item5_count=@item5_count, item5_price=@item5_price, item5_enchant=@item5_enchant,
  243.     @item6_id=@item6_id, item6_count=@item6_count, item6_price=@item6_price, item6_enchant=@item6_enchant,
  244.     @item7_id=@item7_id, item7_count=@item7_count, item7_price=@item7_price, item7_enchant=@item7_enchant,
  245.     @item8_id=@item8_id, item8_count=@item8_count, item8_price=@item8_price, item8_enchant=@item8_enchant WHERE char_id = @char_id
  246.    
  247.    
  248.  
  249. END
  250. GO
  251.  
  252. SET ANSI_NULLS ON
  253. GO
  254. SET QUOTED_IDENTIFIER ON
  255. GO
  256. USE [lin2world]
  257. GO
  258. CREATE PROCEDURE lin_DeletePrivateStore
  259.     @char_id AS INT
  260. AS
  261. BEGIN
  262.  
  263.     SET NOCOUNT ON;
  264.  
  265.     DELETE FROM PrivateStore WHERE char_id = @char_id
  266.  
  267. END
  268. GO
  269.  
  270. SET ANSI_NULLS ON
  271. GO
  272. SET QUOTED_IDENTIFIER ON
  273. GO
  274. USE [lin2world]
  275. GO
  276. CREATE PROCEDURE lin_CreatePrivateStore
  277.     @char_id AS INT,
  278.     @store_type AS INT,
  279.     @x_loc AS INT,
  280.     @y_loc AS INT,
  281.     @z_loc AS INT,
  282.     @is_offline AS INT,
  283.     @item1_id AS INT,
  284.     @item1_count AS INT,
  285.     @item1_price AS INT,
  286.     @item1_enchant AS INT,
  287.     @item2_id AS INT,
  288.     @item2_count AS INT,
  289.     @item2_price AS INT,
  290.     @item2_enchant AS INT,
  291.     @item3_id AS INT,
  292.     @item3_count AS INT,
  293.     @item3_price AS INT,
  294.     @item3_enchant AS INT,
  295.     @item4_id AS INT,
  296.     @item4_count AS INT,
  297.     @item4_price AS INT,
  298.     @item4_enchant AS INT,
  299.     @item5_id AS INT,
  300.     @item5_count AS INT,
  301.     @item5_price AS INT,
  302.     @item5_enchant AS INT,
  303.     @item6_id AS INT,
  304.     @item6_count AS INT,
  305.     @item6_price AS INT,
  306.     @item6_enchant AS INT,
  307.     @item7_id AS INT,
  308.     @item7_count AS INT,
  309.     @item7_price AS INT,
  310.     @item7_enchant AS INT,
  311.     @item8_id AS INT,
  312.     @item8_count AS INT,
  313.     @item8_price AS INT,
  314.     @item8_enchant AS INT
  315. AS
  316. BEGIN
  317.  
  318.     SET NOCOUNT ON;
  319.  
  320.     INSERT INTO PrivateStore( char_id, store_type, x_loc, y_loc, z_loc, is_offline,
  321.     item1_id, item1_count, item1_price, item1_enchant,
  322.     item2_id, item2_count, item2_price, item2_enchant,
  323.     item3_id, item3_count, item3_price, item3_enchant,
  324.     item4_id, item4_count, item4_price, item4_enchant,
  325.     item5_id, item5_count, item5_price, item5_enchant,
  326.     item6_id, item6_count, item6_price, item6_enchant,
  327.     item7_id, item7_count, item7_price, item7_enchant,
  328.     item8_id, item8_count, item8_price, item8_enchant )
  329.     VALUES ( @char_id, @store_type, @x_loc, @y_loc, @z_loc, @is_offline,
  330.     @item1_id, @item1_count, @item1_price, @item1_enchant,
  331.     @item2_id, @item2_count, @item2_price, @item2_enchant,
  332.     @item3_id, @item3_count, @item3_price, @item3_enchant,
  333.     @item4_id, @item4_count, @item4_price, @item4_enchant,
  334.     @item5_id, @item5_count, @item5_price, @item5_enchant,
  335.     @item6_id, @item6_count, @item6_price, @item6_enchant,
  336.     @item7_id, @item7_count, @item7_price, @item7_enchant,
  337.     @item8_id, @item8_count, @item8_price, @item8_enchant )
  338.  
  339. END
  340. GO
  341.  
  342. USE [lin2world]
  343. GO
  344.  
  345. ALTER TABLE dbo.user_data ADD
  346.     spirit_count INT NOT NULL DEFAULT 0
  347. GO
  348.  
  349. USE [LIN2WORLD]
  350. GO
  351. /****** Object:  Table [dbo].[user_ActiveSkill]    Script Date: 02/01/2009 23:21:34 ******/
  352. SET ANSI_NULLS ON
  353. GO
  354. SET QUOTED_IDENTIFIER ON
  355. GO
  356. DROP TABLE [dbo].[user_ActiveSkill]
  357. GO
  358. CREATE TABLE [dbo].[user_ActiveSkill](
  359.     [char_id] [INT] NOT NULL,
  360.     [s1] [INT] NULL,
  361.     [l1] [tinyint] NULL,
  362.     [d1] [INT] NULL,
  363.     [s2] [INT] NULL,
  364.     [l2] [tinyint] NULL,
  365.     [d2] [INT] NULL,
  366.     [s3] [INT] NULL,
  367.     [l3] [tinyint] NULL,
  368.     [d3] [INT] NULL,
  369.     [s4] [INT] NULL,
  370.     [l4] [tinyint] NULL,
  371.     [d4] [INT] NULL,
  372.     [s5] [INT] NULL,
  373.     [l5] [tinyint] NULL,
  374.     [d5] [INT] NULL,
  375.     [s6] [INT] NULL,
  376.     [l6] [tinyint] NULL,
  377.     [d6] [INT] NULL,
  378.     [s7] [INT] NULL,
  379.     [l7] [tinyint] NULL,
  380.     [d7] [INT] NULL,
  381.     [s8] [INT] NULL,
  382.     [l8] [tinyint] NULL,
  383.     [d8] [INT] NULL,
  384.     [s9] [INT] NULL,
  385.     [l9] [tinyint] NULL,
  386.     [d9] [INT] NULL,
  387.     [s10] [INT] NULL,
  388.     [l10] [tinyint] NULL,
  389.     [d10] [INT] NULL,
  390.     [s11] [INT] NULL,
  391.     [l11] [tinyint] NULL,
  392.     [d11] [INT] NULL,
  393.     [s12] [INT] NULL,
  394.     [l12] [tinyint] NULL,
  395.     [d12] [INT] NULL,
  396.     [s13] [INT] NULL,
  397.     [l13] [tinyint] NULL,
  398.     [d13] [INT] NULL,
  399.     [s14] [INT] NULL,
  400.     [l14] [tinyint] NULL,
  401.     [d14] [INT] NULL,
  402.     [s15] [INT] NULL,
  403.     [l15] [tinyint] NULL,
  404.     [d15] [INT] NULL,
  405.     [s16] [INT] NULL,
  406.     [l16] [tinyint] NULL,
  407.     [d16] [INT] NULL,
  408.     [s17] [INT] NULL,
  409.     [l17] [tinyint] NULL,
  410.     [d17] [INT] NULL,
  411.     [s18] [INT] NULL,
  412.     [l18] [tinyint] NULL,
  413.     [d18] [INT] NULL,
  414.     [s19] [INT] NULL,
  415.     [l19] [tinyint] NULL,
  416.     [d19] [INT] NULL,
  417.     [s20] [INT] NULL,
  418.     [l20] [tinyint] NULL,
  419.     [d20] [INT] NULL,
  420.     [s21] [INT] NULL,
  421.     [l21] [tinyint] NULL,
  422.     [d21] [INT] NULL,
  423.     [s22] [INT] NULL,
  424.     [l22] [tinyint] NULL,
  425.     [d22] [INT] NULL,
  426.     [s23] [INT] NULL,
  427.     [l23] [tinyint] NULL,
  428.     [d23] [INT] NULL,
  429.     [s24] [INT] NULL,
  430.     [l24] [tinyint] NULL,
  431.     [d24] [INT] NULL,
  432.     [s25] [INT] NULL,
  433.     [l25] [tinyint] NULL,
  434.     [d25] [INT] NULL,
  435.     [s26] [INT] NULL,
  436.     [l26] [tinyint] NULL,
  437.     [d26] [INT] NULL,
  438.     [s27] [INT] NULL,
  439.     [l27] [tinyint] NULL,
  440.     [d27] [INT] NULL,
  441.     [s28] [INT] NULL,
  442.     [l28] [tinyint] NULL,
  443.     [d28] [INT] NULL,
  444.     [s29] [INT] NULL,
  445.     [l29] [tinyint] NULL,
  446.     [d29] [INT] NULL,
  447.     [s30] [INT] NULL,
  448.     [l30] [tinyint] NULL,
  449.     [d30] [INT] NULL,
  450.     [s31] [INT] NULL,
  451.     [l31] [tinyint] NULL,
  452.     [d31] [INT] NULL,
  453.     [s32] [INT] NULL,
  454.     [l32] [tinyint] NULL,
  455.     [d32] [INT] NULL,
  456.     [s33] [INT] NULL,
  457.     [l33] [tinyint] NULL,
  458.     [d33] [INT] NULL,
  459.     [s34] [INT] NULL,
  460.     [l34] [tinyint] NULL,
  461.     [d34] [INT] NULL,
  462.     [s35] [INT] NULL,
  463.     [l35] [tinyint] NULL,
  464.     [d35] [INT] NULL,
  465.     [s36] [INT] NULL,
  466.     [l36] [tinyint] NULL,
  467.     [d36] [INT] NULL,
  468.     [s37] [INT] NULL,
  469.     [l37] [tinyint] NULL,
  470.     [d37] [INT] NULL,
  471.     [s38] [INT] NULL,
  472.     [l38] [tinyint] NULL,
  473.     [d38] [INT] NULL,
  474.     [s39] [INT] NULL,
  475.     [l39] [tinyint] NULL,
  476.     [d39] [INT] NULL,
  477.     [s40] [INT] NULL,
  478.     [l40] [tinyint] NULL,
  479.     [d40] [INT] NULL,
  480.     [c1] [tinyint] NULL,
  481.     [c2] [tinyint] NULL,
  482.     [c3] [tinyint] NULL,
  483.     [c4] [tinyint] NULL,
  484.     [c5] [tinyint] NULL,
  485.     [c6] [tinyint] NULL,
  486.     [c7] [tinyint] NULL,
  487.     [c8] [tinyint] NULL,
  488.     [c9] [tinyint] NULL,
  489.     [c10] [tinyint] NULL,
  490.     [c11] [tinyint] NULL,
  491.     [c12] [tinyint] NULL,
  492.     [c13] [tinyint] NULL,
  493.     [c14] [tinyint] NULL,
  494.     [c15] [tinyint] NULL,
  495.     [c16] [tinyint] NULL,
  496.     [c17] [tinyint] NULL,
  497.     [c18] [tinyint] NULL,
  498.     [c19] [tinyint] NULL,
  499.     [c20] [tinyint] NULL,
  500.     [c21] [tinyint] NULL,
  501.     [c22] [tinyint] NULL,
  502.     [c23] [tinyint] NULL,
  503.     [c24] [tinyint] NULL,
  504.     [c25] [tinyint] NULL,
  505.     [c26] [tinyint] NULL,
  506.     [c27] [tinyint] NULL,
  507.     [c28] [tinyint] NULL,
  508.     [c29] [tinyint] NULL,
  509.     [c30] [tinyint] NULL,
  510.     [c31] [tinyint] NULL,
  511.     [c32] [tinyint] NULL,
  512.     [c33] [tinyint] NULL,
  513.     [c34] [tinyint] NULL,
  514.     [c35] [tinyint] NULL,
  515.     [c36] [tinyint] NULL,
  516.     [c37] [tinyint] NULL,
  517.     [c38] [tinyint] NULL,
  518.     [c39] [tinyint] NULL,
  519.     [c40] [tinyint] NULL
  520. ) ON [PRIMARY]
  521.  
  522. GO
  523.  
  524. USE [lin2world]
  525. GO
  526. DROP PROCEDURE lin_CreateActiveSkill
  527. GO
  528.  
  529. CREATE PROCEDURE [dbo].[lin_CreateActiveSkill]
  530. (
  531.  @char_id INT,
  532.  @s1 INT, @l1 TINYINT, @d1 INT, @c1 TINYINT,
  533.  @s2 INT, @l2 TINYINT, @d2 INT, @c2 TINYINT,
  534.  @s3 INT, @l3 TINYINT, @d3 INT, @c3 TINYINT,
  535.  @s4 INT, @l4 TINYINT, @d4 INT, @c4 TINYINT,
  536.  @s5 INT, @l5 TINYINT, @d5 INT, @c5 TINYINT,
  537.  @s6 INT, @l6 TINYINT, @d6 INT, @c6 TINYINT,
  538.  @s7 INT, @l7 TINYINT, @d7 INT, @c7 TINYINT,
  539.  @s8 INT, @l8 TINYINT, @d8 INT, @c8 TINYINT,
  540.  @s9 INT, @l9 TINYINT, @d9 INT, @c9 TINYINT,
  541.  @s10 INT, @l10 TINYINT, @d10 INT, @c10 TINYINT,
  542.  @s11 INT, @l11 TINYINT, @d11 INT, @c11 TINYINT,
  543.  @s12 INT, @l12 TINYINT, @d12 INT, @c12 TINYINT,
  544.  @s13 INT, @l13 TINYINT, @d13 INT, @c13 TINYINT,
  545.  @s14 INT, @l14 TINYINT, @d14 INT, @c14 TINYINT,
  546.  @s15 INT, @l15 TINYINT, @d15 INT, @c15 TINYINT,
  547.  @s16 INT, @l16 TINYINT, @d16 INT, @c16 TINYINT,
  548.  @s17 INT, @l17 TINYINT, @d17 INT, @c17 TINYINT,
  549.  @s18 INT, @l18 TINYINT, @d18 INT, @c18 TINYINT,
  550.  @s19 INT, @l19 TINYINT, @d19 INT, @c19 TINYINT,
  551.  @s20 INT, @l20 TINYINT, @d20 INT, @c20 TINYINT,
  552.  @s21 INT, @l21 TINYINT, @d21 INT, @c21 TINYINT,
  553.  @s22 INT, @l22 TINYINT, @d22 INT, @c22 TINYINT,
  554.  @s23 INT, @l23 TINYINT, @d23 INT, @c23 TINYINT,
  555.  @s24 INT, @l24 TINYINT, @d24 INT, @c24 TINYINT,
  556.  @s25 INT, @l25 TINYINT, @d25 INT, @c25 TINYINT,
  557.  @s26 INT, @l26 TINYINT, @d26 INT, @c26 TINYINT,
  558.  @s27 INT, @l27 TINYINT, @d27 INT, @c27 TINYINT,
  559.  @s28 INT, @l28 TINYINT, @d28 INT, @c28 TINYINT,
  560.  @s29 INT, @l29 TINYINT, @d29 INT, @c29 TINYINT,
  561.  @s30 INT, @l30 TINYINT, @d30 INT, @c30 TINYINT,
  562.  @s31 INT, @l31 TINYINT, @d31 INT, @c31 TINYINT,
  563.  @s32 INT, @l32 TINYINT, @d32 INT, @c32 TINYINT,
  564.  @s33 INT, @l33 TINYINT, @d33 INT, @c33 TINYINT,
  565.  @s34 INT, @l34 TINYINT, @d34 INT, @c34 TINYINT,
  566.  @s35 INT, @l35 TINYINT, @d35 INT, @c35 TINYINT,
  567.  @s36 INT, @l36 TINYINT, @d36 INT, @c36 TINYINT,
  568.  @s37 INT, @l37 TINYINT, @d37 INT, @c37 TINYINT,
  569.  @s38 INT, @l38 TINYINT, @d38 INT, @c38 TINYINT,
  570.  @s39 INT, @l39 TINYINT, @d39 INT, @c39 TINYINT,
  571.  @s40 INT, @l40 TINYINT, @d40 INT, @c40 TINYINT
  572. )
  573. AS
  574. SET NOCOUNT ON
  575.  
  576.  INSERT INTO user_activeskill
  577.  (char_id,
  578.  s1, l1, d1, c1,
  579.  s2, l2, d2, c2,
  580.  s3, l3, d3, c3,
  581.  s4, l4, d4, c4,
  582.  s5, l5, d5, c5,
  583.  s6, l6, d6, c6,
  584.  s7, l7, d7, c7,
  585.  s8, l8, d8, c8,
  586.  s9, l9, d9, c9,
  587.  s10, l10, d10, c10,
  588.  s11, l11, d11, c11,
  589.  s12, l12, d12, c12,
  590.  s13, l13, d13, c13,
  591.  s14, l14, d14, c14,
  592.  s15, l15, d15, c15,
  593.  s16, l16, d16, c16,
  594.  s17, l17, d17, c17,
  595.  s18, l18, d18, c18,
  596.  s19, l19, d19, c19,
  597.  s20, l20, d20, c20,
  598.  s21, l21, d21, c21,
  599.  s22, l22, d22, c22,
  600.  s23, l23, d23, c23,
  601.  s24, l24, d24, c24,
  602.  s25, l25, d25, c25,
  603.  s26, l26, d26, c26,
  604.  s27, l27, d27, c27,
  605.  s28, l28, d28, c28,
  606.  s29, l29, d29, c29,
  607.  s30, l30, d30, c30,
  608.  s31, l31, d31, c31,
  609.  s32, l32, d32, c32,
  610.  s33, l33, d33, c33,
  611.  s34, l34, d34, c34,
  612.  s35, l35, d35, c35,
  613.  s36, l36, d36, c36,
  614.  s37, l37, d37, c37,
  615.  s38, l38, d38, c38,
  616.  s39, l39, d39, c39,
  617.  s40, l40, d40, c40 )
  618.  VALUES
  619.  (@char_id,
  620.  @s1, @l1, @d1, @c1,
  621.  @s2, @l2, @d2, @c2,
  622.  @s3, @l3, @d3, @c3,
  623.  @s4, @l4, @d4, @c4,
  624.  @s5, @l5, @d5, @c5,
  625.  @s6, @l6, @d6, @c6,
  626.  @s7, @l7, @d7, @c7,
  627.  @s8, @l8, @d8, @c8,
  628.  @s9, @l9, @d9, @c9,
  629.  @s10, @l10, @d10, @c10,
  630.  @s11, @l11, @d11, @c11,
  631.  @s12, @l12, @d12, @c12,
  632.  @s13, @l13, @d13, @c13,
  633.  @s14, @l14, @d14, @c14,
  634.  @s15, @l15, @d15, @c15,
  635.  @s16, @l16, @d16, @c16,
  636.  @s17, @l17, @d17, @c17,
  637.  @s18, @l18, @d18, @c18,
  638.  @s19, @l19, @d19, @c19,
  639.  @s20, @l20, @d20, @c20,
  640.  @s21, @l21, @d21, @c21,
  641.  @s22, @l22, @d22, @c22,
  642.  @s23, @l23, @d23, @c23,
  643.  @s24, @l24, @d24, @c24,
  644.  @s25, @l25, @d25, @c25,
  645.  @s26, @l26, @d26, @c26,
  646.  @s27, @l27, @d27, @c27,
  647.  @s28, @l28, @d28, @c28,
  648.  @s29, @l29, @d29, @c29,
  649.  @s30, @l30, @d30, @c30,
  650.  @s31, @l31, @d31, @c31,
  651.  @s32, @l32, @d32, @c32,
  652.  @s33, @l33, @d33, @c33,
  653.  @s34, @l34, @d34, @c34,
  654.  @s35, @l35, @d35, @c35,
  655.  @s36, @l36, @d36, @c36,
  656.  @s37, @l37, @d37, @c37,
  657.  @s38, @l38, @d38, @c38,
  658.  @s39, @l39, @d39, @c39,
  659.  @s40, @l40, @d40, @c40  )
  660.  
  661.  GO
  662.  
  663. -- ================================================
  664. -- Template generated from Template Explorer using:
  665. -- Create Procedure (New Menu).SQL
  666. --
  667. -- Use the Specify Values for Template Parameters
  668. -- command (Ctrl-Shift-M) to fill in the parameter
  669. -- values below.
  670. --
  671. -- This block of comments will not be included in
  672. -- the definition of the procedure.
  673. -- ================================================
  674. USE lin2world
  675. GO
  676. SET ANSI_NULLS ON
  677. GO
  678. SET QUOTED_IDENTIFIER ON
  679. GO
  680. -- =============================================
  681. -- Author:      Vanganth
  682. -- Create date:
  683. -- Description: Procedure for new func RequestLoadAbnormalStatus
  684. -- =============================================
  685.  
  686. IF EXISTS (SELECT 1
  687.     FROM sys.procedures
  688.     WHERE [name]='lin_GetActiveSkills')
  689.         DROP PROCEDURE lin_GetActiveSkills
  690. GO
  691.  
  692. CREATE PROCEDURE lin_GetActiveSkills
  693.     -- Add the parameters for the stored procedure here
  694.     @char_id AS INT
  695. AS
  696. BEGIN
  697.     -- SET NOCOUNT ON added to prevent extra result sets from
  698.     -- interfering with SELECT statements.
  699.     SET NOCOUNT ON;
  700.  
  701.     -- Insert statements for procedure here
  702.     SELECT [s1]
  703.       ,[l1]
  704.       ,[d1]
  705.       ,[s2]
  706.       ,[l2]
  707.       ,[d2]
  708.       ,[s3]
  709.       ,[l3]
  710.       ,[d3]
  711.       ,[s4]
  712.       ,[l4]
  713.       ,[d4]
  714.       ,[s5]
  715.       ,[l5]
  716.       ,[d5]
  717.       ,[s6]
  718.       ,[l6]
  719.       ,[d6]
  720.       ,[s7]
  721.       ,[l7]
  722.       ,[d7]
  723.       ,[s8]
  724.       ,[l8]
  725.       ,[d8]
  726.       ,[s9]
  727.       ,[l9]
  728.       ,[d9]
  729.       ,[s10]
  730.       ,[l10]
  731.       ,[d10]
  732.       ,[s11]
  733.       ,[l11]
  734.       ,[d11]
  735.       ,[s12]
  736.       ,[l12]
  737.       ,[d12]
  738.       ,[s13]
  739.       ,[l13]
  740.       ,[d13]
  741.       ,[s14]
  742.       ,[l14]
  743.       ,[d14]
  744.       ,[s15]
  745.       ,[l15]
  746.       ,[d15]
  747.       ,[s16]
  748.       ,[l16]
  749.       ,[d16]
  750.       ,[s17]
  751.       ,[l17]
  752.       ,[d17]
  753.       ,[s18]
  754.       ,[l18]
  755.       ,[d18]
  756.       ,[s19]
  757.       ,[l19]
  758.       ,[d19]
  759.       ,[s20]
  760.       ,[l20]
  761.       ,[d20]
  762.       ,[s21]
  763.       ,[l21]
  764.       ,[d21]
  765.       ,[s22]
  766.       ,[l22]
  767.       ,[d22]
  768.       ,[s23]
  769.       ,[l23]
  770.       ,[d23]
  771.       ,[s24]
  772.       ,[l24]
  773.       ,[d24]
  774.       ,[s25]
  775.       ,[l25]
  776.       ,[d25]
  777.       ,[s26]
  778.       ,[l26]
  779.       ,[d26]
  780.       ,[s27]
  781.       ,[l27]
  782.       ,[d27]
  783.       ,[s28]
  784.       ,[l28]
  785.       ,[d28]
  786.       ,[s29]
  787.       ,[l29]
  788.       ,[d29]
  789.       ,[s30]
  790.       ,[l30]
  791.       ,[d30]
  792.       ,[s31]
  793.       ,[l31]
  794.       ,[d31]
  795.       ,[s32]
  796.       ,[l32]
  797.       ,[d32]
  798.       ,[s33]
  799.       ,[l33]
  800.       ,[d33]
  801.       ,[s34]
  802.       ,[l34]
  803.       ,[d34]
  804.       ,[s35]
  805.       ,[l35]
  806.       ,[d35]
  807.       ,[s36]
  808.       ,[l36]
  809.       ,[d36]
  810.       ,[s37]
  811.       ,[l37]
  812.       ,[d37]
  813.       ,[s38]
  814.       ,[l38]
  815.       ,[d38]
  816.       ,[s39]
  817.       ,[l39]
  818.       ,[d39]
  819.       ,[s40]
  820.       ,[l40]
  821.       ,[d40]
  822.       ,[c1]
  823.       ,[c2]
  824.       ,[c3]
  825.       ,[c4]
  826.       ,[c5]
  827.       ,[c6]
  828.       ,[c7]
  829.       ,[c8]
  830.       ,[c9]
  831.       ,[c10]
  832.       ,[c11]
  833.       ,[c12]
  834.       ,[c13]
  835.       ,[c14]
  836.       ,[c15]
  837.       ,[c16]
  838.       ,[c17]
  839.       ,[c18]
  840.       ,[c19]
  841.       ,[c20]
  842.       ,[c21]
  843.       ,[c22]
  844.       ,[c23]
  845.       ,[c24]
  846.       ,[c25]
  847.       ,[c26]
  848.       ,[c27]
  849.       ,[c28]
  850.       ,[c29]
  851.       ,[c30]
  852.       ,[c31]
  853.       ,[c32]
  854.       ,[c33]
  855.       ,[c34]
  856.       ,[c35]
  857.       ,[c36]
  858.       ,[c37]
  859.       ,[c38]
  860.       ,[c39]
  861.       ,[c40]
  862.     FROM [lin2world].[dbo].[user_ActiveSkill] WHERE char_id = @char_id
  863. END
  864. GO
  865.  
  866. USE lin2world
  867. GO
  868. SET ANSI_NULLS ON
  869. GO
  870. SET QUOTED_IDENTIFIER ON
  871. GO
  872. USE [lin2world]
  873. GO
  874. DROP PROCEDURE lin_UpdateActiveSkill
  875. GO
  876. -- =============================================
  877. -- Author:      Vanganth
  878. -- Create date:
  879. -- Description: Procedure for new func RequestSaveAbnormalStatus
  880. -- =============================================
  881. CREATE PROCEDURE lin_UpdateActiveSkill
  882. (
  883.  @char_id INT,
  884.  @s1 INT, @l1 TINYINT, @d1 INT, @c1 TINYINT,
  885.  @s2 INT, @l2 TINYINT, @d2 INT, @c2 TINYINT,
  886.  @s3 INT, @l3 TINYINT, @d3 INT, @c3 TINYINT,
  887.  @s4 INT, @l4 TINYINT, @d4 INT, @c4 TINYINT,
  888.  @s5 INT, @l5 TINYINT, @d5 INT, @c5 TINYINT,
  889.  @s6 INT, @l6 TINYINT, @d6 INT, @c6 TINYINT,
  890.  @s7 INT, @l7 TINYINT, @d7 INT, @c7 TINYINT,
  891.  @s8 INT, @l8 TINYINT, @d8 INT, @c8 TINYINT,
  892.  @s9 INT, @l9 TINYINT, @d9 INT, @c9 TINYINT,
  893.  @s10 INT, @l10 TINYINT, @d10 INT, @c10 TINYINT,
  894.  @s11 INT, @l11 TINYINT, @d11 INT, @c11 TINYINT,
  895.  @s12 INT, @l12 TINYINT, @d12 INT, @c12 TINYINT,
  896.  @s13 INT, @l13 TINYINT, @d13 INT, @c13 TINYINT,
  897.  @s14 INT, @l14 TINYINT, @d14 INT, @c14 TINYINT,
  898.  @s15 INT, @l15 TINYINT, @d15 INT, @c15 TINYINT,
  899.  @s16 INT, @l16 TINYINT, @d16 INT, @c16 TINYINT,
  900.  @s17 INT, @l17 TINYINT, @d17 INT, @c17 TINYINT,
  901.  @s18 INT, @l18 TINYINT, @d18 INT, @c18 TINYINT,
  902.  @s19 INT, @l19 TINYINT, @d19 INT, @c19 TINYINT,
  903.  @s20 INT, @l20 TINYINT, @d20 INT, @c20 TINYINT,
  904.  @s21 INT, @l21 TINYINT, @d21 INT, @c21 TINYINT,
  905.  @s22 INT, @l22 TINYINT, @d22 INT, @c22 TINYINT,
  906.  @s23 INT, @l23 TINYINT, @d23 INT, @c23 TINYINT,
  907.  @s24 INT, @l24 TINYINT, @d24 INT, @c24 TINYINT,
  908.  @s25 INT, @l25 TINYINT, @d25 INT, @c25 TINYINT,
  909.  @s26 INT, @l26 TINYINT, @d26 INT, @c26 TINYINT,
  910.  @s27 INT, @l27 TINYINT, @d27 INT, @c27 TINYINT,
  911.  @s28 INT, @l28 TINYINT, @d28 INT, @c28 TINYINT,
  912.  @s29 INT, @l29 TINYINT, @d29 INT, @c29 TINYINT,
  913.  @s30 INT, @l30 TINYINT, @d30 INT, @c30 TINYINT,
  914.  @s31 INT, @l31 TINYINT, @d31 INT, @c31 TINYINT,
  915.  @s32 INT, @l32 TINYINT, @d32 INT, @c32 TINYINT,
  916.  @s33 INT, @l33 TINYINT, @d33 INT, @c33 TINYINT,
  917.  @s34 INT, @l34 TINYINT, @d34 INT, @c34 TINYINT,
  918.  @s35 INT, @l35 TINYINT, @d35 INT, @c35 TINYINT,
  919.  @s36 INT, @l36 TINYINT, @d36 INT, @c36 TINYINT,
  920.  @s37 INT, @l37 TINYINT, @d37 INT, @c37 TINYINT,
  921.  @s38 INT, @l38 TINYINT, @d38 INT, @c38 TINYINT,
  922.  @s39 INT, @l39 TINYINT, @d39 INT, @c39 TINYINT,
  923.  @s40 INT, @l40 TINYINT, @d40 INT, @c40 TINYINT
  924. )
  925. AS
  926.     -- SET NOCOUNT ON added to prevent extra result sets from
  927.     -- interfering with SELECT statements.
  928.     SET NOCOUNT ON;
  929. IF EXISTS(SELECT * FROM user_activeskill WHERE char_id = @char_id)
  930. BEGIN
  931.  UPDATE user_activeskill
  932.  SET
  933.  s1 = @s1, l1 = @l1, d1 = @d1, c1 = @c1,
  934.  s2 = @s2, l2 = @l2, d2 = @d2, c2 = @c2,
  935.  s3 = @s3, l3 = @l3, d3 = @d3, c3 = @c3,
  936.  s4 = @s4, l4 = @l4, d4 = @d4, c4 = @c4,
  937.  s5 = @s5, l5 = @l5, d5 = @d5, c5 = @c5,
  938.  s6 = @s6, l6 = @l6, d6 = @d6, c6 = @c6,
  939.  s7 = @s7, l7 = @l7, d7 = @d7, c7 = @c7,
  940.  s8 = @s8, l8 = @l8, d8 = @d8, c8 = @c8,
  941.  s9 = @s9, l9 = @l9, d9 = @d9, c9 = @c9,
  942.  s10 = @s10, l10 = @l10, d10 = @d10, c10 = @c10,
  943.  s11 = @s11, l11 = @l11, d11 = @d11, c11 = @c11,
  944.  s12 = @s12, l12 = @l12, d12 = @d12, c12 = @c12,
  945.  s13 = @s13, l13 = @l13, d13 = @d13, c13 = @c13,
  946.  s14 = @s14, l14 = @l14, d14 = @d14, c14 = @c14,
  947.  s15 = @s15, l15 = @l15, d15 = @d15, c15 = @c15,
  948.  s16 = @s16, l16 = @l16, d16 = @d16, c16 = @c16,
  949.  s17 = @s17, l17 = @l17, d17 = @d17, c17 = @c17,
  950.  s18 = @s18, l18 = @l18, d18 = @d18, c18 = @c18,
  951.  s19 = @s19, l19 = @l19, d19 = @d19, c19 = @c19,
  952.  s20 = @s20, l20 = @l20, d20 = @d20, c20 = @c20,
  953.  s21 = @s21, l21 = @l21, d21 = @d21, c21 = @c21,
  954.  s22 = @s22, l22 = @l22, d22 = @d22, c22 = @c22,
  955.  s23 = @s23, l23 = @l23, d23 = @d23, c23 = @c23,
  956.  s24 = @s24, l24 = @l24, d24 = @d24, c24 = @c24,
  957.  s25 = @s25, l25 = @l25, d25 = @d25, c25 = @c25,
  958.  s26 = @s26, l26 = @l26, d26 = @d26, c26 = @c26,
  959.  s27 = @s27, l27 = @l27, d27 = @d27, c27 = @c27,
  960.  s28 = @s28, l28 = @l28, d28 = @d28, c28 = @c28,
  961.  s29 = @s29, l29 = @l29, d29 = @d29, c29 = @c29,
  962.  s30 = @s30, l30 = @l30, d30 = @d30, c30 = @c30,
  963.  s31 = @s31, l31 = @l31, d31 = @d31, c31 = @c31,
  964.  s32 = @s32, l32 = @l32, d32 = @d32, c32 = @c32,
  965.  s33 = @s33, l33 = @l33, d33 = @d33, c33 = @c33,
  966.  s34 = @s34, l34 = @l34, d34 = @d34, c34 = @c34,
  967.  s35 = @s35, l35 = @l35, d35 = @d35, c35 = @c35,
  968.  s36 = @s36, l36 = @l36, d36 = @d36, c36 = @c36,
  969.  s37 = @s37, l37 = @l37, d37 = @d37, c37 = @c37,
  970.  s38 = @s38, l38 = @l38, d38 = @d38, c38 = @c38,
  971.  s39 = @s39, l39 = @l39, d39 = @d39, c39 = @c39,
  972.  s40 = @s40, l40 = @l40, d40 = @d40, c40 = @c40
  973.  WHERE char_id = @char_id
  974. END  
  975. ELSE
  976. BEGIN  
  977.  INSERT INTO user_activeskill
  978.  (char_id,
  979.  s1, l1, d1, c1,
  980.  s2, l2, d2, c2,
  981.  s3, l3, d3, c3,
  982.  s4, l4, d4, c4,
  983.  s5, l5, d5, c5,
  984.  s6, l6, d6, c6,
  985.  s7, l7, d7, c7,
  986.  s8, l8, d8, c8,
  987.  s9, l9, d9, c9,
  988.  s10, l10, d10, c10,
  989.  s11, l11, d11, c11,
  990.  s12, l12, d12, c12,
  991.  s13, l13, d13, c13,
  992.  s14, l14, d14, c14,
  993.  s15, l15, d15, c15,
  994.  s16, l16, d16, c16,
  995.  s17, l17, d17, c17,
  996.  s18, l18, d18, c18,
  997.  s19, l19, d19, c19,
  998.  s20, l20, d20, c20,
  999.  s21, l21, d21, c21,
  1000.  s22, l22, d22, c22,
  1001.  s23, l23, d23, c23,
  1002.  s24, l24, d24, c24,
  1003.  s25, l25, d25, c25,
  1004.  s26, l26, d26, c26,
  1005.  s27, l27, d27, c27,
  1006.  s28, l28, d28, c28,
  1007.  s29, l29, d29, c29,
  1008.  s30, l30, d30, c30,
  1009.  s31, l31, d31, c31,
  1010.  s32, l32, d32, c32,
  1011.  s33, l33, d33, c33,
  1012.  s34, l34, d34, c34,
  1013.  s35, l35, d35, c35,
  1014.  s36, l36, d36, c36,
  1015.  s37, l37, d37, c37,
  1016.  s38, l38, d38, c38,
  1017.  s39, l39, d39, c39,
  1018.  s40, l40, d40, c40 )
  1019.  VALUES
  1020.  (@char_id,
  1021.  @s1, @l1, @d1, @c1,
  1022.  @s2, @l2, @d2, @c2,
  1023.  @s3, @l3, @d3, @c3,
  1024.  @s4, @l4, @d4, @c4,
  1025.  @s5, @l5, @d5, @c5,
  1026.  @s6, @l6, @d6, @c6,
  1027.  @s7, @l7, @d7, @c7,
  1028.  @s8, @l8, @d8, @c8,
  1029.  @s9, @l9, @d9, @c9,
  1030.  @s10, @l10, @d10, @c10,
  1031.  @s11, @l11, @d11, @c11,
  1032.  @s12, @l12, @d12, @c12,
  1033.  @s13, @l13, @d13, @c13,
  1034.  @s14, @l14, @d14, @c14,
  1035.  @s15, @l15, @d15, @c15,
  1036.  @s16, @l16, @d16, @c16,
  1037.  @s17, @l17, @d17, @c17,
  1038.  @s18, @l18, @d18, @c18,
  1039.  @s19, @l19, @d19, @c19,
  1040.  @s20, @l20, @d20, @c20,
  1041.  @s21, @l21, @d21, @c21,
  1042.  @s22, @l22, @d22, @c22,
  1043.  @s23, @l23, @d23, @c23,
  1044.  @s24, @l24, @d24, @c24,
  1045.  @s25, @l25, @d25, @c25,
  1046.  @s26, @l26, @d26, @c26,
  1047.  @s27, @l27, @d27, @c27,
  1048.  @s28, @l28, @d28, @c28,
  1049.  @s29, @l29, @d29, @c29,
  1050.  @s30, @l30, @d30, @c30,
  1051.  @s31, @l31, @d31, @c31,
  1052.  @s32, @l32, @d32, @c32,
  1053.  @s33, @l33, @d33, @c33,
  1054.  @s34, @l34, @d34, @c34,
  1055.  @s35, @l35, @d35, @c35,
  1056.  @s36, @l36, @d36, @c36,
  1057.  @s37, @l37, @d37, @c37,
  1058.  @s38, @l38, @d38, @c38,
  1059.  @s39, @l39, @d39, @c39,
  1060.  @s40, @l40, @d40, @c40  )
  1061. END
  1062.  
  1063. GO
  1064.  
  1065. ALTER TABLE [dbo].[quest] ADD
  1066.     [q17] [INT] NOT NULL CONSTRAINT [DF_Quest_q17]  DEFAULT ((0)),
  1067.     [s17] [INT] NOT NULL CONSTRAINT [DF_Quest_s17]  DEFAULT ((0)),
  1068.     [q18] [INT] NOT NULL CONSTRAINT [DF_Quest_q18]  DEFAULT ((0)),
  1069.     [s18] [INT] NOT NULL CONSTRAINT [DF_Quest_s18]  DEFAULT ((0)),
  1070.     [q19] [INT] NOT NULL CONSTRAINT [DF_Quest_q19]  DEFAULT ((0)),
  1071.     [s19] [INT] NOT NULL CONSTRAINT [DF_Quest_s19]  DEFAULT ((0)),
  1072.     [q20] [INT] NOT NULL CONSTRAINT [DF_Quest_q20]  DEFAULT ((0)),
  1073.     [s20] [INT] NOT NULL CONSTRAINT [DF_Quest_s20]  DEFAULT ((0)),
  1074.     [q21] [INT] NOT NULL CONSTRAINT [DF_Quest_q21]  DEFAULT ((0)),
  1075.     [s21] [INT] NOT NULL CONSTRAINT [DF_Quest_s21]  DEFAULT ((0)),
  1076.     [q22] [INT] NOT NULL CONSTRAINT [DF_Quest_q22]  DEFAULT ((0)),
  1077.     [s22] [INT] NOT NULL CONSTRAINT [DF_Quest_s22]  DEFAULT ((0)),
  1078.     [q23] [INT] NOT NULL CONSTRAINT [DF_Quest_q23]  DEFAULT ((0)),
  1079.     [s23] [INT] NOT NULL CONSTRAINT [DF_Quest_s23]  DEFAULT ((0)),
  1080.     [q24] [INT] NOT NULL CONSTRAINT [DF_Quest_q24]  DEFAULT ((0)),
  1081.     [s24] [INT] NOT NULL CONSTRAINT [DF_Quest_s24]  DEFAULT ((0)),
  1082.     [q25] [INT] NOT NULL CONSTRAINT [DF_Quest_q25]  DEFAULT ((0)),
  1083.     [s25] [INT] NOT NULL CONSTRAINT [DF_Quest_s25]  DEFAULT ((0)),
  1084.     [q26] [INT] NOT NULL CONSTRAINT [DF_Quest_q26]  DEFAULT ((0)),
  1085.     [s26] [INT] NOT NULL CONSTRAINT [DF_Quest_s26]  DEFAULT ((0)),
  1086.     [j17] [INT] NOT NULL CONSTRAINT [DF_Quest_j17]  DEFAULT ((0)),
  1087.     [j18] [INT] NOT NULL CONSTRAINT [DF_Quest_j18]  DEFAULT ((0)),
  1088.     [j19] [INT] NOT NULL CONSTRAINT [DF_Quest_j19]  DEFAULT ((0)),
  1089.     [j20] [INT] NOT NULL CONSTRAINT [DF_Quest_j20]  DEFAULT ((0)),
  1090.     [j21] [INT] NOT NULL CONSTRAINT [DF_Quest_j21]  DEFAULT ((0)),
  1091.     [j22] [INT] NOT NULL CONSTRAINT [DF_Quest_j22]  DEFAULT ((0)),
  1092.     [j23] [INT] NOT NULL CONSTRAINT [DF_Quest_j23]  DEFAULT ((0)),
  1093.     [j24] [INT] NOT NULL CONSTRAINT [DF_Quest_j24]  DEFAULT ((0)),
  1094.     [j25] [INT] NOT NULL CONSTRAINT [DF_Quest_j25]  DEFAULT ((0)),
  1095.     [j26] [INT] NOT NULL CONSTRAINT [DF_Quest_j26]  DEFAULT ((0)),
  1096.     [s2_17] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_17]  DEFAULT ((0)),
  1097.     [s2_18] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_18]  DEFAULT ((0)),
  1098.     [s2_19] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_19]  DEFAULT ((0)),
  1099.     [s2_20] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_20]  DEFAULT ((0)),
  1100.     [s2_21] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_21]  DEFAULT ((0)),
  1101.     [s2_22] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_22]  DEFAULT ((0)),
  1102.     [s2_23] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_23]  DEFAULT ((0)),
  1103.     [s2_24] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_24]  DEFAULT ((0)),
  1104.     [s2_25] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_25]  DEFAULT ((0)),
  1105.     [s2_26] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_26]  DEFAULT ((0))
  1106. GO
  1107.  
  1108. IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_LoadQuest'))
  1109. DROP proc [lin_LoadQuest]
  1110. GO
  1111. /********************************************  
  1112. lin_LoadQuest  
  1113.    
  1114. INPUT  
  1115.  @char_id int  
  1116. OUTPUT  
  1117. return  
  1118. made by  
  1119.  carrot
  1120.  kuroi - extended number of quests to 25
  1121. date  
  1122.  2002-06-09  
  1123. ********************************************/  
  1124. CREATE PROCEDURE [dbo].[lin_LoadQuest]
  1125. (
  1126. @char_id INT
  1127. )
  1128. AS
  1129. SET NOCOUNT ON
  1130.  
  1131. SELECT TOP 1
  1132.   q1,  s1,  s2_1,  j1,
  1133.   q2,  s2,  s2_2,  j2,
  1134.   q3,  s3,  s2_3,  j3,
  1135.   q4,  s4,  s2_4,  j4,
  1136.   q5,  s5,  s2_5,  j5,
  1137.   q6,  s6,  s2_6,  j6,
  1138.   q7,  s7,  s2_7,  j7,
  1139.   q8,  s8,  s2_8,  j8,
  1140.   q9,  s9,  s2_9,  j9,
  1141.   q10, s10, s2_10, j10,
  1142.   q11, s11, s2_11, j11,
  1143.   q12, s12, s2_12, j12,
  1144.   q13, s13, s2_13, j13,
  1145.   q14, s14, s2_14, j14,
  1146.   q15, s15, s2_15, j15,
  1147.   q16, s16, s2_16, j16,
  1148.   q17, s17, s2_17, j17,
  1149.   q18, s18, s2_18, j18,
  1150.   q19, s19, s2_19, j19,
  1151.   q20, s20, s2_20, j20,
  1152.   q21, s21, s2_21, j21,
  1153.   q22, s22, s2_22, j22,
  1154.   q23, s23, s2_23, j23,
  1155.   q24, s24, s2_24, j24,
  1156.   q25, s25, s2_25, j25,
  1157.   q26, s26, s2_26, j26
  1158.  
  1159. FROM quest (nolock)
  1160. WHERE char_id = @char_id
  1161. GO
  1162.  
  1163. IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_SetQuest'))
  1164. DROP proc [lin_SetQuest]
  1165. GO
  1166.  
  1167. /********************************************  
  1168. lin_SetQuest  
  1169.    
  1170. OUTPUT  
  1171. return  
  1172. made by  
  1173.  carrot  
  1174. date  
  1175.  2002-06-09  
  1176. ********************************************/  
  1177. CREATE PROCEDURE [dbo].[lin_SetQuest]
  1178. (  
  1179. @q1 INT,  
  1180. @s1 INT,  
  1181. @s2_1 INT,  
  1182. @j1 INT,  
  1183.  
  1184. @q2 INT,  
  1185. @s2 INT,  
  1186. @s2_2 INT,  
  1187. @j2 INT,  
  1188.  
  1189. @q3 INT,  
  1190. @s3 INT,  
  1191. @s2_3 INT,  
  1192. @j3 INT,  
  1193.  
  1194. @q4 INT,  
  1195. @s4 INT,  
  1196. @s2_4 INT,  
  1197. @j4 INT,  
  1198.  
  1199. @q5 INT,  
  1200. @s5 INT,  
  1201. @s2_5 INT,  
  1202. @j5 INT,  
  1203.  
  1204. @q6 INT,  
  1205. @s6 INT,  
  1206. @s2_6 INT,  
  1207. @j6 INT,  
  1208.  
  1209.  
  1210. @q7 INT,  
  1211. @s7 INT,  
  1212. @s2_7 INT,  
  1213. @j7 INT,  
  1214.  
  1215. @q8 INT,  
  1216. @s8 INT,  
  1217. @s2_8 INT,  
  1218. @j8 INT,  
  1219.  
  1220. @q9 INT,  
  1221. @s9 INT,  
  1222. @s2_9 INT,  
  1223. @j9 INT,  
  1224.  
  1225. @q10 INT,  
  1226. @s10 INT,  
  1227. @s2_10 INT,  
  1228. @j10 INT,  
  1229.  
  1230. @q11 INT,  
  1231. @s11 INT,  
  1232. @s2_11 INT,  
  1233. @j11 INT,  
  1234.  
  1235. @q12 INT,  
  1236. @s12 INT,  
  1237. @s2_12 INT,  
  1238. @j12 INT,  
  1239.  
  1240. @q13 INT,  
  1241. @s13 INT,  
  1242. @s2_13 INT,  
  1243. @j13 INT,  
  1244.  
  1245. @q14 INT,  
  1246. @s14 INT,  
  1247. @s2_14 INT,  
  1248. @j14 INT,  
  1249.  
  1250. @q15 INT,  
  1251. @s15 INT,  
  1252. @s2_15 INT,  
  1253. @j15 INT,  
  1254.  
  1255. @q16 INT,  
  1256. @s16 INT,  
  1257. @s2_16 INT,  
  1258. @j16 INT,  
  1259.  
  1260. @q17 INT,  
  1261. @s17 INT,  
  1262. @s2_17 INT,  
  1263. @j17 INT,  
  1264.  
  1265. @q18 INT,  
  1266. @s18 INT,  
  1267. @s2_18 INT,  
  1268. @j18 INT,  
  1269.  
  1270. @q19 INT,  
  1271. @s19 INT,  
  1272. @s2_19 INT,  
  1273. @j19 INT,  
  1274.  
  1275. @q20 INT,  
  1276. @s20 INT,  
  1277. @s2_20 INT,  
  1278. @j20 INT,  
  1279.  
  1280. @q21 INT,  
  1281. @s21 INT,  
  1282. @s2_21 INT,  
  1283. @j21 INT,  
  1284.  
  1285. @q22 INT,  
  1286. @s22 INT,  
  1287. @s2_22 INT,  
  1288. @j22 INT,  
  1289.  
  1290. @q23 INT,  
  1291. @s23 INT,  
  1292. @s2_23 INT,  
  1293. @j23 INT,  
  1294.  
  1295. @q24 INT,  
  1296. @s24 INT,  
  1297. @s2_24 INT,  
  1298. @j24 INT,  
  1299.  
  1300. @q25 INT,  
  1301. @s25 INT,  
  1302. @s2_25 INT,  
  1303. @j25 INT,  
  1304.  
  1305. @q26 INT,  
  1306. @s26 INT,  
  1307. @s2_26 INT,  
  1308. @j26 INT,  
  1309.  
  1310. @char_id  INT  
  1311.  
  1312. )  
  1313. AS  
  1314. SET NOCOUNT ON  
  1315.  
  1316. UPDATE quest  
  1317. SET  
  1318. q1=@q1, s1=@s1, s2_1=@s2_1, j1=@j1,  
  1319. q2=@q2, s2=@s2, s2_2=@s2_2, j2=@j2,  
  1320. q3=@q3, s3=@s3, s2_3=@s2_3, j3=@j3,  
  1321. q4=@q4, s4=@s4, s2_4=@s2_4, j4=@j4,  
  1322. q5=@q5, s5=@s5, s2_5=@s2_5, j5=@j5,  
  1323. q6=@q6, s6=@s6, s2_6=@s2_6, j6=@j6,  
  1324. q7=@q7, s7=@s7, s2_7=@s2_7, j7=@j7,  
  1325. q8=@q8, s8=@s8, s2_8=@s2_8, j8=@j8,  
  1326. q9=@q9, s9=@s9, s2_9=@s2_9, j9=@j9,  
  1327. q10=@q10, s10=@s10, s2_10=@s2_10, j10=@j10,  
  1328. q11=@q11, s11=@s11, s2_11=@s2_11, j11=@j11,  
  1329. q12=@q12, s12=@s12, s2_12=@s2_12, j12=@j12,  
  1330. q13=@q13, s13=@s13, s2_13=@s2_13, j13=@j13,  
  1331. q14=@q14, s14=@s14, s2_14=@s2_14, j14=@j14,  
  1332. q15=@q15, s15=@s15, s2_15=@s2_15, j15=@j15,  
  1333. q16=@q16, s16=@s16, s2_16=@s2_16, j16=@j16,
  1334. q17=@q17, s17=@s17, s2_17=@s2_17, j17=@j17,
  1335. q18=@q18, s18=@s18, s2_18=@s2_18, j18=@j18,
  1336. q19=@q19, s19=@s19, s2_19=@s2_19, j19=@j19,
  1337. q20=@q20, s20=@s20, s2_20=@s2_20, j20=@j20,
  1338. q21=@q21, s21=@s21, s2_21=@s2_21, j21=@j21,
  1339. q22=@q22, s22=@s22, s2_22=@s2_22, j22=@j22,
  1340. q23=@q23, s23=@s23, s2_23=@s2_23, j23=@j23,
  1341. q24=@q24, s24=@s24, s2_24=@s2_24, j24=@j24,
  1342. q25=@q25, s25=@s25, s2_25=@s2_25, j25=@j25,
  1343. q26=@q26, s26=@s26, s2_26=@s2_26, j26=@j26
  1344. WHERE char_id = @char_id
  1345. GO
  1346.  
  1347. IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_UpdateJournal'))
  1348. DROP proc [lin_UpdateJournal]
  1349. GO
  1350.  
  1351. CREATE PROCEDURE
  1352. [dbo].[lin_UpdateJournal] ( @id INT,  
  1353. @j1 INT, @j2 INT, @j3 INT, @j4 INT, @j5 INT, @j6 INT, @j7 INT, @j8 INT,
  1354. @j9 INT, @j10 INT, @j11 INT, @j12 INT, @j13 INT, @j14 INT, @j15 INT, @j16 INT,
  1355. @j17 INT, @j18 INT, @j19 INT, @j20 INT, @j21 INT, @j22 INT, @j23 INT, @j24 INT, @j25 INT, @j26 INT
  1356. )
  1357. AS
  1358. UPDATE Quest
  1359. SET
  1360. j1 = @j1,
  1361. j2 = @j2,
  1362. j3 = @j3,
  1363. j4 = @j4,
  1364. j5 = @j5,
  1365. j6 = @j6,
  1366. j7 = @j7,
  1367. j8 = @j8,
  1368. j9 = @j9,
  1369. j10 = @j10,
  1370. j11 = @j11,
  1371. j12 = @j12,
  1372. j13 = @j13,
  1373. j14 = @j14,
  1374. j15 = @j15,
  1375. j16 = @j16,
  1376. j17 = @j17,
  1377. j18 = @j18,
  1378. j19 = @j19,
  1379. j20 = @j20,
  1380. j21 = @j21,
  1381. j22 = @j22,
  1382. j23 = @j23,
  1383. j24 = @j24,
  1384. j25 = @j25,
  1385. j26 = @j26
  1386. WHERE char_id = @id
  1387. GO
  1388.  
  1389. USE [lin2world]
  1390. GO
  1391.  
  1392. ALTER TABLE dbo.user_data ADD
  1393.     augmentation INT NOT NULL DEFAULT 0
  1394. GO
  1395.  
  1396. USE [lin2world]
  1397. GO
  1398.  
  1399. ALTER TABLE dbo.user_item ADD
  1400.     augmentation INT NOT NULL DEFAULT 0
  1401. GO
  1402.  
  1403. USE lin2world
  1404. GO
  1405.  
  1406. ALTER TABLE dbo.Pledge ADD
  1407.     delegate_clid INT NULL DEFAULT 0
  1408.  
  1409.  
  1410. USE [lin2world]
  1411. GO
  1412. /****** Object:  Table [dbo].[pledge_ext]    Script Date: 01/21/2008 03:50:36 ******/
  1413. /****** Made by [email protected] to support C5Ext.dll                ******/
  1414. SET ANSI_NULLS ON
  1415. GO
  1416. SET QUOTED_IDENTIFIER ON
  1417. GO
  1418. CREATE TABLE [dbo].[pledge_ext](
  1419.     [pledge_id] [INT] NOT NULL,
  1420.     [reputation_points] [INT] NOT NULL,
  1421.     [Rank1] [BIGINT] NOT NULL DEFAULT ((0)),
  1422.     [Rank2] [BIGINT] NOT NULL DEFAULT ((0)),
  1423.     [Rank3] [BIGINT] NOT NULL DEFAULT ((0)),
  1424.     [Rank4] [BIGINT] NOT NULL DEFAULT ((0)),
  1425.     [Rank5] [BIGINT] NOT NULL DEFAULT ((0)),
  1426.     [Rank6] [BIGINT] NOT NULL DEFAULT ((0)),
  1427.     [Rank7] [BIGINT] NOT NULL DEFAULT ((0)),
  1428.     [Rank8] [BIGINT] NOT NULL DEFAULT ((0)),
  1429.     [Rank9] [BIGINT] NOT NULL DEFAULT ((0)),
  1430.     [Skill0] [tinyint] NOT NULL DEFAULT ((0)),
  1431.     [Skill1] [tinyint] NOT NULL DEFAULT ((0)),
  1432.     [Skill2] [tinyint] NOT NULL DEFAULT ((0)),
  1433.     [Skill3] [tinyint] NOT NULL DEFAULT ((0)),
  1434.     [Skill4] [tinyint] NOT NULL DEFAULT ((0)),
  1435.     [Skill5] [tinyint] NOT NULL DEFAULT ((0)),
  1436.     [Skill6] [tinyint] NOT NULL DEFAULT ((0)),
  1437.     [Skill7] [tinyint] NOT NULL DEFAULT ((0)),
  1438.     [Skill8] [tinyint] NOT NULL DEFAULT ((0)),
  1439.     [Skill9] [tinyint] NOT NULL DEFAULT ((0)),
  1440.     [Skill10] [tinyint] NOT NULL DEFAULT ((0)),
  1441.     [Skill11] [tinyint] NOT NULL DEFAULT ((0)),
  1442.     [Skill12] [tinyint] NOT NULL DEFAULT ((0)),
  1443.     [Skill13] [tinyint] NOT NULL DEFAULT ((0)),
  1444.     [Skill14] [tinyint] NOT NULL DEFAULT ((0)),
  1445.     [Skill15] [tinyint] NOT NULL DEFAULT ((0)),
  1446.     [Skill16] [tinyint] NOT NULL DEFAULT ((0)),
  1447.     [Skill17] [tinyint] NOT NULL DEFAULT ((0)),
  1448.     [Skill18] [tinyint] NOT NULL DEFAULT ((0)),
  1449.     [Skill19] [tinyint] NOT NULL DEFAULT ((0)),
  1450.     [Skill20] [tinyint] NOT NULL DEFAULT ((0)),
  1451.     [Skill21] [tinyint] NOT NULL DEFAULT ((0)),
  1452.  CONSTRAINT [PK_pledge_ext] PRIMARY KEY CLUSTERED
  1453. (
  1454.     [pledge_id] ASC
  1455. )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
  1456. ) ON [PRIMARY]
  1457. GO
  1458.  
  1459. USE [lin2world]
  1460. GO
  1461. /****** Object:  Table [dbo].[pledge_ext]    Script Date: 01/21/2008 03:50:36 ******/
  1462. /****** Made by [email protected] to support C5Ext.dll                ******/
  1463. SET ANSI_NULLS ON
  1464. GO
  1465. SET QUOTED_IDENTIFIER ON
  1466. GO
  1467. CREATE TABLE dbo.pledge_subpledge
  1468.     (
  1469.     pledge_id INT NOT NULL,
  1470.     pledge_type INT NOT NULL,
  1471.     sub_name nvarchar(50) NOT NULL DEFAULT N'',
  1472.     leader_name nvarchar(50) NOT NULL DEFAULT N'',
  1473.     leader_dbid INT NOT NULL DEFAULT ((0))
  1474.     )  ON [PRIMARY]
  1475. GO
  1476.  
  1477. CREATE TABLE dbo.SiegeStat
  1478.     (
  1479.     char_id INT NOT NULL,
  1480.     pledge_id INT NOT NULL,
  1481.     castle_id INT NOT NULL,
  1482.     kill_count INT NULL,
  1483.     death_count INT NULL,
  1484.     damage_taken INT NULL,
  1485.     damage_dealt INT NULL
  1486.     )
  1487.    
  1488. GO
  1489.  
  1490. USE [lin2world]
  1491. GO
  1492. /* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
  1493. ALTER TABLE dbo.user_data ADD
  1494.     [Rank] tinyint NOT NULL DEFAULT 6,
  1495.     PledgeType INT NOT NULL DEFAULT 0,
  1496.     sponsor_id INT NOT NULL DEFAULT 0,
  1497.     JoinPledgeLevel INT NOT NULL DEFAULT 0
  1498. GO
  1499.  
  1500. SET ANSI_NULLS ON
  1501. GO
  1502. SET QUOTED_IDENTIFIER ON
  1503. GO
  1504. USE [lin2world]
  1505. GO
  1506.  
  1507. CREATE PROCEDURE lin_AddMemberStat
  1508.     -- Add the parameters for the stored procedure here
  1509.     @castle_id AS INT,
  1510.     @pledge_id AS INT,
  1511.     @char_id AS INT,
  1512.     @kill_count AS INT,
  1513.     @death_count AS INT,
  1514.     @damage_dealt AS INT,
  1515.     @damage_taken AS INT
  1516.  
  1517. AS
  1518. BEGIN
  1519.  
  1520.     SET NOCOUNT ON;
  1521.    
  1522.     INSERT INTO SiegeStat (castle_id, pledge_id, char_id, kill_count, death_count, damage_dealt, damage_taken)
  1523.                             VALUES(@castle_id, @pledge_id, @char_id, @kill_count, @death_count, @damage_dealt, @damage_taken)
  1524.  
  1525. END
  1526. GO
  1527.  
  1528. SET ANSI_NULLS ON
  1529. GO
  1530. SET QUOTED_IDENTIFIER ON
  1531. GO
  1532. USE [lin2world]
  1533. GO
  1534. -- =============================================
  1535. -- Author:      Vanganth
  1536. -- Create date:
  1537. -- Description: Procedure for new func RequestAddPledgeExt
  1538. -- =============================================
  1539. CREATE PROCEDURE lin_AddPledgeExt
  1540.     -- Add the parameters for the stored procedure here
  1541.     @pledge_id AS INT
  1542. AS
  1543. BEGIN
  1544.     -- SET NOCOUNT ON added to prevent extra result sets from
  1545.     -- interfering with SELECT statements.
  1546.     SET NOCOUNT ON;
  1547.     -- Insert statements for procedure here
  1548. INSERT INTO [lin2world].[dbo].[pledge_ext] ([pledge_id] ,[reputation_points],[Rank1],[Rank2],[Rank3],[Rank4],[Rank5],[Rank6],[Rank7],[Rank8],[Rank9],[Skill0],[Skill1],[Skill2],[Skill3],[Skill4],[Skill5],[Skill6],[Skill7],[Skill8],[Skill9],[Skill10],[Skill11],[Skill12],[Skill13],[Skill14],[Skill15],[Skill16],[Skill17],[Skill18],[Skill19],[Skill20],[Skill21])VALUES(@pledge_id,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
  1549.  
  1550. END
  1551. GO
  1552.  
  1553. SET ANSI_NULLS ON
  1554. GO
  1555. SET QUOTED_IDENTIFIER ON
  1556. GO
  1557. USE [lin2world]
  1558. GO
  1559. CREATE PROCEDURE lin_ClearPledgeStat
  1560.     -- Add the parameters for the stored procedure here
  1561.     @castle_id AS INT,
  1562.     @pledge_id AS INT
  1563.  
  1564. AS
  1565. BEGIN
  1566.  
  1567.     SET NOCOUNT ON;
  1568.  
  1569.     DELETE FROM SiegeStat WHERE castle_id = @castle_id AND pledge_id = @pledge_id
  1570.    
  1571.  
  1572. END
  1573. GO
  1574.  
  1575. SET ANSI_NULLS ON
  1576. GO
  1577. SET QUOTED_IDENTIFIER ON
  1578. GO
  1579. USE [lin2world]
  1580. GO
  1581. -- =============================================
  1582. -- Author:      Vanganth
  1583. -- Create date:
  1584. -- Description: Procedure for new func RequestCreateSubPledge
  1585. -- =============================================
  1586. CREATE PROCEDURE lin_CreateSubPledge
  1587.     -- Add the parameters for the stored procedure here
  1588.     @pledge_id AS INT,
  1589.     @pledge_type AS INT,
  1590.     @sub_name AS nvarchar(50)
  1591. AS
  1592. BEGIN
  1593.     -- SET NOCOUNT ON added to prevent extra result sets from
  1594.     -- interfering with SELECT statements.
  1595.     SET NOCOUNT ON;
  1596.  
  1597.  
  1598. IF(@pledge_id<>0)
  1599. BEGIN
  1600.     IF(@pledge_type = -1)
  1601.     BEGIN
  1602.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1603.                    ([pledge_id]
  1604.                    ,[pledge_type]
  1605.                    ,[sub_name]
  1606.                    ,[leader_name]
  1607.                    ,[leader_dbid])
  1608.              VALUES
  1609.                    (@pledge_id
  1610.                    ,@pledge_type
  1611.                    ,@sub_name
  1612.                    ,''
  1613.                    ,0)
  1614.     END
  1615. ELSE IF(@pledge_type = 100)
  1616.     BEGIN
  1617.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1618.                    ([pledge_id]
  1619.                    ,[pledge_type]
  1620.                    ,[sub_name]
  1621.                    ,[leader_name]
  1622.                    ,[leader_dbid])
  1623.              VALUES
  1624.                    (@pledge_id
  1625.                    ,@pledge_type
  1626.                    ,@sub_name
  1627.                    ,''
  1628.                    ,0)
  1629.     END
  1630. ELSE IF(@pledge_type = 200)
  1631.     BEGIN
  1632.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1633.                    ([pledge_id]
  1634.                    ,[pledge_type]
  1635.                    ,[sub_name]
  1636.                    ,[leader_name]
  1637.                    ,[leader_dbid])
  1638.              VALUES
  1639.                    (@pledge_id
  1640.                    ,@pledge_type
  1641.                    ,@sub_name
  1642.                    ,''
  1643.                    ,0)
  1644.     END
  1645. ELSE IF(@pledge_type = 1001)
  1646.     BEGIN
  1647.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1648.                    ([pledge_id]
  1649.                    ,[pledge_type]
  1650.                    ,[sub_name]
  1651.                    ,[leader_name]
  1652.                    ,[leader_dbid])
  1653.              VALUES
  1654.                    (@pledge_id
  1655.                    ,@pledge_type
  1656.                    ,@sub_name
  1657.                    ,''
  1658.                    ,0)
  1659.     END
  1660. ELSE IF(@pledge_type = 1002)
  1661.     BEGIN
  1662.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1663.                    ([pledge_id]
  1664.                    ,[pledge_type]
  1665.                    ,[sub_name]
  1666.                    ,[leader_name]
  1667.                    ,[leader_dbid])
  1668.              VALUES
  1669.                    (@pledge_id
  1670.                    ,@pledge_type
  1671.                    ,@sub_name
  1672.                    ,''
  1673.                    ,0)
  1674.     END
  1675. ELSE IF(@pledge_type = 2001)
  1676.     BEGIN
  1677.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1678.                    ([pledge_id]
  1679.                    ,[pledge_type]
  1680.                    ,[sub_name]
  1681.                    ,[leader_name]
  1682.                    ,[leader_dbid])
  1683.              VALUES
  1684.                    (@pledge_id
  1685.                    ,@pledge_type
  1686.                    ,@sub_name
  1687.                    ,''
  1688.                    ,0)
  1689.     END
  1690. ELSE IF(@pledge_type = 2002)
  1691.     BEGIN
  1692.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1693.                    ([pledge_id]
  1694.                    ,[pledge_type]
  1695.                    ,[sub_name]
  1696.                    ,[leader_name]
  1697.                    ,[leader_dbid])
  1698.              VALUES
  1699.                    (@pledge_id
  1700.                    ,@pledge_type
  1701.                    ,@sub_name
  1702.                    ,''
  1703.                    ,0)
  1704.     END
  1705. END
  1706.  
  1707. END
  1708. GO
  1709.  
  1710. USE [lin2world]
  1711. GO
  1712. /****** Object:  StoredProcedure [dbo].[lin_DelegateClanMaster]    Script Date: 10/20/2009 20:05:01 ******/
  1713. SET ANSI_NULLS ON
  1714. GO
  1715. SET QUOTED_IDENTIFIER ON
  1716. GO
  1717. -- =============================================
  1718. -- Author:      Vanganth
  1719. -- Create date:
  1720. -- Description: Procedure for Delegating clan masters
  1721. -- =============================================
  1722. CREATE PROCEDURE [dbo].[lin_DelegateClanMaster]
  1723. @pledge_id AS INT
  1724. AS
  1725.  
  1726. SET NOCOUNT ON;
  1727. DECLARE @delegate_clid INT;
  1728. DECLARE @clan_id INT;
  1729.  
  1730. SELECT @delegate_clid=delegate_clid FROM Pledge WHERE pledge_id = @pledge_id
  1731. IF( @delegate_clid <> 0 )
  1732.  BEGIN
  1733.   SELECT @clan_id = pledge_id FROM user_data WHERE char_id = @delegate_clid
  1734.   IF( @clan_id = @pledge_id )
  1735.   BEGIN
  1736.    UPDATE Pledge SET ruler_id = @delegate_clid WHERE pledge_id = @pledge_id
  1737.    UPDATE Pledge SET delegate_clid = 0 WHERE pledge_id = @pledge_id
  1738.   END
  1739.   ELSE
  1740.   BEGIN
  1741.    UPDATE Pledge SET delegate_clid = 0 WHERE pledge_id = @pledge_id
  1742.   END
  1743.  END
  1744.  
  1745. GO
  1746.  
  1747. SET ANSI_NULLS ON
  1748. GO
  1749. SET QUOTED_IDENTIFIER ON
  1750. GO
  1751. USE [lin2world]
  1752. GO
  1753. -- =============================================
  1754. -- Author:      Vanganth
  1755. -- Create date:
  1756. -- Description: Procedure for new func RequestLearnClanSkill
  1757. -- =============================================
  1758. CREATE PROCEDURE lin_LearnClanSkill
  1759.     -- Add the parameters for the stored procedure here
  1760.     @pledge_id AS INT,
  1761.     @clan_skill AS INT,
  1762.     @new_level AS INT
  1763. AS
  1764. BEGIN
  1765.     -- SET NOCOUNT ON added to prevent extra result sets from
  1766.     -- interfering with SELECT statements.
  1767.     SET NOCOUNT ON;
  1768.  
  1769. IF((@clan_skill >= 370 AND @clan_skill < 392) AND @new_level < 4)
  1770. BEGIN
  1771.  
  1772.     IF(@clan_skill = 370)
  1773.     BEGIN
  1774.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill0]=@new_level WHERE [pledge_id] = @pledge_id
  1775.     END
  1776. ELSE IF(@clan_skill = 371)
  1777.     BEGIN
  1778.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill1]=@new_level WHERE [pledge_id] = @pledge_id
  1779.     END
  1780. ELSE IF(@clan_skill = 372)
  1781.     BEGIN
  1782.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill2]=@new_level WHERE [pledge_id] = @pledge_id
  1783.     END
  1784. ELSE IF(@clan_skill = 373)
  1785.     BEGIN
  1786.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill3]=@new_level WHERE [pledge_id] = @pledge_id
  1787.     END
  1788. ELSE IF(@clan_skill = 374)
  1789.     BEGIN
  1790.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill4]=@new_level WHERE [pledge_id] = @pledge_id
  1791.     END
  1792. ELSE IF(@clan_skill = 375)
  1793.     BEGIN
  1794.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill5]=@new_level WHERE [pledge_id] = @pledge_id
  1795.     END
  1796. ELSE IF(@clan_skill = 376)
  1797.     BEGIN
  1798.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill6]=@new_level WHERE [pledge_id] = @pledge_id
  1799.     END
  1800. ELSE IF(@clan_skill = 377)
  1801.     BEGIN
  1802.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill7]=@new_level WHERE [pledge_id] = @pledge_id
  1803.     END
  1804. ELSE IF(@clan_skill = 378)
  1805.     BEGIN
  1806.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill8]=@new_level WHERE [pledge_id] = @pledge_id
  1807.     END
  1808. ELSE IF(@clan_skill = 379)
  1809.     BEGIN
  1810.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill9]=@new_level WHERE [pledge_id] = @pledge_id
  1811.     END
  1812. ELSE IF(@clan_skill = 380)
  1813.     BEGIN
  1814.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill10]=@new_level WHERE [pledge_id] = @pledge_id
  1815.     END
  1816. ELSE IF(@clan_skill = 381)
  1817.     BEGIN
  1818.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill11]=@new_level WHERE [pledge_id] = @pledge_id
  1819.     END
  1820. ELSE IF(@clan_skill = 382)
  1821.     BEGIN
  1822.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill12]=@new_level WHERE [pledge_id] = @pledge_id
  1823.     END
  1824. ELSE IF(@clan_skill = 383)
  1825.     BEGIN
  1826.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill13]=@new_level WHERE [pledge_id] = @pledge_id
  1827.     END
  1828. ELSE IF(@clan_skill = 384)
  1829.     BEGIN
  1830.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill14]=@new_level WHERE [pledge_id] = @pledge_id
  1831.     END
  1832. ELSE IF(@clan_skill = 385)
  1833.     BEGIN
  1834.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill15]=@new_level WHERE [pledge_id] = @pledge_id
  1835.     END
  1836. ELSE IF(@clan_skill = 386)
  1837.     BEGIN
  1838.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill16]=@new_level WHERE [pledge_id] = @pledge_id
  1839.     END
  1840. ELSE IF(@clan_skill = 387)
  1841.     BEGIN
  1842.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill17]=@new_level WHERE [pledge_id] = @pledge_id
  1843.     END
  1844. ELSE IF(@clan_skill = 388)
  1845.     BEGIN
  1846.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill18]=@new_level WHERE [pledge_id] = @pledge_id
  1847.     END
  1848. ELSE IF(@clan_skill = 389)
  1849.     BEGIN
  1850.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill19]=@new_level WHERE [pledge_id] = @pledge_id
  1851.     END
  1852. ELSE IF(@clan_skill = 390)
  1853.     BEGIN
  1854.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill20]=@new_level WHERE [pledge_id] = @pledge_id
  1855.     END
  1856. ELSE IF(@clan_skill = 391)
  1857.     BEGIN
  1858.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill21]=@new_level WHERE [pledge_id] = @pledge_id
  1859.     END
  1860. END
  1861.  
  1862. END
  1863. GO
  1864.  
  1865. USE lin2world
  1866. GO
  1867.  
  1868. SET ANSI_NULLS ON
  1869. GO
  1870. SET QUOTED_IDENTIFIER ON
  1871. GO
  1872. -- =============================================
  1873. -- Author:      Vanganth
  1874. -- Create date:
  1875. -- Description: Procedure for new func RequestLoadPledgeExtendInfo
  1876. -- =============================================
  1877. CREATE PROCEDURE lin_LoadPledgeExtendInfo
  1878.     -- Add the parameters for the stored procedure here
  1879.     @pledge_id AS INT
  1880. AS
  1881. BEGIN
  1882.     -- SET NOCOUNT ON added to prevent extra result sets from
  1883.     -- interfering with SELECT statements.
  1884.     SET NOCOUNT ON;
  1885.  
  1886.     -- Insert statements for procedure here
  1887. SELECT [reputation_points]
  1888.       ,[Rank1]
  1889.       ,[Rank2]
  1890.       ,[Rank3]
  1891.       ,[Rank4]
  1892.       ,[Rank5]
  1893.       ,[Rank6]
  1894.       ,[Rank7]
  1895.       ,[Rank8]
  1896.       ,[Rank9]
  1897.       ,[Skill0]
  1898.       ,[Skill1]
  1899.       ,[Skill2]
  1900.       ,[Skill3]
  1901.       ,[Skill4]
  1902.       ,[Skill5]
  1903.       ,[Skill6]
  1904.       ,[Skill7]
  1905.       ,[Skill8]
  1906.       ,[Skill9]
  1907.       ,[Skill10]
  1908.       ,[Skill11]
  1909.       ,[Skill12]
  1910.       ,[Skill13]
  1911.       ,[Skill14]
  1912.       ,[Skill15]
  1913.       ,[Skill16]
  1914.       ,[Skill17]
  1915.       ,[Skill18]
  1916.       ,[Skill19]
  1917.       ,[Skill20]
  1918.       ,[Skill21]
  1919.   FROM [lin2world].[dbo].[pledge_ext] WHERE [pledge_id] = @pledge_id
  1920. END
  1921. GO
  1922.  
  1923. USE lin2world
  1924. GO
  1925.  
  1926. SET ANSI_NULLS ON
  1927. GO
  1928. SET QUOTED_IDENTIFIER ON
  1929. GO
  1930. -- =============================================
  1931. -- Author:      Vanganth
  1932. -- Create date:
  1933. -- Description: Procedure for new func RequestLoadPledgeExtendInfo
  1934. -- =============================================
  1935. CREATE PROCEDURE lin_LoadSubPledges
  1936.     -- Add the parameters for the stored procedure here
  1937.     @pledge_id AS INT
  1938. AS
  1939. BEGIN
  1940.     -- SET NOCOUNT ON added to prevent extra result sets from
  1941.     -- interfering with SELECT statements.
  1942.     SET NOCOUNT ON;
  1943.  
  1944.     -- Insert statements for procedure here
  1945. IF(@pledge_id <> 0)
  1946. BEGIN
  1947. SELECT TOP 7 pledge_type, sub_name, leader_name, leader_dbid  FROM pledge_subpledge (nolock) WHERE pledge_id = @pledge_id AND pledge_type != 0
  1948. END
  1949. END
  1950. GO
  1951.  
  1952. SET ANSI_NULLS ON
  1953. GO
  1954. SET QUOTED_IDENTIFIER ON
  1955. GO
  1956. USE [lin2world]
  1957. GO
  1958. -- =============================================
  1959. -- Author:      Vanganth
  1960. -- Create date:
  1961. -- Description: Procedure for new func RequestRenameSubPledge
  1962. -- =============================================
  1963. CREATE PROCEDURE lin_RenameSubPledge
  1964.     -- Add the parameters for the stored procedure here
  1965.     @pledge_id AS INT,
  1966.     @pledge_type AS INT,
  1967.     @sub_name AS nvarchar(50)
  1968. AS
  1969. BEGIN
  1970.     -- SET NOCOUNT ON added to prevent extra result sets from
  1971.     -- interfering with SELECT statements.
  1972.     SET NOCOUNT ON;
  1973.  
  1974.  
  1975. IF(@pledge_id<>0)
  1976. BEGIN
  1977.     IF(@pledge_type = -1)
  1978.     BEGIN
  1979.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1980.     END
  1981. ELSE IF(@pledge_type = 100)
  1982.     BEGIN
  1983.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1984.     END
  1985. ELSE IF(@pledge_type = 200)
  1986.     BEGIN
  1987.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1988.     END
  1989. ELSE IF(@pledge_type = 1001)
  1990.     BEGIN
  1991.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1992.     END
  1993. ELSE IF(@pledge_type = 1002)
  1994.     BEGIN
  1995.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1996.     END
  1997. ELSE IF(@pledge_type = 2001)
  1998.     BEGIN
  1999.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  2000.     END
  2001. ELSE IF(@pledge_type = 2002)
  2002.     BEGIN
  2003.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  2004.     END
  2005. END
  2006.  
  2007. END
  2008. GO
  2009.  
  2010. SET ANSI_NULLS ON
  2011. GO
  2012. SET QUOTED_IDENTIFIER ON
  2013. GO
  2014. USE [lin2world]
  2015. GO
  2016. -- =============================================
  2017. -- Author:      Vanganth
  2018. -- Create date:
  2019. -- Description: Procedure for new func RequestReorganizeMember
  2020. -- =============================================
  2021. CREATE PROCEDURE lin_ReorganizePledgeMember
  2022.     -- Add the parameters for the stored procedure here
  2023.     @char_name AS nvarchar(50),
  2024.     @pledge_type AS INT,
  2025.     @pledge_id AS INT
  2026.  
  2027. AS
  2028. BEGIN
  2029.  
  2030.     SET NOCOUNT ON;
  2031.  
  2032. UPDATE [lin2world].[dbo].[user_data] SET [PledgeType] = @pledge_type WHERE ([char_name] = @char_name AND [pledge_id] = @pledge_id)
  2033. SELECT [char_id] FROM [lin2world].[dbo].[user_data] WHERE [char_name] = @char_name
  2034.  
  2035. END
  2036. GO
  2037.  
  2038. SET ANSI_NULLS ON
  2039. GO
  2040. SET QUOTED_IDENTIFIER ON
  2041. GO
  2042. USE [lin2world]
  2043. GO
  2044. -- =============================================
  2045. -- Author:      Vanganth
  2046. -- Create date:
  2047. -- Description: Procedure for Running Delegate clan master procedure for each pledge
  2048. -- =============================================
  2049. CREATE PROCEDURE lin_RunDelegateClanMaster
  2050. AS
  2051.  
  2052. SET NOCOUNT ON;
  2053. DECLARE
  2054. @pledge_id INT
  2055. DECLARE CUR1 CURSOR FOR
  2056. SELECT [pledge_id] FROM lin2world.dbo.Pledge WHERE [delegate_clid] > 0
  2057. OPEN CUR1
  2058. FETCH NEXT FROM CUR1
  2059. INTO @pledge_id
  2060. WHILE (@@FETCH_STATUS <> -1)
  2061. BEGIN
  2062. EXEC lin2world.dbo.[lin_DelegateClanMaster] @pledge_id
  2063. FETCH NEXT FROM CUR1
  2064. INTO @pledge_id
  2065. END
  2066. CLOSE CUR1
  2067. DEALLOCATE CUR1
  2068. GO
  2069.  
  2070. SET ANSI_NULLS ON
  2071. GO
  2072. SET QUOTED_IDENTIFIER ON
  2073. GO
  2074. USE [lin2world]
  2075. GO
  2076. -- =============================================
  2077. -- Author:      Vanganth
  2078. -- Create date:
  2079. -- Description: Procedure for new func RequestSetPledgePrivilege
  2080. -- =============================================
  2081. CREATE PROCEDURE lin_SetPledgePrivilege
  2082.     -- Add the parameters for the stored procedure here
  2083.     @pledge_id AS INT,
  2084.     @rank AS INT,
  2085.     @privilege AS INT
  2086. AS
  2087. BEGIN
  2088.     -- SET NOCOUNT ON added to prevent extra result sets from
  2089.     -- interfering with SELECT statements.
  2090.     SET NOCOUNT ON;
  2091.  
  2092.  
  2093. IF(@rank > 0 AND @rank < 10)
  2094. BEGIN
  2095.     IF(@rank = 1)
  2096.     BEGIN
  2097.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank1]=@privilege WHERE [pledge_id] = @pledge_id
  2098.     END
  2099. ELSE IF(@rank = 2)
  2100.     BEGIN
  2101.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank2]=@privilege WHERE [pledge_id] = @pledge_id
  2102.     END
  2103. ELSE IF(@rank = 3)
  2104.     BEGIN
  2105.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank3]=@privilege WHERE [pledge_id] = @pledge_id
  2106.     END
  2107. ELSE IF(@rank = 4)
  2108.     BEGIN
  2109.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank4]=@privilege WHERE [pledge_id] = @pledge_id
  2110.     END
  2111. ELSE IF(@rank = 5)
  2112.     BEGIN
  2113.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank5]=@privilege WHERE [pledge_id] = @pledge_id
  2114.     END
  2115. ELSE IF(@rank = 6)
  2116.     BEGIN
  2117.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank6]=@privilege WHERE [pledge_id] = @pledge_id
  2118.     END
  2119. ELSE IF(@rank = 7)
  2120.     BEGIN
  2121.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank7]=@privilege WHERE [pledge_id] = @pledge_id
  2122.     END
  2123. ELSE IF(@rank = 8)
  2124.     BEGIN
  2125.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank8]=@privilege WHERE [pledge_id] = @pledge_id
  2126.     END
  2127. ELSE IF(@rank = 9)
  2128.     BEGIN
  2129.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank9]=@privilege WHERE [pledge_id] = @pledge_id
  2130.     END
  2131. END
  2132.  
  2133. END
  2134. GO
  2135.  
  2136. SET ANSI_NULLS ON
  2137. GO
  2138. SET QUOTED_IDENTIFIER ON
  2139. GO
  2140. USE [lin2world]
  2141. GO
  2142. -- =============================================
  2143. -- Author:      Vanganth
  2144. -- Create date:
  2145. -- Description: Procedure for new func RequestSetSubCaptain
  2146. -- =============================================
  2147. CREATE PROCEDURE lin_SetSubCaptain
  2148.     -- Add the parameters for the stored procedure here
  2149.     @pledge_id AS INT,
  2150.     @pledge_type AS INT,
  2151.     @captain_name AS nvarchar(50),
  2152.     @captain_id AS INT
  2153. AS
  2154. BEGIN
  2155.     -- SET NOCOUNT ON added to prevent extra result sets from
  2156.     -- interfering with SELECT statements.
  2157.     SET NOCOUNT ON;
  2158.  
  2159.  
  2160. IF(@pledge_id<>0)
  2161. BEGIN
  2162.     UPDATE [lin2world].[dbo].[pledge_subpledge] SET [leader_name]=@captain_name, [leader_dbid]=@captain_id WHERE ([pledge_id]=@pledge_id AND [pledge_type] = @pledge_type)
  2163. END
  2164.  
  2165. END
  2166. GO
  2167.  
  2168. USE lin2world
  2169. GO
  2170.  
  2171. ALTER TABLE dbo.user_item ADD
  2172.     mana_left INT NOT NULL DEFAULT 0
  2173. GO
  2174.  
  2175. USE lin2world
  2176. GO
  2177.  
  2178. ALTER  TABLE user_data ADD
  2179.     effective_mana0 INT NOT NULL DEFAULT 0,
  2180.     effective_mana1 INT NOT NULL DEFAULT 0,
  2181.     effective_mana2 INT NOT NULL DEFAULT 0,
  2182.     effective_mana3 INT NOT NULL DEFAULT 0
  2183. GO
Advertisement
Add Comment
Please, Sign In to add comment