Помощь - Поиск - Пользователи - Календарь
Полная версия: Blacksmithing Menu
UoKit.com Форумы > Ultima Online : Dev > Sphere Server > Архив готовых скриптов
Jokerman
Вот на днях чето приспичело мне переписать крафт меню БСа, написал я довольнотаки функциональную вещь. Диалог крафтменю зависит от наличия ресурсов(кнопки с выбором руды, с выбором айтема который будем крафтить динамичные, тоесть если требования на скилл и ресурсы удольвлетворяются, кнопки появляются и можно спокойно крафтить), имеется функция физлов(правда она сделана только для последующих +20.0 скиллов, после требуемого, тоесть если на айрон требуется 50 БСа то после 70ти физлов не будет вообще, процент физлов можно посмотреть в скрипте), прописана функция скиллгейна(каждая шмотка, имеет свой процент повышеня скилла, для разных значений скилла), само собой имеются задержки, анимация, звук и затраты ресурсов(для физла тоже, только тратится не полный комплект требуемый для крафта)

В будущем планируется:
1) Создание так называемых планов для крафта(аля вов), которые будут либо запоминаться на чаре, либо иметь определенное коллво жизней(тоесть колличество возможных вещей которые будут созданы)
2) <Тут может быть ваша идея>

итак сам скрипт


Код

[ITEMDEF 0faf]
//anvil
DEFNAME=i_anvil
TYPE=T_ANVIL

SKILLMAKE=TINKERING 56.0, BLACKSMITHING 30.0 ,t_tinker_tools
RESOURCES=100 i_ingot_iron, 50 i_LOG
VALUE=500

WEIGHT=300
CATEGORY=Items by Professions
SUBSECTION=Blacksmiths
DESCRIPTION=Anvil (N)

ON=@dclick
IF (<DISTANCE> > 2)
SRC.SYSMESSAGE You're too far away!
RETURN 1
ELIf (<src.findlayer(layer_hand1).baseid>!=i_hammer_smith)
SRC.SYSMESSAGE You must have a Smith's Hammer in your hand!
elif <src.flags>&statf_war
src.sysmessage At first leave from war a mode!
return 1
else
Dialog d_craft_bs
endif
return 1




[DIALOG d_craft_bs]
0 33
PAGE 0
nomove
resizepic 0 0 2620 400 450
PAGE 0
text 167 25 1122 0
text 150 50 1182 1
gumppic 105 20 52
src.tag.fizl = 0
src.tag.pos1 = 0
if (<src.restest 6 i_ingot_iron>) && (<eval <src.blacksmithing>> > 50.0)
src.tag.pos2 = 2
src.tag.bsneed=50.0
src.tag.ingtype=i_ingot_iron
f_position2
endif




[DIALOG d_craft_bs Text]
Craftmenu
Blacksmithing
Iron Ingots


[DIALOG d_craft_bs button]
onbutton=1
src.tag.pos1 = 0
Dialog d_craft_bs_iron


[DIALOG d_craft_bs_iron]
0 33
PAGE 0
nomove
resizepic 0 0 2620 400 450
PAGE 0
text 167 25 1122 0
text 150 50 1182 1
gumppic 105 20 52
if <src.restest 18 i_ingot_iron>
src.tag.pos2 = 2
f_position2
endif
if <src.restest 20 i_ingot_iron>
src.tag.pos2 = 3
f_position2
endif
if <src.restest 15 i_ingot_iron>
src.tag.pos2 = 4
f_position2
endif
if <src.restest 10 i_ingot_iron>
src.tag.pos2 = 5
f_position2
endif
if <src.restest 12 i_ingot_iron>
src.tag.pos2 = 6
f_position2
endif
if <src.restest 25 i_ingot_iron>
src.tag.pos2 = 7
f_position2
endif
if <src.restest 18 i_ingot_iron>
src.tag.pos2 = 8
f_position2
endif
if <src.restest 8 i_ingot_iron> || <src.restest 2 i_log>
src.tag.pos2 = 9
f_position2
endif
if <src.restest 8 i_ingot_iron>
src.tag.pos2 = 10
f_position2
endif
if <src.restest 14 i_ingot_iron>
src.tag.pos2 = 11
f_position2
endif
if <src.restest 10 i_ingot_iron>
src.tag.pos2 = 12
f_position2
endif
if <src.restest 20 i_ingot_iron>
src.tag.pos2 = 13
f_position2
endif
if <src.restest 6 i_ingot_iron>
src.tag.pos2 = 14
f_position2
endif
if <src.restest 14 i_ingot_iron>
src.tag.pos2 = 15
f_position2
endif
if <src.restest 8 i_ingot_iron>
src.tag.pos2 = 16
f_position2
endif
if <src.restest 14 i_ingot_iron>
src.tag.pos2 = 17
f_position2
endif
if <src.restest 14 i_ingot_iron>
src.tag.pos2 = 18
f_position2
endif


