Alengirik

Administrator
Administrator
Katılım
4 Kas 2022
Mesajlar
136
Tepki
70
Konum
Founder
Kostüm Süre Uzatma Sistemi, birçok oyunda bulunan ve oyuncuların belirli bir süre boyunca kullanabilecekleri bir kıyafet veya kostümün süresini uzatmalarına olanak tanıyan bir sistemdir. Bu sistem, genellikle oyuncuların oyunda daha uzun süre kalmasını ve daha fazla ödül veya kazanç elde etmelerini sağlamak için kullanılır.

Kostüm Süre Uzatma Sistemi, oyuncuların kostümlerinin süresinin dolmasına yakın bir zamanda, sistem tarafından belirli bir ücret karşılığında sürenin uzatılmasını sağlayan bir özellik içerir. Bu özellik, oyuncuların daha uzun süre boyunca kostümlerini kullanmalarını ve dolayısıyla daha fazla fayda sağlamalarını sağlar.

Bu sistem genellikle oyunculara çeşitli avantajlar sağlar, özellikle PvP (oyuncu vs oyuncu) gibi rekabetçi oyun modlarında. Kostüm Süre Uzatma Sistemi, oyun geliştiricilerine de bir avantaj sağlar, çünkü oyuncuların oyunda daha uzun süre kalması, oyuncuların daha fazla ödül kazanması veya daha fazla öğe satın alması için daha fazla fırsat sunar.
3077_735099daf3ef5389f95c49d78d208026.gif


Kostüm Süre Uzatma Sistemi V1
Kısıtlama koymadım. Binek, silah kostümü, zırh kostümü, saç kostümü ne varsa üzerine sürüklediğinizde süresi artar.
Süre değişkenini protodan değiştirebilirsiniz. Yapmanız gereken value0 değerini değiştirmek.
Source den süreyi gün olarak ayarladım.1 yazarsanız 1 gün, 10 yazarsanız 10gün olur.
Süre uzatma eşyasının miktarını arttırabilirsiniz. 7,14,30 gün şeklinde. Yapmanız gereken char_item ile uiinventory'ye yeni eşyaların vnumlarını ilave etmek.

Kostüm Süre Uzatma Sistemi V2
Özel ikon yaptım.
7 güne ilaveten 14 ve 30 gün olan 2 adet kostüm uzatma ekledim.
Kostüm uzatmalara Eklenecek süre bilgisi ekledim.

Kostüm Süre Uzatma Sistemi V3
Süre uzatma limiti eklendi.(365)
Süresi 0 olan kostümlere süre verilmesi çözümlendi.
Kuşak hatası çözümlendi.
REAL_TIME_FIRST_USE(süresi takıldıktan sonra azalmaya başlayan) olan eşyalara süre verme ile ilgili hata giderildi.




Kostüm Eklemek için SQL Kodları v4
insert into item_proto (`vnum`, `type`, `subtype`, `name`, `locale_name`, `gold`, `shop_buy_price`, `weight`, `size`, `flag`, `wearflag`, `antiflag`, `immuneflag`, `refined_vnum`, `refine_set`, `magic_pct`, `socket_pct`, `addon_type`, `specular`, `limittype0`, `limitvalue0`, `limittype1`, `limitvalue1`, `applytype0`, `applyvalue0`, `applytype1`, `applyvalue1`, `applytype2`, `applyvalue2`, `value0`, `value1`, `value2`, `value3`, `value4`, `value5` ) values (84014, 3, 10, "KOSTUM_SURE_UZATMA", "Sure Uzat", 0, 0, 0, 1, 8192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0 );
insert into item_proto (`vnum`, `type`, `subtype`, `name`, `locale_name`, `gold`, `shop_buy_price`, `weight`, `size`, `flag`, `wearflag`, `antiflag`, `immuneflag`, `refined_vnum`, `refine_set`, `magic_pct`, `socket_pct`, `addon_type`, `specular`, `limittype0`, `limitvalue0`, `limittype1`, `limitvalue1`, `applytype0`, `applyvalue0`, `applytype1`, `applyvalue1`, `applytype2`, `applyvalue2`, `value0`, `value1`, `value2`, `value3`, `value4`, `value5` ) values (84015, 3, 10, "KOSTUM_SURE_UZATMA", "Sure Uzat", 0, 0, 0, 1, 8192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0 );
insert into item_proto (`vnum`, `type`, `subtype`, `name`, `locale_name`, `gold`, `shop_buy_price`, `weight`, `size`, `flag`, `wearflag`, `antiflag`, `immuneflag`, `refined_vnum`, `refine_set`, `magic_pct`, `socket_pct`, `addon_type`, `specular`, `limittype0`, `limitvalue0`, `limittype1`, `limitvalue1`, `applytype0`, `applyvalue0`, `applytype1`, `applyvalue1`, `applytype2`, `applyvalue2`, `value0`, `value1`, `value2`, `value3`, `value4`, `value5` ) values (84016, 3, 10, "KOSTUM_SURE_UZATMA", "Sure Uzat", 0, 0, 0, 1, 8192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0 );


