Hesabına erişemeyen eski üyeler Discord üzerinden yardım alabilir.
//*************************************
// YAZAR: xwerswoodx
// YAPIM: Hamit Devecioğlu (c)2003-2012
// TARİH: 31.01.2012
// SAAT : 15:37
// KONU : Alchemy Crafting Dialog
//*************************************
VERSION=0.56b

[Defname alchemy_hamit]
alchemy_items_0=Less,Normal,Great,Super,Drink,Other
alchemy_items_Less=i_potion_explosionless,i_potion_poisonless,i_potion_healless,i_potion_cureless,i_potion_bleedless
alchemy_items_Normal=i_potion_agility,i_potion_refresh,i_potion_explosion,i_potion_poison,i_potion_heal,i_potion_cure,i_potion_strength,i_potion_nightsight,i_potion_bleed
alchemy_items_Great=i_potion_agilitygreat,i_potion_explosiongreat,i_potion_poisongreat,i_potion_healgreat,i_potion_curegreat,i_potion_strengthgreat,i_potion_bleedgreat
alchemy_items_Super=i_potion_refreshtotal,i_potion_poisondeadly,i_potion_bleedsuper
alchemy_items_Drink=i_bottle_ale,i_ale_honey,i_ale_amber,i_ale_brown,i_ale_stout,i_ale_spiced,i_ale_smoked,i_ale_oktoberfest,i_bottle_liquor,i_bottle_wine
alchemy_items_Other=i_potion_invisibility,i_potion_shrink
alchemy_items_all=i_potion_explosionless,i_potion_poisonless,i_potion_healless,i_potion_cureless,i_potion_bleedless,i_potion_agility,i_potion_refresh,i_potion_explosion,i_potion_poison,i_potion_heal,i_potion_cure,i_potion_strength,i_potion_nightsight,i_potion_bleed,i_potion_agilitygreat,i_potion_explosiongreat,i_potion_poisongreat,i_potion_healgreat,i_potion_curegreat,i_potion_strengthgreat,i_potion_bleedgreat,i_potion_refreshtotal,i_potion_explosionsuper,i_potion_poisondeadly,i_potion_invisibility,i_potion_shrink,i_potion_rare
alchemy_areas_x=200,345,490,200,345,490,200,345,490,200,345,490
alchemy_areas_y=82,82,82,182,182,182,282,282,282,382,382,382

[DIALOG d_menu_alchemy]
0,0
NOMOVE
resizepic 0 0 5054 650 450
resizepic 10 40 3000 305 400
dtext 20 15 250 <serv.servname> Alchemy Menu
resizepic 10 40 3500 150 400
resizepic 165 40 3500 475 400
dtext 50 48 00 Categories

local.t 70
for 1 <qval <f_moonsep 0,<def.alchemy_items_0>> <= 9 ? <f_moonsep 0,<def.alchemy_items_0>> : 9>
dtext 60 <eval <dlocal.t> + 2> 00 <f_moonsep <dlocal._for>,<def.alchemy_items_0>>
button 25 <dlocal.t> 4005 4006 0 <dlocal._for>
local.t +=30
endfor

for all 1 <qval <f_moonsep 0,<def.alchemy_items_0>> <= 9 ? <f_moonsep 0,<def.alchemy_items_0>> : 9>
PAGE <dlocal.all>
src.ctag.button <dlocal.all>,1
for page 1 <qval <f_moonsep 0,<def.alchemy_items_<f_moonsep <dlocal.all>,<def.alchemy_items_0>>>> <= 12 ? <f_moonsep 0,<def.alchemy_items_<f_moonsep <dlocal.all>,<def.alchemy_items_0>>>> : 12>
tilepic <eval <f_moonsep <dlocal.page>,<def.alchemy_areas_x>> + 20> <eval <f_moonsep <dlocal.page>,<def.alchemy_areas_y>> - 20> <serv.itemdef.<f_moonsep <dlocal.page>,<def.alchemy_items_<f_moonsep <dlocal.all>,<def.alchemy_items_0>>>>.id>
dtext <f_moonsep <dlocal.page>,<def.alchemy_areas_x>> <f_moonsep <dlocal.page>,<def.alchemy_areas_y>> 00 <serv.itemdef.<f_moonsep <dlocal.page>,<def.alchemy_items_<f_moonsep <dlocal.all>,<def.alchemy_items_0>>>>.name>
button <eval <f_moonsep <dlocal.page>,<def.alchemy_areas_x>> - 20> <eval <f_moonsep <dlocal.page>,<def.alchemy_areas_y>> + 2> 2511 2510 1 0 <f_moonsep 1,<src.ctag0.button>><f_moonsep 2,<src.ctag0.button>>
src.ctag.button=<dlocal.all>,<eval <f_moonsep 2,<src.ctag0.button>> + 1>
endfor
endfor
src.ctag.button