[DIALOG d_craft_bs_iron Text]
Craftmenu
Blacksmithing
Iron Arms
Iron Leggings
Iron Helm
Iron Gorget
Iron Gloves
Iron Chest
Iron Heater
Iron Kite
Iron Katana
Iron Viking Sword
Iron Scimitar
Iron Halberd
Iron Mace
Iron War Mace
Iron Kryss
Iron Short Spear
Iron War Fork



[DIALOG d_craft_bs_iron button]
onbutton=1
src.tag.ingammount = 18
f_craft_fizl_bs
f_craft_item  i_platemail_arms
onbutton=2
src.tag.ingammount = 20
f_craft_fizl_bs
f_craft_item  i_platemail_leggings
onbutton=3
src.tag.ingammount = 15
f_craft_fizl_bs
f_craft_item  i_platemail_helm
onbutton=4
src.tag.ingammount = 10
f_craft_fizl_bs
f_craft_item  i_platemail_gorget
onbutton=5
src.tag.ingammount = 12
f_craft_fizl_bs
f_craft_item  i_platemail_gloves
onbutton=6
src.tag.ingammount = 25
f_craft_fizl_bs
f_craft_item  i_platemail_chest
onbutton=7
src.tag.ingammount = 18
f_craft_fizl_bs
f_craft_item  i_shield_heater
onbutton=8
src.tag.ingammount = 8
src.consume 2 i_log
f_craft_fizl_bs
f_craft_item  i_shield_kite_wood
onbutton=9
src.tag.ingammount = 8
f_craft_fizl_bs
f_craft_item  i_Katana
onbutton=10
src.tag.ingammount = 14
f_craft_fizl_bs
f_craft_item  i_sword_viking
onbutton=11
src.tag.ingammount = 10
f_craft_fizl_bs
f_craft_item  i_scimitar
onbutton=12
src.tag.ingammount = 20
f_craft_fizl_bs
f_craft_item  i_halberd
onbutton=13
src.tag.ingammount = 6
f_craft_fizl_bs
f_craft_item  i_mace
onbutton=14
src.tag.ingammount = 14
f_craft_fizl_bs
f_craft_item  i_mace_war
onbutton=15
src.tag.ingammount = 8
f_craft_fizl_bs
f_craft_item  i_kryss
onbutton=16
src.tag.ingammount = 14
f_craft_fizl_bs
f_craft_item  i_spear_short
onbutton=17
src.tag.ingammount = 14
f_craft_fizl_bs
f_craft_item  i_war_fork


[function f_craft_item]
SERV.NEWITEM i_mem_create
src.tag.2 = 4
NEW.CONT=<src.UID>
NEW.LINK=<src.UID>
NEW.EQUIP
NEW.tag.create_id=<args>
new.timerd = 1


[itemdef i_mem_create]
id=i_memory
type=t_eq_script
name=[Create item]

ON=@Create
      attr=094