Random olarak Kostüm Süresi vermek​


function costum_body()
local settings = {}
costum_body_erkek = {
{41001,1}, {41003,1}, {41005,1}, {41007,1}, {41009,1}, {41011,1}, {41013,1}, {41015,1}, {41017,1}, {41019,1},
{41021,1}, {41023,1}, {41025,1}, {41027,1}, {41029,1}, {41031,1}, {41033,1}, {41035,1}, {41037,1}, {41039,1},
{41041,1}, {41043,1}, {41045,1}, {41047,1}, {41049,1}, {41051,1}, {41053,1},
}
costum_body_kadin = {
{41002,1}, {41004,1}, {41006,1}, {41008,1}, {41010,1}, {41012,1}, {41014,1}, {41016,1}, {41018,1}, {41020,1},
{41022,1}, {41024,1}, {41026,1}, {41028,1}, {41030,1}, {41032,1}, {41034,1}, {41036,1}, {41038,1}, {41040,1},
{41042,1}, {41044,1}, {41046,1}, {41048,1}, {41050,1}, {41052,1}, {41054,1},
}
end

function costum_hair()
local settings = {}
costum_hair_erkek = {
{45001,1}, {45003,1}, {45005,1}, {45007,1}, {45009,1}, {45011,1}, {45013,1}, {45014,1}, {45016,1}, {45018,1},
{45020,1}, {45022,1}, {45024,1}, {45026,1}, {45028,1}, {45030,1}, {45032,1}, {45034,1}, {45036,1}, {45038,1},
{45040,1}, {45042,1}, {45044,1}, {45046,1}, {45048,1}, {45050,1}, {45052,1}, {45054,1}, {45056,1}, {45058,1},
{45060,1}, {45062,1}, {45064,1}, {45066,1}, {45067,1}, {45068,1}, {45070,1}, {45072,1}, {45074,1},
}
costum_hair_kadin = {
{45002,1}, {45004,1}, {45006,1}, {45008,1}, {45010,1}, {45012,1}, {45015,1}, {45017,1}, {45019,1}, {45021,1},
{45023,1}, {45025,1}, {45027,1}, {45029,1}, {45031,1}, {45033,1}, {45035,1}, {45037,1}, {45039,1}, {45041,1},
{45043,1}, {45045,1}, {45047,1}, {45049,1}, {45051,1}, {45053,1}, {45055,1}, {45057,1}, {45059,1}, {45061,1},
{45063,1}, {45065,1}, {45069,1}, {45071,1}, {45073,1}, {45075,1},
}
end

function costum_weapon()
local settings = {}
warrior_weapon = {
{40101,1}, {40115,1}, {40129,1}, {40104,1}, {40118,1}, {40132,1}
}
assasian_weapon = {
{40102,1}, {40103,1}, {40116,1}, {40117,1}, {40130,1}, {40131,1}
}
sura_weapon = {
{40101,1}, {40115,1}, {40129,1}
}
shaman_weapon = {
{40105,1}, {40106,1}, {40119,1}, {40120,1}, {40133,1}, {40134,1}
}
end

