1
111Mutay
Guest
- Konu Yazar
- #1
Merhaba arkadaşlar. Sizlere geliştirdiğim ufak bir sistemi sunacağım. Bu sistem açılan her yeni karaktere belirlediğiniz itemleri letter ile otomatik olarak yolluyor. Job ayırt edebiliyor.
Not : Bu sistem sadece Letter sistemi aktif olan sunucularda çalışır.
NOT: DİĞER FORUMLARDA PAYLAŞACAK ARKADAŞLAR, NERONLINEWORLD'den alıntıdır yazarlarsa sevinirim.
Veritabanınıza eklemeniz gereken prosedürler(Query Analyzer'e yapıştırıp F5 çekin.)
1. Prosedür SEND_ITEM
2. Prosedür YENICHAR_LETTER
Ve son olarak da şu satırı CREATE_NEW_CHAR prosedürünüzün en altına gelin ve
kısmının hemen üstüne aşağıdaki kodu yazın.
Hayırlı olsun
Oto letter sistemini başarıyla kurdunuz. Şimdi gelelim düzenlemeye. Eğer yeni açılan charlara benim belirlediğimden farklı itemler göndermek isterseniz YENICHAR_LETTER prosedürünü açtıktan sonra gerekli jobun bulunduğu satıra aşağıdaki kodu ekleyin.
Hangi satırın hangi joba ait olduğunu anlayamayanlar için class kodlarının karşılıkları;
Bilgi paylaştıkça çoğalır
Güle güle kullanın.
Not : Bu sistem sadece Letter sistemi aktif olan sunucularda çalışır.
NOT: DİĞER FORUMLARDA PAYLAŞACAK ARKADAŞLAR, NERONLINEWORLD'den alıntıdır yazarlarsa sevinirim.
Veritabanınıza eklemeniz gereken prosedürler(Query Analyzer'e yapıştırıp F5 çekin.)
1. Prosedür SEND_ITEM
--DBADINIZ YAZAN YERE DB İSMİNİZİ YAZIN.
USE [DBADINIZ]
GO
/****** Object: StoredProcedure [dbo].[SEND_ITEM] Script Date: 03/14/2012 19:01:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
--Snakeman tarafindan yazilmistir.
--13.02.2012 17:13
--Bunlari degistiren ajdardir,toptur,delikli nane polodur.
ALTER PROCEDURE [dbo].[SEND_ITEM]
@StrUserID char(21),
@Item int
AS
--09.03.2012 Mustify tarafından düzenlendi, MailServer Kapat hatası giderildi.
BEGIN
INSERT INTO MAIL_ITEM (bType, sId, tId, title, bAccess, content, type, gold, itemId, sDur, sCount, serial, pos, bDay,UpdateTime) VALUES (6, 'Admin', @StrUserID, 'Hediye', 2, 'Bu item,size yonetim tarafindan hediye olarak gonderildi.', 2, '10000000',@Item,1,1,0,0,7,GetDate())
END
2. Prosedür YENICHAR_LETTER
--DBADINIZ YAZAN YERE DB İSMİNİZİ YAZIN.
USE [DBADINIZ]
GO
/****** Object: StoredProcedure [dbo].[YENICHAR_LETTER] Script Date: 03/14/2012 18:56:09 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[YENICHAR_LETTER]
@account varchar(21)
AS
--Mustify tarafından kodlanmıştır. Bu satırı değiştiren Ajdardır.
begin
/*1 = Warrior
2 = Rogue
3 = Mage
4 = Priest
*/
declare @class smallint
print @class
select @class = class from userdata where struserid=@account
print @class
if @class=101 or @class=105 or @class=106 or @class=201 or @class=205 or @class=206
begin
exec send_item @account,'139440790' /* baal */
exec send_item @account,'156310050' /* raptor */
exec send_item @account,'135750280' /* giga */
exec send_item @account,'159420770' /* nebiros */
exec send_item @account,'197420350' /* gabs */
exec send_item @account,'129101220' /* hanguk */
exec send_item @account,'206001020' /* shell */
exec send_item @account,'206002020' /* shell */
exec send_item @account,'206003020' /* shell*/
exec send_item @account,'206004020' /* shell*/
exec send_item @account,'206005020' /* shell */
exec send_item @account,'330620435' /* rof*/
exec send_item @account,'330620435' /* rof */
exec send_item @account,'340610375' /* belt */
exec send_item @account,'320310415' /* neck */
exec send_item @account,'310511135' /* mino*/
exec send_item @account,'310511135' /* mino */
exec send_item @account,'149101230' /* hb*/
exec send_item @account,'910120360' /* quest*/
exec send_item @account,'139301530' /* avedon */
exec send_item @account,'379063000' /* scream sc */
end
if @class=102 or @class=107 or @class=108 or @class=202 or @class=207 or @class=208
begin
exec send_item @account,'246001520' /* shell*/
exec send_item @account,'246002520' /* shell*/
exec send_item @account,'246003520' /* shell*/
exec send_item @account,'246004520' /* shell*/
exec send_item @account,'246005520' /* shell*/
exec send_item @account,'310512145' /* hr*/
exec send_item @account,'310512145' /* hr*/
exec send_item @account,'128420820' /* raum*/
exec send_item @account,'128420820' /* raum*/
exec send_item @account,'180440790' /* wf*/
exec send_item @account,'169302420' /* ee*/
exec send_item @account,'119101210' /* dv*/
exec send_item @account,'910119310' /* self */
exec send_item @account,'119102420' /*chd*/
exec send_item @account,'169301540' /*helenid*/
exec send_item @account,'330620435' /* rof*/
exec send_item @account,'330620435' /* rof */
exec send_item @account,'340610375' /* belt */
exec send_item @account,'320310415' /* neck */
exec send_item @account,'379064000' /* valor */
end
if @class=103 or @class=109 or @class=110 or @class=203 or @class=209 or @class=210
begin
exec send_item @account,'330910605' /* flame ring */
exec send_item @account,'330910605' /* flame ring */
exec send_item @account,'330930625' /* imir ring */
exec send_item @account,'330930625' /* imir ring */
exec send_item @account,'330920625' /* shio tears */
exec send_item @account,'330920625' /* shio tears */
exec send_item @account,'320110315' /* elemental pend. */
exec send_item @account,'340410395' /* Glass belt */
exec send_item @account,'910123580' /* Staff of selfname */
exec send_item @account,'379065000' /* Absolute pw sc */
exec send_item @account,'310513155' /* Lich king */
exec send_item @account,'310513155' /* Lich king */
exec send_item @account,'800015000' /* Speed */
exec send_item @account,'379070000' /* 57 */
exec send_item @account,'379069000' /* 51 */
exec send_item @account,'266001510' /* complete */
exec send_item @account,'266002510' /* complete */
exec send_item @account,'266003510' /* complete */
exec send_item @account,'266004510' /* complete */
exec send_item @account,'266005510' /* complete */
exec send_item @account,'320310415' /* Iron Neck */
exec send_item @account,'800036000' /* rez sc */
exec send_item @account,'182430820' /* fulitol */
exec send_item @account,'184430880' /* faun */
exec send_item @account,'183230850' /* molok */
end
if @class=104 or @class=111 or @class=112 or @class=204 or @class=211 or @class=212
begin
exec send_item @account,'286001510' /* shell*/
exec send_item @account,'286002510' /* shell*/
exec send_item @account,'286003510' /* shell*/
exec send_item @account,'286004510' /* shell*/
exec send_item @account,'286005510' /* shell*/
exec send_item @account,'149101230' /* hb*/
exec send_item @account,'330620435' /* rof*/
exec send_item @account,'330620435' /* rof */
exec send_item @account,'340610375' /* belt */
exec send_item @account,'320310415' /* neck */
exec send_item @account,'170250270' /* cs */
exec send_item @account,'179102330' /* ds */
exec send_item @account,'310514165' /* lillime */
exec send_item @account,'310514165' /* lillime */
exec send_item @account,'190250280' /* lobo */
exec send_item @account,'190250300' /* lycaon */
exec send_item @account,'199301580' /* holy animor */
exec send_item @account,'910125380' /* self */
exec send_item @account,'197420350' /* gabs */
exec send_item @account,'198420440' /* leonar */
exec send_item @account,'379066000' /* judge */
exec send_item @account,'170250280' /* scorpion shield */
exec send_item @account,'281001020' /* paper */
exec send_item @account,'281002020' /* paper */
exec send_item @account,'281003020' /* paper */
exec send_item @account,'281004020' /* paper */
exec send_item @account,'281005020' /* paper */
end
if @class=101 update userdata set class = '106' where struserid = @account
if @class=201 update userdata set class = '206' where struserid = @account
if @class=102 update userdata set class = '108' where struserid = @account
if @class=202 update userdata set class = '208' where struserid = @account
if @class=103 update userdata set class = '110' where struserid = @account
if @class=203 update userdata set class = '210' where struserid = @account
if @class=104 update userdata set class = '111' where struserid = @account
if @class=204 update userdata set class = '211' where struserid = @account
end
Ve son olarak da şu satırı CREATE_NEW_CHAR prosedürünüzün en altına gelin ve
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
SET @nRet = 4
RETURN
END
COMMIT TRAN
SET @nRet = 0
kısmının hemen üstüne aşağıdaki kodu yazın.
exec YENICHAR_LETTER @CharID
Hayırlı olsun

exec send_item @account,'itemkodu'
Hangi satırın hangi joba ait olduğunu anlayamayanlar için class kodlarının karşılıkları;
(kod başındaki 1 ve 2 rakamları Nation belirtir. 1 karus, 2 human)
101/201:Noob Warrior
105/205:Skill açtırmış Warrior
106/206 :Master Warrior
102/202 : Noob Rogue
107/207 : Skill Açtırmış Rogue
108/208 : Master Rogue
103/203 : Noob Mage
109/209 : Skill Açtırmış Mage
110/210 : Master Mage
104/204 : Noob Priest
111/211 : Skill Açtırmış Priest
112/212 : Master Priest
Bilgi paylaştıkça çoğalır