ON=@Timer
    if <cont>
        if <cont.restest <eval <cont.tag.ingammount>> <cont.tag.ingtype>>
        if <cont.tag.2> >= 1
        cont.sound 002a // Р—РІСѓРє
        cont.anim 9
        if <cont.tag.2> == 2
        if <cont.tag.fizl> == 1
        cont.consume {1 <eval <cont.tag.ingammount>>} <cont.tag.ingtype>
        cont.sysmessage You fail to make anything.
        unequip
        return 1
        endif
        endif
        cont.tag.2 = <eval <cont.tag.2> - 1>
        timer = 2
        return 1
        else
        cont.newitem <tag.create_id>
        cont.sysmessage You put <new.name> into your backpack.
        new.cont=<cont.findlayer.layer_pack.uid>
        cont.consume <eval <cont.tag.ingammount>> <cont.tag.ingtype>
        f_craft_skillgain_bs
        return 1
        endif
        else
        cont.sysmessage You mast have more resourses in your pack.
        return 1
        endif
        endif

[function f_craft_fizl_bs]
if (<src.blacksmithing> >= <eval <src.tag.bsneed>>) && (<src.blacksmithing> < (<eval <src.tag.bsneed>> + 2.0))
if rand(100) < 60
src.tag.fizl = 1
endif
elif (<src.blacksmithing> >= (<eval <src.tag.bsneed>> + 2.0)) && (<src.blacksmithing> < (<eval <src.tag.bsneed>> + 4.0))
if rand(100) < 50
src.tag.fizl = 1
endif
elif (<src.blacksmithing> >= (<eval <src.tag.bsneed>> + 4.0)) && (<src.blacksmithing> < (<eval <src.tag.bsneed>> + 6.0))
if rand(100) < 40
src.tag.fizl = 1
endif
elif (<src.blacksmithing> >= (<eval <src.tag.bsneed>> + 6.0)) && (<src.blacksmithing> < (<eval <src.tag.bsneed>> + 8.0))
if rand(100) < 30
src.tag.fizl = 1
endif
elif (<src.blacksmithing> >= (<eval <src.tag.bsneed>> + 8.0)) && (<src.blacksmithing> < (<eval <src.tag.bsneed>> + 10.0))
if rand(100) < 20
src.tag.fizl = 1
endif
elif (<src.blacksmithing> >= (<eval <src.tag.bsneed>> + 10.0)) && (<src.blacksmithing> < (<eval <src.tag.bsneed>> + 20.0))
if rand(100) < 10
src.tag.fizl = 1
endif
else
src.tag.fizl = 0
endif