function pets()
local settings = {}
pets_table = {
{53001,1}, {53002,1}, {53003,1}, {53004,1}, {53005,1}, {53006,1}, {53007,1}, {53008,1}, {53009,1}, {53010,1},
{53011,1}, {53012,1}, {53013,1}, {53014,1}, {53015,1}, {53016,1}, {53017,1}, {53018,1}, {53019,1}, {53020,1},
{53021,1}, {53022,1}, {53023,1}, {53024,1}, {53025,1}, {53026,1}, {53027,1}, {53028,1}, {53029,1}, {53030,1},
{53031,1}, {53032,1}, {53033,1}, {53034,1}, {53035,1}, {53036,1}, {53037,1}, {53038,1}, {53039,1}, {53040,1},
{53041,1}, {53042,1}, {53043,1}, {53044,1}, {53045,1}, {53046,1}, {53047,1}, {53048,1}, {53049,1}, {53050,1},
{53051,1}, {53052,1}, {53053,1}, {53054,1}, {53055,1}, {53056,1}, {53057,1}, {53058,1}, {53059,1}, {53060,1},
{53061,1}, {53062,1}, {53063,1}, {53064,1}, {53065,1}, {53066,1}, {53067,1}, {53068,1}, {53069,1}, {53070,1},
{53071,1}, {53072,1},
}
end

function mounts()
local settings = {}
mounts_table = {
{52027,1}, {52028,1}, {52029,1}, {52030,1}, {52031,1}, {52032,1}, {52105,1}, {52110,1}, {52115,1}, {52120,1},
{52125,1}, {52130,1}, {52135,1}, {52140,1}, {52145,1}, {52150,1}, {52155,1}, {52160,1}, {52165,1}, {52170,1},
{52175,1}, {52180,1}, {52185,1}, {52190,1}, {52195,1}, {52200,1}, {52205,1}, {52210,1}, {52215,1}, {52220,1},
}
end

function afro_hair()
local settings = {}
warrior_erkek = {
{74013,1}, {74014,1}, {74015,1}, {74016,1}, {74017,1}, {74018,1}, {74019,1}
}
warrior_kadin = {
{75013,1}, {75014,1}, {75015,1}, {75016,1}, {75017,1}, {75018,1}, {75019,1}
}
assasian_erkek = {
{75213,1}, {75214,1}, {75215,1}, {75216,1}, {75217,1}, {75218,1}, {75219,1}
}
assasian_kadin = {
{74263,1}, {74264,1}, {74265,1}, {74266,1}, {74267,1}, {74268,1}, {74269,1}
}
sura_erkek = {
{74513,1}, {74514,1}, {74515,1}, {74516,1}, {74517,1}, {74518,1}, {74519,1}
}
sura_kadin = {
{75413,1}, {75414,1}, {75415,1}, {75416,1}, {75417,1}, {75418,1}, {75419,1}
}
shaman_erkek = {
{75613,1}, {75614,1}, {75615,1}, {75616,1}, {75617,1}, {75618,1}, {75619,1}
}
shaman_kadin = {
{74763,1}, {74764,1}, {74765,1}, {74766,1}, {74767,1}, {74768,1}, {74769,1}
}
end

function afro_hair_box()
local settings = afro_hair()
if pc.get_job() == 0 then
if pc.get_sex() == 0 then
afra_vnum = get_random_vnum_from_table(warrior_erkek)
elseif pc.get_sex() == 1 then
afra_vnum = get_random_vnum_from_table(warrior_kadin)
end
elseif pc.get_job() == 1 then
if pc.get_sex() == 0 then
afra_vnum = get_random_vnum_from_table(assasian_erkek)
elseif pc.get_sex() == 1 then
afra_vnum = get_random_vnum_from_table(assasian_kadin)
end
elseif pc.get_job() == 2 then
if pc.get_sex() == 0 then
afra_vnum = get_random_vnum_from_table(sura_erkek)
elseif pc.get_sex() == 1 then
afra_vnum = get_random_vnum_from_table(sura_kadin)
end
elseif pc.get_job() == 3 then
if pc.get_sex() == 0 then
afra_vnum = get_random_vnum_from_table(shaman_erkek)
elseif pc.get_sex() == 1 then
afra_vnum = get_random_vnum_from_table(shaman_kadin)
end
end
pc.give_item2_select(afra_vnum)
item.log("AFRO_HAIR_BOX", item_name(afra_vnum))
end

