Ingot Store / Maden Store[ITEMDEF i_ingot_store]
name Ingot Store
id i_crystal_green_big
type t_eq_script
Value 5000
flip=0
On=@Create
color 07a1
attr 04
On=@Click
if (<more1> == 00 )
message a ingot store
return 1
else
message @1993 Ingot Store
return 1
On=@Dclick
if !(<src.uid> == <topobj.uid>)
src.sysmessage @1940 Bunu kullanabilmeniz icin uzerinizde olmali.
return 1
elseif (<more1> == 00 )
more1 <src.uid>
src.sysmessage @65 Ingot store artik sizin.
link <src.uid>
return 1
elseif !(strmatch('<more1>','<src.uid>')
src.sysmessage @1940 Bu ingot store bir baskasinin.
return 1
elseif (strmatch('<more1>','<src.uid>')
dialog d_ingot_store
return 1
endif
On=@TargOn_Item
if (<isempty <tag0.iron_ingot>>) || (<isempty <tag0.old_copper_ingot>>) || (<isempty <tag0.dull_copper_ingot>>) || (<isempty <tag0.copper_ingot>>) || (<isempty <tag0.gold_ingot>>) || (<isempty <tag0.shadow_ingot>>) || (<isempty <tag0.silver_ingot>>) || (<isempty <tag0.bronze_ingot>>)
tag0.iron_ingot 0
tag0.old_copper_ingot 0
tag0.dull_copper_ingot 0
tag0.copper_ingot 0
tag0.gold_ingot 0
tag0.shadow_ingot 0
tag0.silver_ingot 0
tag0.bronze_ingot 0
endif
if (<src.targ.baseid> == i_ingot_iron )
tag0.iron_ingot += <src.targ.amount>
src.sms Ingot Store'unuza <eval <src.targ.amount>> iron eklendi.
src.targ.remove
target
elseif (<src.targ.baseid> == i_ingot_old_copper )
tag0.old_copper_ingot += <src.targ.amount>
src.sms Ingot Store'unuza <eval <src.targ.amount>> old copper eklendi.
src.targ.remove
target
elseif (<src.targ.baseid> == i_ingot_dull_copper )
tag0.dull_copper_ingot += <src.targ.amount>
src.sms Ingot Store'unuza <eval <src.targ.amount>> dull copper eklendi.
src.targ.remove
target
elseif (<src.targ.baseid> == i_ingot_copper )
tag0.copper_ingot += <src.targ.amount>
src.sms Ingot Store'unuza <eval <src.targ.amount>> copper eklendi.
src.targ.remove
target
elseif (<src.targ.baseid> == i_ingot_gold )
tag0.gold_ingot += <src.targ.amount>
src.sms Ingot Store'unuza <eval <src.targ.amount>> gold eklendi.
src.targ.remove
target
elseif (<src.targ.baseid> == i_ingot_shadow )
tag0.shadow_ingot += <src.targ.amount>
src.sms Ingot Store'unuza <eval <src.targ.amount>> shadow eklendi.
src.targ.remove
target
elseif (<src.targ.baseid> == i_ingot_silver )
tag0.silver_ingot += <src.targ.amount>
src.sms Ingot Store'unuza <eval <src.targ.amount>> silver eklendi.
src.targ.remove
target
elseif (<src.targ.baseid> == i_ingot_bronze )
tag0.bronze_ingot += <src.targ.amount>
src.sms Ingot Store'unuza <eval <src.targ.amount>> bronze eklendi.
src.targ.remove
target
else
src.smg @1945 Bu bir ingot degil.
endif
return 1
[DIALOG d_ingot_store]
100, 20
//PAGE 0
resizepic 2 2 5054 460 420
button 28 330 4005 4006 1 0 1
text 59 330 990 16
button 185 330 4005 4006 1 0 2
text 216 330 990 17
button 28 350 4005 4006 1 0 3
dtext 59 350 990 Hepsinden Cikart
button 185 350 4005 4006 1 0 4
dtext 216 350 990 Hepsini Ekle
gumppic 210 40 5569
tilepic 10 60 <eval 0f8d> // iron
gumppic 22 80 2443
textentry 46 82 40 20 5 0 0
button 90 80 4005 4006 1 0 5
text 45 58 5 1
tilepic 10 112 <eval 0f8c> // old copper
gumppic 22 128 2443
textentry 46 130 40 20 5 1 2
button 90 128 4005 4006 1 0 6
text 48 110 5 3
tilepic 10 164 <eval 0f88> // dull copper
gumppic 22 184 2443
textentry 46 186 40 20 5 2 4
button 90 184 4005 4006 1 0 7
text 45 162 5 5
tilepic 10 216 <eval 0f7b> // copper
gumppic 22 233 2443
textentry 46 235 40 20 5 3 6
button 90 232 4005 4006 1 0 11
text 45 214 5 7
tilepic 10 268 <eval 0f85> // gold
gumppic 22 285 2443
textentry 46 287 40 20 5 4 8
button 90 285 4005 4006 1 0 9
text 45 266 5 9
tilepic 204 273 <eval 0f84> // shadow
gumppic 210 285 2443
textentry 233 287 40 20 5 5 10
button 277 285 4005 4006 1 0 10
text 232 266 5 11
tilepic 204 216 <eval 0f86> // silver
gumppic 210 233 2443
textentry 233 235 40 20 5 6 12
button 277 233 4005 4006 1 0 8
text 232 214 5 13
tilepic 198 168 <eval 0f7a> // bronze
gumppic 210 184 2443
textentry 233 186 40 20 5 7 14
button 277 184 4005 4006 1 0 12
text 232 162 5 15
[DIALOG d_ingot_store TEXT]
<eval <tag0.iron_ingot>>
Iron Ingot
<eval <tag0.old_copper_ingot>>
Old Copper Ingot
<eval <tag0.dull_copper_ingot>>
Dull Copper Ingot
<eval <tag0.copper_ingot>>
Copper Ingot
<eval <tag0.gold_ingot>>
Gold Ingot
<eval <tag0.shadow_ingot>>
Shadow Ingot
<eval <tag0.silver_ingot>>
Silver Ingot
<eval <tag0.bronze_ingot>>
Bronze Ingot
Hepsini Cikart
Ingot Ekle
0
[DIALOG d_ingot_store BUTTON]
on=1
if (<tag0.iron_ingot> > 0)
serv.newitem i_ingot_iron
new.amount <tag0.iron_ingot>
new.bounce
tag0.iron_ingot 0
endif
if (<tag0.old_copper_ingot> > 0)
serv.newitem i_ingot_old_copper
new.amount <tag0.old_copper_ingot>
new.bounce
tag0.old_copper_ingot 0
endif
if (<tag0.dull_copper_ingot> > 0)
serv.newitem i_ingot_dull_copper
new.amount <tag0.dull_copper_ingot>
new.bounce
tag0.dull_copper_ingot 0
endif
if (<tag0.copper_ingot> > 0)
serv.newitem i_ingot_copper
new.amount <tag0.copper_ingot>
new.bounce
tag0.copper_ingot 0
endif
if (<tag0.gold_ingot> > 0)
serv.newitem i_ingot_gold
new.amount <tag0.gold_ingot>
new.bounce
tag0.gold_ingot 0
endif
if (<tag0.shadow_ingot> > 0)
serv.newitem i_ingot_shadow
new.amount <tag0.shadow_ingot>
new.bounce
tag0.shadow_ingot 0
endif
if (<tag0.silver_ingot> > 0)
serv.newitem i_ingot_silver
new.amount <tag0.silver_ingot>
new.bounce
tag0.silver_ingot 0
endif
if (<tag0.bronze_ingot> > 0)
serv.newitem i_ingot_bronze
new.amount <tag0.bronze_ingot>
new.bounce
tag0.bronze_ingot 0
endif
on=2
target
On=3
sdialog d_hepsinden_cikart
On=4
if (<src.findid.i_ingot_iron>)
tag0.iron_ingot += <src.rescount i_ingot_iron>
src.consume <src.rescount i_ingot_iron> i_ingot_iron
endif
if (<src.findid.i_ingot_old_copper>)
tag0.old_copper_ingot += <src.rescount i_ingot_old_copper>
src.consume <src.rescount i_ingot_old_copper> i_ingot_old_copper
endif
if (<src.findid.i_ingot_dull_copper>)
tag0.dull_copper_ingot += <src.rescount i_ingot_dull_copper>
src.consume <src.rescount i_ingot_dull_copper> i_ingot_dull_copper
endif
if (<src.findid.i_ingot_copper>)
tag0.copper_ingot += <src.rescount i_ingot_copper>
src.consume <src.rescount i_ingot_copper> i_ingot_copper
endif
if (<src.findid.i_ingot_gold>)
tag0.gold_ingot += <src.rescount i_ingot_gold>
src.consume <src.rescount i_ingot_gold> i_ingot_gold
endif
if (<src.findid.i_ingot_shadow>)
tag0.shadow_ingot += <src.rescount i_ingot_shadow>
src.consume <src.rescount i_ingot_shadow> i_ingot_shadow
endif
if (<src.findid.i_ingot_silver>)
tag0.silver_ingot += <src.rescount i_ingot_silver>
src.consume <src.rescount i_ingot_silver> i_ingot_silver
endif
if (<src.findid.i_ingot_bronze>)
tag0.bronze_ingot += <src.rescount i_ingot_bronze>
src.consume <src.rescount i_ingot_bronze> i_ingot_bronze
endif
src.sysmessage @1940 Cantanizdaki butun ingotlar ingot store'a eklendi.
On=5
if (<argtxt[0]> > 0)
if (<eval <tag0.iron_ingot>> >= <argtxt[0]>)
serv.newitem i_ingot_iron
new.amount <argtxt[0]>
new.bounce
tag0.iron_ingot -= <argtxt[0]>
else
src.smg @1940 Ingot Store'unuzda bu kadar iron yok.
endif
endif
On=6
if (<argtxt[1]> > 0)
if (<eval <tag0.old_copper_ingot>> >= <argtxt[1]>)
serv.newitem i_ingot_old_copper
new.amount <argtxt[1]>
new.bounce
tag0.old_copper_ingot -= <argtxt[1]>
else
src.smg @1940 Ingot Store'unuzda bu kadar old copper yok.
endif
endif
On=7
if (<argtxt[2]> > 0)
if (<eval <tag0.dull_copper_ingot>> >= <argtxt[2]>)
serv.newitem i_ingot_dull_copper
new.amount <argtxt[2]>
new.bounce
tag0.dull_copper_ingot -= <argtxt[2]>
else
src.smg @1940 Ingot Store'unuzda bu kadar ingot yok.
endif
endif
On=8
if (<argtxt[6]> > 0)
if (<eval <tag0.copper_ingot>> >= <argtxt[6]>)
serv.newitem i_ingot_copper
new.amount <argtxt[6]>
new.bounce
tag0.copper_ingot -= <argtxt[6]>
else
src.smg @1940 Ingot Store'unuzda bu kadar copper yok.
endif
endif
On=9
if (<argtxt[4]> > 0)
if (<eval <tag0.gold_ingot>> >= <argtxt[4]>)
serv.newitem i_ingot_gold
new.amount <argtxt[4]>
new.bounce
tag0.gold_ingot -= <argtxt[4]>
else
src.smg @1940 Ingot Store'unuzda bu kadar gold yok.
endif
endif
On=10
if (<argtxt[5]> > 0)
if (<eval <tag0.shadow_ingot>> >= <argtxt[5]>)
serv.newitem i_ingot_shadow
new.amount <argtxt[5]>
new.bounce
tag0.shadow_ingot -= <argtxt[5]>
else
src.smg @1940 Ingot Store'unuzda bu kadar shadow yok.
endif
endif
On=11
if (<argtxt[3]> > 0)
if (<eval <tag0.silver_ingot>> >= <argtxt[3]>)
serv.newitem i_ingot_silver
new.amount <argtxt[3]>
new.bounce
tag0.silver_ingot -= <argtxt[3]>
else
src.smg @1940 Ingot Store'unuzda bu kadar silver yok.
endif
endif
On=12
if (<argtxt[7]> > 0)
if (<eval <tag0.bronze_ingot>> >= <argtxt[7]>)
serv.newitem i_ingot_bronze
new.amount <argtxt[7]>
new.bounce
tag0.bronze_ingot -= <argtxt[7]>
else
src.smg @1940 Ingot Store'unuzda bu kadar bronze yok.
endif
endif
[DIALOG d_hepsinden_cikart]
100, 20
PAGE 0
resizepic 2 2 5054 140 90
resizepic 25 25 2620 60 35
textentry 32 32 40 20 990 1 0
button 90 30 4005 4006 1 0 1
[DIALOG d_hepsinden_cikart TEXT]
0
[DIALOG d_hepsinden_cikart BUTTON]
On=1
if (<eval <argtxt[1]>> == 0)
return 1
endif
if (<eval <tag0.iron_ingot>> < <eval <argtxt[1]>>) || (<eval <tag0.old_copper_ingot>> < <eval <argtxt[1]>>) || (<eval <tag0.dull_copper_ingot>> < <eval <argtxt[1]>>) || (<eval <tag0.copper_ingot>> < <eval <argtxt[1]>>) || (<eval <tag0.gold_ingot>> < <eval <argtxt[1]>>) || (<eval <tag0.shadow_ingot>> < <eval <argtxt[1]>>) || (<eval <tag0.silver_ingot>> < <eval <argtxt[1]>>) || (<eval <tag0.bronze_ingot>> < <eval <argtxt[1]>>)
src.sysmessage @38,1,1 Ingot Store'da bu kadar ingot bulunmuyor.
return 1
endif
serv.newitem i_ingot_iron
new.amount <eval <argtxt[1]>>
new.bounce
tag0.iron_ingot <eval <tag0.iron_ingot> - <argtxt[1]>>
serv.newitem i_ingot_old_copper
new.amount <eval <argtxt[1]>>
new.bounce
tag0.old_copper_ingot <eval <tag0.old_copper_ingot> - <argtxt[1]>>
serv.newitem i_ingot_dull_copper
new.amount <eval <argtxt[1]>>
new.bounce
tag0.dull_copper_ingot <eval <tag0.dull_copper_ingot> - <argtxt[1]>>
serv.newitem i_ingot_copper
new.amount <eval <argtxt[1]>>
new.bounce
tag0.copper_ingot <eval <tag0.copper_ingot> - <argtxt[1]>>
serv.newitem i_ingot_gold
new.amount <eval <argtxt[1]>>
new.bounce
tag0.gold_ingot <eval <tag0.gold_ingot> - <argtxt[1]>>
serv.newitem i_ingot_shadow
new.amount <eval <argtxt[1]>>
new.bounce
tag0.shadow_ingot <eval <tag0.shadow_ingot> - <argtxt[1]>>
serv.newitem i_ingot_silver
new.amount <eval <argtxt[1]>>
new.bounce
tag0.silver_ingot <eval <tag0.silver_ingot> - <argtxt[1]>>
serv.newitem i_ingot_bronze
new.amount <eval <argtxt[1]>>
new.bounce
tag0.bronze_ingot <eval <tag0.bronze_ingot> - <argtxt[1]>>
[eof]