[function f_craft_skillgain_bs]
if (<eval <cont.blacksmithing>> >= 0.0) && (<eval <cont.blacksmithing>> < 30.0)
if <new.dispid> == i_platemail_chest
if rand(100) < 50
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_arms
if rand(100) < 41
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_leggings
if rand(100) < 45
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_gorget
if rand(100) < 36
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_gloves
if rand(100) < 39
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_helm
if rand(100) < 41
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_shield_kite_wood
if rand(100) < 45
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_shield_heater
if rand(100) < 49
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_Katana
if rand(100) < 40
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_sword_viking
if rand(100) < 45
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_scimitar
if rand(100) < 45
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_halberd
if rand(100) < 49
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_mace
if rand(100) < 40
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_mace_war
if rand(100) < 45
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_kryss
if rand(100) < 40
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_spear_short
if rand(100) < 45
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_war_fork
if rand(100) < 45
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
endif
elif (<eval <cont.blacksmithing>> >= 30.0) && (<eval <cont.blacksmithing>> < 50.0)
if <new.dispid> == i_platemail_chest
if rand(100) < 40
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_arms
if rand(100) < 31
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_leggings
if rand(100) < 35
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_gorget
if rand(100) < 26
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_gloves
if rand(100) < 29
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_helm
if rand(100) < 31
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_shield_kite_wood
if rand(100) < 35
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_shield_heater
if rand(100) < 39
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_Katana
if rand(100) < 30
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_sword_viking
if rand(100) < 35
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_scimitar
if rand(100) < 35
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_halberd
if rand(100) < 39
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_mace
if rand(100) < 30
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_mace_war
if rand(100) < 35
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_kryss
if rand(100) < 30
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_spear_short
if rand(100) < 35
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_war_fork
if rand(100) < 35
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
endif
elif (<eval <cont.blacksmithing>> >= 50.0) && (<eval <cont.blacksmithing>> < 80.0)
if <new.dispid> == i_platemail_chest
if rand(100) < 30
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_arms
if rand(100) < 21
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_leggings
if rand(100) < 25
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_gorget
if rand(100) < 16
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_gloves
if rand(100) < 19
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_helm
if rand(100) < 21
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_shield_kite_wood
if rand(100) < 25
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_shield_heater
if rand(100) < 29
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_Katana
if rand(100) < 20
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_sword_viking
if rand(100) < 25
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_scimitar
if rand(100) < 25
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_halberd
if rand(100) < 29
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_mace
if rand(100) < 20
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_mace_war
if rand(100) < 25
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_kryss
if rand(100) < 20
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_spear_short
if rand(100) < 25
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_war_fork
if rand(100) < 25
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
endif
elif (<eval <cont.blacksmithing>> >= 80.0) && (<eval <cont.blacksmithing>> < 100.0)
if <new.dispid> == i_platemail_chest
if rand(100) < 20
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_arms
if rand(100) < 11
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_leggings
if rand(100) < 15
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_gorget
if rand(100) < 6
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_gloves
if rand(100) < 9
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_platemail_helm
if rand(100) < 11
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_shield_kite_wood
if rand(100) < 15
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_shield_heater
if rand(100) < 19
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_Katana
if rand(100) < 10
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_sword_viking
if rand(100) < 15
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_scimitar
if rand(100) < 15
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_halberd
if rand(100) < 19
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_mace
if rand(100) < 10
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_mace_war
if rand(100) < 15
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_kryss
if rand(100) < 10
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_spear_short
if rand(100) < 15
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
elif <new.dispid> == i_war_fork
if rand(100) < 15
cont.blacksmithing = <cont.blacksmithing> + 0.1
endif
endif
endif



[FUNCTION f_position2]
IF <eval <src.tag.pos1>> == 0
Text 55 175 1152 <eval <src.tag.pos2>>
button 20 175 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 1
Text 55 195 1152 <eval <src.tag.pos2>>
button 20 195 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 2
Text 55 215 1152 <eval <src.tag.pos2>>
button 20 215 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 3
Text 55 235 1152 <eval <src.tag.pos2>>
button 20 235 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 4
Text 55 255 1152 <eval <src.tag.pos2>>
button 20 255 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 5
Text 55 275 1152 <eval <src.tag.pos2>>
button 20 275 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 6
Text 55 295 1152 <eval <src.tag.pos2>>
button 20 295 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 7
Text 55 315 1152 <eval <src.tag.pos2>>
button 20 315 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 8
Text 55 335 1152 <eval <src.tag.pos2>>
button 20 335 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 9
Text 55 355 1152 <eval <src.tag.pos2>>
button 20 355 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 10
Text 255 175 1152 <eval <src.tag.pos2>>
button 220 175 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 11
Text 255 195 1152 <eval <src.tag.pos2>>
button 220 195 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 12
Text 255 215 1152 <eval <src.tag.pos2>>
button 220 215 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 13
Text 255 235 1152 <eval <src.tag.pos2>>
button 220 235 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 14
Text 255 255 1152 <eval <src.tag.pos2>>
button 220 255 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 15
Text 255 275 1152 <eval <src.tag.pos2>>
button 220 275 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 16
Text 255 295 1152 <eval <src.tag.pos2>>
button 220 295 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 17
Text 255 315 1152 <eval <src.tag.pos2>>
button 220 315 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 18
Text 255 335 1152 <eval <src.tag.pos2>>
button 220 335 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 19
Text 255 355 1152 <eval <src.tag.pos2>>
button 220 355 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 20
Text 255 375 1152 <eval <src.tag.pos2>>
button 220 375 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
ELif <eval <src.tag.pos1>> == 21
Text 255 395 1152 <eval <src.tag.pos2>>
button 220 395 0fa8 0faa 1 0 <eval <src.tag.pos2> + (- 1)>
src.tag.pos1=<eval <src.tag.pos1>> + 1
endif