function costum_type_item(vnum,days)
local remain_time = 86400 * days
pc.give_item2_select(vnum)
item.log("START_ITEM_GIFT", item_name(vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function costum_body_items_day(days)
local settings = costum_body()
if pc.get_sex() == 0 then
costume_vnum = get_random_vnum_from_table(costum_body_erkek)
else
costume_vnum = get_random_vnum_from_table(costum_body_kadin)
end

local remain_time = 86400 * days
pc.give_item2_select(costume_vnum)
item.log("7_DAY_COSTUME_BODY_BOX", item_name(costume_vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function costum_hair_items_day(days)
local settings = costum_hair()
if pc.get_sex() == 0 then
costume_vnum = get_random_vnum_from_table(costum_hair_erkek)
else
costume_vnum = get_random_vnum_from_table(costum_hair_kadin)
end

local remain_time = 86400 * days
pc.give_item2_select(costume_vnum)
item.log("7_DAY_COSTUME_HAIR_BOX", item_name(costume_vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function costum_weapon_items_day(days)
local settings = costum_weapon()

if pc.get_job() == 0 then
costume_weapon = get_random_vnum_from_table(warrior_weapon)
elseif pc.get_job() == 1 then
costume_weapon = get_random_vnum_from_table(assasian_weapon)
elseif pc.get_job() == 2 then
costume_weapon = get_random_vnum_from_table(sura_weapon)
elseif pc.get_job() == 3 then
costume_weapon = get_random_vnum_from_table(shaman_weapon)
end

local remain_time = 86400 * days
pc.give_item2_select(costume_weapon)
item.log("7_DAY_COSTUME_WEAPON_BOX", item_name(costume_weapon))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function pets_items_day(days)
local settings = pets()
pets_vnum = get_random_vnum_from_table(pets_table)

local remain_time = 86400 * days
pc.give_item2_select(pets_vnum)
item.log("7_DAY_PET_BOX", item_name(pets_vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function mounts_items_day(days)
local settings = mounts()
mounts_vnum = get_random_vnum_from_table(mounts_table)

local remain_time = 86400 * days
pc.give_item2_select(mounts_vnum)
item.log("7_DAY_MOUNT_BOX", item_name(mounts_vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function costum_body_1_5_day()
local settings = costum_body()
if pc.get_sex() == 0 then
costume_vnum = get_random_vnum_from_table(costum_body_erkek)
else
costume_vnum = get_random_vnum_from_table(costum_body_kadin)
end

local sure = number(1,5)
local remain_time = 86400 * (number(1,sure))
pc.give_item2_select(costume_vnum)
item.log("1_5_DAY_COSTUME_BODY_BOX", item_name(costume_vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function costum_hair_1_5_day()
local settings = costum_hair()
if pc.get_sex() == 0 then
costume_vnum = get_random_vnum_from_table(costum_hair_erkek)
else
costume_vnum = get_random_vnum_from_table(costum_hair_kadin)
end

local sure = number(1,5)
local remain_time = 86400 * (number(1,sure))
pc.give_item2_select(costume_vnum)
item.log("1_5_DAY_COSTUME_HAIR_BOX", item_name(costume_vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function costum_weapon_1_5_day()
local settings = costum_weapon()

if pc.get_job() == 0 then
costume_weapon = get_random_vnum_from_table(warrior_weapon)
elseif pc.get_job() == 1 then
costume_weapon = get_random_vnum_from_table(assasian_weapon)
elseif pc.get_job() == 2 then
costume_weapon = get_random_vnum_from_table(sura_weapon)
elseif pc.get_job() == 3 then
costume_weapon = get_random_vnum_from_table(shaman_weapon)
end

local sure = number(1,5)
local remain_time = 86400 * (number(1,sure))
pc.give_item2_select(costume_weapon)
item.log("1_5_DAY_COSTUME_WEAPON_BOX", item_name(costume_weapon))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function pets_1_5_day()
local settings = pets()
pets_vnum = get_random_vnum_from_table(pets_table)

local sure = number(1,5)
local remain_time = 86400 * (number(1,sure))
pc.give_item2_select(pets_vnum)
item.log("1_5_DAY_PET_BOX", item_name(pets_vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end

function mounts_1_5_day()
local settings = mounts()
mounts_vnum = get_random_vnum_from_table(mounts_table)

local sure = number(1,5)
local remain_time = 86400 * (number(1,sure))
pc.give_item2_select(mounts_vnum)
item.log("1_5_DAY_MOUNT_BOX", item_name(mounts_vnum))
item.set_socket(0, get_global_time() + remain_time)
item.set_value(8, 0, remain_time/86400)
end


Kostüm Süresi QUEST kodu

quest kostum_time begin
state start begin
when 9006.chat."Kostüm Süresini Uzat" begin
say_title("Yaşlı Kadın :")
say("Kostümün süresini istediğim eşyalar karşılığında")
say("uzatabilirim. Bunu nasıl mı yapabilirsin ?")
say_reward("Uzatmak istediğin kostümü sadece üzerime sürükle .. ")
say("")
end

when 9006.take with item.vnum >= 41001 and item.vnum <= 45181 begin
say_title("Yaşlı Kadın :")
say("Kostüm süresini uzatmak biraz zordur.")
say("Istediğim eşyaları getirdiğin taktir de ")
say("kostümünün süresini eşya sayına göre uzatabilirim.")
say_reward("Ruh Taşı Istiyorum Senden ?")
say_item_vnum(50513)
local s = select("Uzat","Vazgec ")
if s == 2 then
return
elseif s == 1 then
say_title("Yaşlı Kadın :")
say("Hadi seninle kostümünün suresini uzatalim ..")
say_reward("Ne kadar uzatmak Istiyorsun ?")
local sure = select("5 Gun Uzatmak Istiyorum","10 Gun Uzatmak Istiyorum","15 Gun Uzatmak Istiyorum","Vazgec")
if sure == 4 then
return

elseif sure == 1 then
say_title("Yaşlı Kadın :")
say("Sectigin surenin bedeli 50 adet Ruh Taşı.")
say_item_vnum(50513)
say_reward("Kabul ediyor musun ?")
local sure50 = select("Evet","Hayir")
if sure50 == 2 then
return

elseif sure50 == 1 then
local sure50test = pc.count_item(50513)
if sure50test < 50 then
say_title("Yaşlı Kadın :")
say("Malesef,")
say("Bunun icin "..50-sure50test.." adet daha")
say("Ruh Taşının olmasi gerekiyor.")
say_item_vnum(50513)
else
say_title("Yaşlı Kadın :")
say_reward("Tebrikler ek olarak 5 gun Sure Eklendi !")
pc.remove_item("50513",50)
item.set_socket(0,item.get_socket(0) + 60*60*24*5)
end
end
elseif sure == 2 then
say_title("Yaşlı Kadın :")
say("Sectigin surenin bedeli 75 adet Ruh Taşı.")
say_item_vnum(50513)
say_reward("Kabul ediyor musun ?")
local sure75 = select("Evet","Hayir")
if sure75 == 2 then
return

elseif sure75 == 1 then
local sure75test = pc.count_item(50513)
if sure75test < 75 then
say_title("Yaşlı Kadın :")
say("Malesef,")
say("Bunun icin "..75-sure75test.." adet daha")
say("Ruh Taşının olmasi gerekiyor.")
say_item_vnum(50513)
else
say_title("Yaşlı Kadın :")
say_reward("Tebrikler ek olarak 10 gun Sure Eklendi !")
pc.remove_item("50513",75)
item.set_socket(0,item.get_socket(0) + 60*60*24*10)
end
end
elseif sure == 3 then
say_title("Yaşlı Kadın :")
say("Sectigin surenin bedeli 10 adet Ruh Taşı.")
say_item_vnum(50513)
say_reward("Kabul ediyor musun ?")
local sure100 = select("Evet","Hayir")
if sure100 == 2 then
return

elseif sure100 == 1 then
local sure100test = pc.count_item(50513)
if sure100test < 100 then
say_title("Yaşlı Kadın :")
say("Malesef,")
say("Bunun icin "..100-sure100test.." adet daha")
say("Ruh Taşının olmasi gerekiyor.")
say_item_vnum(50513)
else
say_title("Yaşlı Kadın :")
say_reward("Tebrikler ek olarak 15 gun Sure Eklendi !")
pc.remove_item("50513",100)
item.set_socket(0,item.get_socket(0) + 60*60*24*15)
end
end
end
end
end
end
end

Quest Vürüs Total indirme Linki
 
Moderatörün son düzenlenenleri:

KraL

GameOWNER
Administrator
Katılım
11 Kas 2017
Mesajlar
904
Tepki
99
Konum
Ara BuL
Kostüm Süre Uzatma Sistemi V3 Güzel konu olmuş eline sağlık
 
AnaSayfa Kayıt Ol Giriş Yap
Üst