SphereCommunity

Full Version: Store crystal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need a reg storage about inscriptor craft player.

- Player can store huge amount regs in this crystal when they buy regs.
- Player can extract regs whatever they want. They can be extract 1 or 2 or all from store crystal
- Player can extract spesific amount of regs from crystal to own bagpack
- Player can collect regs from own bagpack. Crystal can check bagpack and collect all regs

TY
done with spherecpmmunities help
hehehe
Smile Extreme is my hero Smile
This is reg store.
Code:
[ITEMDEF i_reg_store]
name reagent store
id i_crystal_green_big
type t_eq_script
Value 5000
flip=0

On=@Create
color 0b92

On=@Click
if (<more1> == 00 )
message @091,,1 a reagent store
return 1
else
message @091,,1 a reagent store
message @092,,1 [<link.name>]
return 1

On=@Dclick
if !(<src.uid> == <topobj.uid>)
src.sysmessage @1100,,1 Bunu kullanabilmeniz icin uzerinizde olmali.
return 1
elseif (<more1> == 00 )
more1 <src.uid>
src.sysmessage @045,,1 Reagent store artik sizin.
link <src.uid>
return 1
elseif !(strmatch('<more1>','<src.uid>' )
src.sysmessage @1100,,1 Bu reagent store bir baskasinin.
return 1
elseif (<more1> == <src.uid>)
src.dialog d_reagent_store
return 1
endif

[DIALOG d_reagent_store]
100, 20
//PAGE 0
resizepic 2 2 2620 460 376
button 28 330 4005 4006 1 0 1
text 59 330 1152 16
button 179 330 4005 4006 1 0 2
text 212 330 1152 17
gumppic 210 40 5569

tilepic 10 60 <eval 0f8d> // spider silk
gumppic 22 80 2443
text 46 82 5 0
text 45 58 5 1

tilepic 10 112 <eval 0f8c> // sulfurous ash
gumppic 22 128 2443
text 46 130 5 2
text 48 110 5 3

tilepic 10 164 <eval 0f88> // nightshade
gumppic 22 184 2443
text 46 186 5 4
text 45 162 5 5

tilepic 10 216 <eval 0f7b> // mandrake root
gumppic 22 233 2443
text 46 235 5 6
text 45 214 5 7

tilepic 10 268 <eval 0f85> // ginseng
gumppic 22 285 2443
text 46 287 5 8
text 45 266 5 9


tilepic 204 273 <eval 0f84> // garlic
gumppic 210 285 2443
text 233 287 5 10
text 232 266 5 11

tilepic 204 216 <eval 0f86> // blood moss
gumppic 210 233 2443
text 233 235 5 12
text 232 214 5 13

tilepic 198 168 <eval 0f7a> // black pearl
gumppic 210 184 2443
text 233 186 5 14
text 232 162 5 15

[DIALOG d_reagent_store TEXT]
<eval <src.tag0.spider_silk>>
Spider's Silk
<eval <src.tag0.sulfur_ash>>
Sulfurous Ash
<eval <src.tag0.nightshade>>
Nightshade
<eval <src.tag0.blood_moss>>
Blood Moss
<eval <src.tag0.ginseng>>
Ginseng
<eval <src.tag0.garlic>>
Garlic
<eval <src.tag0.mandrake_root>>
Mandrake Root
<eval <src.tag0.black_pearl>>
Black Pearls
Hepsini Cikart
Reagent Ekle

[DIALOG d_reagent_store BUTTON]
on=1
if (<src.tag0.nightshade> > 0)
serv.newitem i_reag_nightshade
new.amount <src.tag0.nightshade>
new.bounce
src.tag0.nightshade 0
else
return 0
endif
if (<src.tag0.garlic> > 0)
serv.newitem i_reag_garlic
new.amount <src.tag0.garlic>
new.bounce
src.tag0.garlic 0
else
return 0
endif
if (<src.tag0.ginseng> > 0)
serv.newitem i_reag_ginseng
new.amount <src.tag0.ginseng>
new.bounce
src.tag0.ginseng 0
else
return 0
endif
if (<src.tag0.black_pearl> > 0)
serv.newitem i_reag_black_pearl
new.amount <src.tag0.black_pearl>
new.bounce
src.tag0.black_pearl 0
else
return 0
endif
if (<src.tag0.spider_silk> > 0)
serv.newitem i_reag_spider_silk
new.amount <src.tag0.spider_silk>
new.bounce
src.tag0.spider_silk 0
else
return 0
endif
if (<src.tag0.sulfur_ash> > 0)
serv.newitem i_reag_sulfur_ash
new.amount <src.tag0.sulfur_ash>
new.bounce
src.tag0.sulfur_ash 0
else
return 0
endif
if (<src.tag0.blood_moss> > 0)
serv.newitem i_reag_blood_moss
new.amount <src.tag0.blood_moss>
new.bounce
src.tag0.blood_moss 0
else
return 0
endif
if (<src.tag0.mandrake_root> > 0)
serv.newitem i_reag_mandrake_root
new.amount <src.tag0.mandrake_root>
new.bounce
src.tag0.mandrake_root 0
else
return 0
endif
on=2
serv.newitem i_reg_ekle
new.equip
return 1

[ITEMDEF i_reg_ekle]
id i_gold
name reagent ekle
type t_eq_script
layer layer_special
weight 0.1

On=@Create
timer 15
attr attr_decay

On=@Timer
Remove

On=@Equip
target @045,,1 Eklemek istediginiz reagent'i secin.
return 1

On=@TargOn_Char
Return 1

On=@TargOn_Ground
return 1

On=@TargOn_Item
if (<src.targ.baseid> == i_reag_nightshade )
src.tag0.nightshade <eval <src.tag0.nightshade> + <src.targ.amount>>
src.sms Reagent Store'unuza <eval <src.targ.amount>> nightshade eklendi.
timer 1
src.targ.remove
return 1
elseif (<src.targ.baseid> == i_reag_garlic )
src.tag0.garlic <eval <src.tag0.garlic> + <src.targ.amount>>
src.sms Reagent Store'unuza <eval <src.targ.amount>> garlic eklendi.
timer 1
src.targ.remove
return 1
elseif (<src.targ.baseid> == i_reag_ginseng )
src.tag0.ginseng <eval <src.tag0.ginseng> + <src.targ.amount>>
src.sms Reagent Store'unuza <eval <src.targ.amount>> ginseng eklendi.
timer 1
src.targ.remove
return 1
elseif (<src.targ.baseid> == i_reag_black_pearl )
src.tag0.black_pearl <eval <src.tag0.black_pearl> + <src.targ.amount>>
src.sms Reagent Store'unuza <eval <src.targ.amount>> black pearl eklendi.
timer 1
src.targ.remove
return 1
elseif (<src.targ.baseid> == i_reag_spider_silk )
src.tag0.spider_silk <eval <src.tag0.spider_silk> + <src.targ.amount>>
src.sms Reagent Store'unuza <eval <src.targ.amount>> spider silk eklendi.
timer 1
src.targ.remove
return 1
elseif (<src.targ.baseid> == i_reag_sulfur_ash )
src.tag0.sulfur_ash <eval <src.tag0.sulfur_ash> + <src.targ.amount>>
src.sms Reagent Store'unuza <eval <src.targ.amount>> sulphurous ash eklendi.
timer 1
src.targ.remove
return 1
elseif (<src.targ.baseid> == i_reag_blood_moss )
src.tag0.blood_moss <eval <src.tag0.blood_moss> + <src.targ.amount>>
src.sms Reagent Store'unuza <eval <src.targ.amount>> blood moss eklendi.
timer 1
src.targ.remove
return 1
elseif (<src.targ.baseid> == i_reag_mandrake_root )
src.tag0.mandrake_Root <eval <src.tag0.mandrake_root> + <src.targ.amount>>
src.sms Reagent Store'unuza <eval <src.targ.amount>> mandrake root eklendi.
timer 1
src.targ.remove
return 1
else
src.smg Bu bir reagent degil.
timer 1
return 1
endif
This is ingot store.
Code:
[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]
Thank you interested in Nores. This script will help to ppl
Reference URL's