Я намеренно не выкладываю другие руды, чтобы не было тупого Ctrl+c и Ctrl+v.
Руды добавляются элементарно, главное не забыть что в [DIALOG d_craft_bs] нужно src.tag.pos2 постепенно наращивать, а в [DIALOG d_craft_bs button] требуется src.tag.pos1 обнулять описании каждой кнопки.

Вообщем кидайте камни, пишите отзывы, предлагайте новые идеи.
Jokerman
Вообщем сделал рецепты, сделал с недельку полторы назад, но к сожалению не было доступа к интернету, вообщем выкладываю.


Код

[ITEMDEF i_plan]
ID=i_deed
name=Plan
TYPE=t_deed

On=@Create
        morez={1 100}
        morey={1 10}
        if <morey> < 10
        color = 0042b
        name=Plan
        endif



    
on=@click
    f_craft_plan
    src.act.say <name>: <src.tag.itemname> [<eval <morez>>]
return 1


ON=@Dclick
IF (<LINK>==04fffffff)
LINK=<SRC.UID>
NAME=<LINK.NAME>'s <NAME>
ELSEIF (<LINK.UID>!=<SRC.UID> )
SRC.SYSMESSAGE @042b It isn't yours
return 1
ELSEIF (<LINK.UID>==<SRC.UID> )
FORITEMS 2
IF (<baseid> == i_anvil)
local.anvil=1
ENDIF
ENDFOR
if <morez> < 1
remove
elIf (<src.findlayer(layer_hand1).baseid>!=i_hammer_smith)
SRC.SYSMESSAGE @021 You must have a Smith's Hammer in your hand!
return 1
elif <src.flags>&statf_war
src.sysmessage @021 At first leave from war mode!
return 1
elif <src.armslore> < 100.0
src.sysmessage @021 Your Arms Lore skill must be 100.0!
return 1
elIF (<eval <local.anvil>> != 1)
src.sysmessage @021 You must stay near Anvil!
return 1
elif (<src.action>==1)
src.sysmessage @021 You must wait to perform another action.
return 1
elif (<src.tag.action>==1)
src.sysmessage @021 You must wait to perform another action.
return 1
else
src.tag.fizl = 0
f_craft_plan
DIALOG d_craft_plan
ENDIF
RETURN 1
endif
return 1
ENDIF







[function f_craft_plan]
if <morey> == 1
src.tag.itemtype=i_agapite_katana
src.tag.itemname=agapite Katana
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=8

f_res2
f_res3
f_res4
f_res5

elif <morey> == 2
src.tag.itemtype=i_agapite_sword_Viking
src.tag.itemname=agapite Viking Sword
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=14

f_res2
f_res3
f_res4
f_res5

elif <morey> == 3
src.tag.itemtype=i_agapite_scimitar
src.tag.itemname=agapite Scimitar
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=10

f_res2
f_res3
f_res4
f_res5

elif <morey> == 4
src.tag.itemtype=i_agapite_halberd
src.tag.itemname=agapite Halberd
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=20

f_res2
f_res3
f_res4
f_res5

elif <morey> == 5
src.tag.itemtype=i_agapite_short_spear
src.tag.itemname=agapite Short Spear
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=14

f_res2
f_res3
f_res4
f_res5

elif <morey> == 6
src.tag.itemtype=i_agapite_kryss
src.tag.itemname=agapite Kryss
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=8

f_res2
f_res3
f_res4
f_res5