[DIALOG d_menu_alchemy BUTTON]
on=0
src.hata Sayfayı kapattınız.
return 1

on=1 9999
src.ctag.makelast <f_moonsep <strsub 1 4 <dargn>>,<def.alchemy_items_<f_moonsep <strsub 0 1 <dargn>>,<def.alchemy_items_0>>>>
src.f_makelast


[function f_moonsep]
if <argv[0]> == 0
return <eval <argv> - 1>
else
return <argv[<argv[0]>]>
endif

[Function hata]
sysmessage @026,,1 <args>

[Function makelast]
src.f_makelast

[Function tekraryap]
src.f_makelast

[Function f_makelast]
if !(<ctag0.makelast> == 0)
  if (<canmake <ctag0.makelast>>)
  makeitem=<ctag0.makelast>
  else
  for 1 <f_moonsep 0,<SERV.ITEMDEF.<ctag0.makelast>.RESOURCES>>
  ctag.makelast_error <qval (<ctag0.makelast_error>) ? <ctag.makelast_error>,> <SERV.ITEMDEF.<ctag0.makelast>.RESOURCES.<dlocal._for>.val><SERV.ITEMDEF.<SERV.ITEMDEF.<ctag0.makelast>.RESOURCES.<dlocal._for>.key>.NAME>
    if <dlocal._for> == <f_moonsep 0,<SERV.ITEMDEF.<ctag0.makelast>.RESOURCES>>
    sysmessage @026,,1 Bunu yapabilmek için çantanızda <ctag.makelast_error> olması gereklidir.
    ctag.makelast_error
    endif
  endfor
  endif
else
sysmessage @026,,1 Herhangi bir eşya yapmadınız.
return 1
endif

[ITEMDEF i_potion_bleedless]
ID=0f08
Type=t_potion_bleed
Name=Lesser Bleed
TDATA1=i_bottle_empty

RESOURCES=i_reag_garlic 3,i_bottle_empty
SKILLMAKE=alchemy 33.1

ON=@Create
COLOR=060
MORE2=40.0
MOREY=7

[ITEMDEF i_potion_bleed]
ID=0f08
Type=t_potion_bleed
Name=Bleed
TDATA1=i_bottle_empty

RESOURCES=i_reag_garlic 5,i_bottle_empty
SKILLMAKE=alchemy 57.3

ON=@Create
COLOR=060
MORE2=60.0
MOREY=4

[ITEMDEF i_potion_bleedgreat]
ID=0f08
Type=t_potion_bleed
Name=Greater Bleed
Tdata1=i_bottle_empty

RESOURCES=i_reag_garlic 8,i_bottle_empty
SKILLMAKE=alchemy 83.0

ON=@Create
COLOR=060
MORE2=80.0
MOREY=2

[ITEMDEF i_potion_bleedsuper]
ID=0f08
Type=t_potion_bleed
Name=Super Bleed
Tdata1=i_bottle_empty

RESOURCES=i_reag_garlic 11,i_bottle_empty
SKILLMAKE=alchemy 96.9

ON=@Create
COLOR=060
MORE2=100.0
MOREY=1

[Typedef t_potion_bleed]
ON=@DClick
if (<src.findid.i_bleeding>) || (<src.findid.i_bleeding2>)
  if rand(<morey>) == 1
  src.findid.i_bleeding.remove
  src.findid.i_bleeding2.remove
  src.events -e_bleed
  src.effect snd_spell_poison
  src.effect 3,0376a,2,10,1
  src.sayua 048,6,6,0 *Yarasini Tedavi Eder*
  consume 1
  src.act <tdata1>
  else
  src.sayua 048,6,6,0 *Tedavi Uygulayamadınız*
  consume 1
  src.act <tdata1>
  return 1
  endif
else
src.hata Tedaviye ihtiyacınız yok.
return 1
endif

Son Düzenlemeler;
Potionların kendi resimleri ile gösterilmesi.
PAGE ayarları tek olarak yapıldı. Böylece sadece defname eklemesi yaparak dialog kullanılabilecek.
Bir sayfaya en fazla 12 item, 9 kategori sınırı konuldu.
Makelast src. hatası düzeltildi.
Defnameler artık kendi kategorilerine göre işlem yapacak.
alchemy_items_all defname'i kaldırıldı.
restest yerine, canmake ile sorgu fazlalığı kaldırıldı.
İçki kategorisi eklendi.
Bleed potion itemleri yazıldı.
Rare,exlosionsuper gibi gereksiz itemler kaldırıldı.

Dikkat: Dialogların çalışması için, f_moonsep, f_makelast ve hata functionlarının eklenmesi gerekmektedir.

Bu konu xwerswoodx tarafından düzenlendi(2012-02-02 22:43, 12 yıl önce)

Üye Ol veya Giriş Yap

Bu forum başlığına mesaj atmak istiyorsanız hemen üye olun veya giriş yapın.