elif <morey> == 7
src.tag.itemtype=i_agapite_war_fork
src.tag.itemname=agapite War Fork
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=14

f_res2
f_res3
f_res4
f_res5

elif <morey> == 8
src.tag.itemtype=i_agapite_mace
src.tag.itemname=agapite Mace
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=8

f_res2
f_res3
f_res4
f_res5

elif <morey> == 9
src.tag.itemtype=i_agapite_mace_war
src.tag.itemname=agapite War Mace
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=8

f_res2
f_res3
f_res4
f_res5

elif <morey> == 10
src.tag.itemtype=i_agapite_hammer_pick
src.tag.itemname=agapite Hammer Pick
src.tag.ressamount=1
src.tag.skillneed=Blacksmithing
src.tag.need=100.0
src.tag.ress1type=i_ingot_agapite
src.tag.ress1name=agapite Ingots
src.tag.ress1ammount=8

f_res2
f_res3
f_res4
f_res5

endif










[DIALOG d_craft_plan]
0 33
PAGE 0
nomove
resizepic 0 0 2620 400 210
PAGE 0
text 167 25 1122 0
text 150 50 1182 1
gumppic 105 20 52
if <src.tag.ressamount> == 1
dhtmlgump 15 100 370 65 3500 1 Этот свиток позволяет создать <src.tag.itemname>, для его создания требуется <src.tag.skillneed> <eval <src.tag.need>>, <src.tag.ress1name> в колличестве <eval <src.tag.ress1ammount>>.
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>)
text 55 170 1152 2
button 20 170 0fa5 0fa7 1 0 1
endif
elif <src.tag.ressamount> == 2
dhtmlgump 15 100 370 65 3500 1 Этот свиток позволяет создать <src.tag.itemname>, для его создания требуется <src.tag.skillneed> <eval <src.tag.need>>, <src.tag.ress1name> в колличестве <eval <src.tag.ress1ammount>>. Так же требуется  <eval <src.tag.ress2ammount>> <src.tag.ress2name>.
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>) && (<src.restest <eval <src.tag.ress2ammount>> <src.tag.ress2type>>)
text 55 170 1152 2
button 20 170 0fa5 0fa7 1 0 1
endif
elif <src.tag.ressamount> == 3
dhtmlgump 15 100 370 65 3500 1 Этот свиток позволяет создать <src.tag.itemname>, для его создания требуется <src.tag.skillneed> <eval <src.tag.need>>, <src.tag.ress1name> в колличестве <eval <src.tag.ress1ammount>>. Так же требуется  <eval <src.tag.ress2ammount>> <src.tag.ress2name>, <eval <src.tag.ress3ammount>> <src.tag.ress3name>
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>) && (<src.restest <eval <src.tag.ress2ammount>> <src.tag.ress2type>>) && (<src.restest <eval <src.tag.ress3ammount>> <src.tag.ress3type>>)
text 55 170 1152 2
button 20 170 0fa5 0fa7 1 0 1
endif
elif <src.tag.ressamount> == 4
dhtmlgump 15 100 370 65 3500 1 Этот свиток позволяет создать <src.tag.itemname>, для его создания требуется <src.tag.skillneed> <eval <src.tag.need>>, <src.tag.ress1name> в колличестве <eval <src.tag.ress1ammount>>. Так же требуется  <eval <src.tag.ress2ammount>> <src.tag.ress2name>, <eval <src.tag.ress3ammount>> <src.tag.ress3name>, <eval <src.tag.ress4ammount>> <src.tag.ress4name>
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>) && (<src.restest <eval <src.tag.ress2ammount>> <src.tag.ress2type>>) && (<src.restest <eval <src.tag.ress3ammount>> <src.tag.ress3type>>) && (<src.restest <eval <src.tag.ress4ammount>> <src.tag.ress4type>>)
text 55 170 1152 2
button 20 170 0fa5 0fa7 1 0 1
endif
elif <src.tag.ressamount> == 5
dhtmlgump 15 100 370 65 3500 1 Этот свиток позволяет создать <src.tag.itemname>, для его создания требуется <src.tag.skillneed> <eval <src.tag.need>>, <src.tag.ress1name> в колличестве <eval <src.tag.ress1ammount>>. Так же требуется  <eval <src.tag.ress2ammount>> <src.tag.ress2name>, <eval <src.tag.ress3ammount>> <src.tag.ress3name>, <eval <src.tag.ress4ammount>> <src.tag.ress4name>, <eval <src.tag.ress5ammount>> <src.tag.ress5name>
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>) && (<src.restest <eval <src.tag.ress3ammount>> <src.tag.ress3type>>)  && (<src.restest <eval <src.tag.ress2ammount>> <src.tag.ress2type>>)  && (<src.restest <eval <src.tag.ress4ammount>> <src.tag.ress4type>>)  && (<src.restest <eval <src.tag.ress5ammount>> <src.tag.ress5type>>)
text 55 170 1152 2
button 20 170 0fa5 0fa7 1 0 1
endif
endif

[Dialog d_craft_plan text]
Craftmenu
Blacksmithing
Craft Item


[Dialog d_craft_plan button]
onbutton=1
f_craft_fizl_bs
if <src.tag.ressamount> == 1
if <src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>
f_craft_item_plan
else
src.sysmessage You must have more resourses in your pack.
endif
elif <src.tag.ressamount> == 2
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>) && (<src.restest <eval <src.tag.ress2ammount>> <src.tag.ress2type>>)
if (src.tag.fizl) == 1
src.consume {1 <eval <src.tag.ress2ammount>>} <src.tag.ress2type>
else
src.consume <eval <src.tag.ress2ammount>> <src.tag.ress2type>
endif
else
src.sysmessage You must have more resourses in your pack.
endif
f_craft_item_plan
elif <src.tag.ressamount> == 3
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>) && (<src.restest <eval <src.tag.ress2ammount>> <src.tag.ress2type>>) && (<src.restest <eval <src.tag.ress3ammount>> <src.tag.ress3type>>)
if (src.tag.fizl) == 1
src.consume {1 <eval <cont.tag.ress2ammount>>} <cont.tag.ress2type>
src.consume {1 <eval <cont.tag.ress3ammount>>} <cont.tag.ress3type>
else
src.consume <eval <src.tag.ress2ammount>> <src.tag.ress2type>
src.consume <eval <src.tag.ress3ammount>> <src.tag.ress3type>
endif
else
src.sysmessage You must have more resourses in your pack.
endif
f_craft_item_plan
elif <src.tag.ressamount> == 4
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>) && (<src.restest <eval <src.tag.ress2ammount>> <src.tag.ress2type>>) && (<src.restest <eval <src.tag.ress3ammount>> <src.tag.ress3type>>) && (<src.restest <eval <src.tag.ress4ammount>> <src.tag.ress4type>>)
if (src.tag.fizl) == 1
src.consume {1 <eval <src.tag.ress2ammount>>} <src.tag.ress2type>
src.consume {1 <eval <src.tag.ress3ammount>>} <src.tag.ress3type>
src.consume {1 <eval <src.tag.ress4ammount>>} <src.tag.ress4type>
else
src.consume <eval <src.tag.ress2ammount>> <src.tag.ress2type>
src.consume <eval <src.tag.ress3ammount>> <src.tag.ress3type>
src.consume <eval <src.tag.ress4ammount>> <src.tag.ress4type>
endif
else
src.sysmessage You must have more resourses in your pack.
endif
f_craft_item_plan
elif <src.tag.ressamount> == 5
if (<src.restest <eval <src.tag.ress1ammount>> <src.tag.ress1type>>) && (<src.restest <eval <src.tag.ress2ammount>> <src.tag.ress2type>>) && (<src.restest <eval <src.tag.ress3ammount>> <src.tag.ress3type>>) && (<src.restest <eval <src.tag.ress4ammount>> <src.tag.ress4type>>) && (<src.restest <eval <src.tag.ress5ammount>> <src.tag.ress5type>>)
if (src.tag.fizl) == 1
src.consume {1 <eval <src.tag.ress2ammount>>} <src.tag.ress2type>
src.consume {1 <eval <src.tag.ress3ammount>>} <src.tag.ress3type>
src.consume {1 <eval <src.tag.ress4ammount>>} <src.tag.ress4type>
src.consume {1 <eval <src.tag.ress5ammount>>} <src.tag.ress5type>
else
src.consume <eval <src.tag.ress2ammount>> <src.tag.ress2type>
src.consume <eval <src.tag.ress3ammount>> <src.tag.ress3type>
src.consume <eval <src.tag.ress4ammount>> <src.tag.ress4type>
src.consume <eval <src.tag.ress5ammount>> <src.tag.ress5type>
endif
else
src.sysmessage You must have more resourses in your pack.
endif
f_craft_item_plan
else
        cont.tag.action = 0
endif
if <morez> > 0
morez = <morez> - 1
endif


[function f_res2]
src.tag.ress2type=0
src.tag.ress2name=0
src.tag.ress2ammount=0


[function f_res3]
src.tag.ress3type=0
src.tag.ress3name=0
src.tag.ress3ammount=0


[function f_res4]
src.tag.ress4type=0
src.tag.ress4name=0
src.tag.ress4ammount=0


[function f_res5]
src.tag.ress5type=0
src.tag.ress5name=0
src.tag.ress5ammount=0







Итак небольшое объяснение скрипта, рецепт(в основном расчитан на дроп с мобов) падает с рандомным колвом использований(morey отвечает за коллво юзов) и схемой создания рандомной вещи (из записанных Вами в скипт, Morez отвечает за номер шмотки крафта, потом в функции f_craft_plan добавляем по принципу показанному выше в тойже функции свои шмотки постепенно наращивая Morez). Скрипт зависит от нескольких функций(таких как скиллгейн, физл, крафт и прочих, выложенных мной в скрипте наверху, в том который на менюшки скилла блэксмитинга)



Совсем забыл выложить
Код

[function f_craft_item_plan]
SERV.NEWITEM i_mem_create_plan
src.tag.2 = 4
src.tag.action=1
NEW.CONT=<src.UID>
NEW.LINK=<src.UID>
NEW.EQUIP
new.timerd = 1


[itemdef i_mem_create_plan]
id=i_memory
type=t_eq_script
name=[Create item]

ON=@Create
      attr=094

ON=@Timer
    if <cont>
        if <cont.restest <eval <cont.tag.ress1ammount>> <cont.tag.ress1type>>
        if <cont.tag.2> >= 1
        cont.sound 002a // Р—РІСѓРє
        cont.anim 9
        if <cont.tag.2> == 2
        if <cont.tag.fizl> == 1
        cont.consume {1 <eval <cont.tag.ress1ammount>>} <cont.tag.ress1type>
        cont.sysmessage You fail to make anything.
        unequip
        return 1
        endif
        endif
        cont.tag.2 = <eval <cont.tag.2> - 1>
        timer = 2
        return 1
        else
        cont.newitem <cont.tag.itemtype>
        cont.tag.action = 0
        cont.sysmessage You put <new.name> into your backpack.
        new.cont=<cont.findlayer.layer_pack.uid>
        cont.consume <eval <cont.tag.ress1ammount>> <cont.tag.ress1type>
        f_craft_skillgain_bs
        return 1
        endif
        else
        cont.sysmessage You must have more resourses in your pack.
        return 1
        endif
        endif
Stave
Фак мой мозг+) толком ничего не понимаю+)
Можно лично обратиться по вопросу к скрипту? мне не действия раъяснить, а по мелочи
Это текстовая версия — только основной контент. Для просмотра полной версии этой страницы, пожалуйста, нажмите сюда.
Русская версия Invision Power Board © 2001-2024 Invision Power Services, Inc.