// BUY SELL DIALOGLARI
// 09 agus 2005
// create by galentos
// 29-11-2005-------------
// fixed: "" karakteriyle bedava item satin alma.
// --------------------------
// 27-05-2006-------------
// fixed: server cokme hatasi.
// update: sinirsiz sayfada gosterim.
// --------------------------
VERSION RC4.0.2
// Konsolda can_i_pile sorunu alan kişiler spheredefs.scp nin içine
[DEFNAME can_i_flags]
CAN_I_DOOR 00001 // Is a door UFLAG4_DOOR
CAN_I_WATER 00002 // Need to swim in it. UFLAG1_WATER
CAN_I_PLATFORM 00004 // we can walk on top of it. (even tho the item itself might block) UFLAG2_PLATFORM
CAN_I_BLOCK 00008 // need to walk thru walls or fly over. UFLAG1_BLOCK
CAN_I_CLIMB 00010 // step up on it, UFLAG2_CLIMBABLE
CAN_I_FIRE 00020 // Is a fire. Ussually blocks as well. UFLAG1_DAMAGE
CAN_I_ROOF 00040 // We are under a roof. can't rain on us. UFLAG4_ROOF
CAN_I_PILE 00100 // Can item be piled UFLAG2_STACKABLE (*.mul)
CAN_I_DYE 00200 // Can item be dyed UFLAG3_CLOTH? (sort of)
CAN_I_FLIP 00400 // will flip by default.
CAN_I_LIGHT 00800 // UFLAG3_LIGHT
CAN_I_REPAIR 01000 // Is it repairable (difficulty based on value)
CAN_I_REPLICATE 02000 // Things like arrows are pretty much all the same.
// eklemeleri gerekmektedir.
[function f_buying]
if (<obj.can>&can_i_pile)
serv.newitem <obj.baseid>
new.amount <argn2>
src.bounce <new>
obj.amount -= <argn2>
if (<argn1> == 1)
src.consume i_gold <eval <obj.value>*<argn2>>
else
src.gpconsume <eval <obj.value>*<argn2>>
endif
else
for <argn2>
serv.newitem <obj.baseid>
new.cont <src.findlayer.21>
obj.amount -= 1
if (<argn1> == 1)
src.consume i_gold <obj.value>
else
try src.gpconsume <obj.value>
endif
endfor
src.sysmessage You put the <obj.name> in your pack.
endif
src.tag.satis += <eval <obj.value>*<argn2>>
[function f_tutar]
if (<eval <src.tag.satis>> != 0)
say Sayin <src.name>, alis/veris tutariniz <eval <src.tag.satis>>gp' dir. Tekrar beklerim.
endif
src.tag.satis
[function isvcheck]
if !(<isnum <args>>)
return 0
elif strmatch(<strsub 0 1 <args>>,0)
return 0
elif (<eval <args>> > 1000)
return 0
elif (strlen(<args>) > 3)
return 0
elif (<args> == 0)
return 0
else
return 1
endif
[dialog d_buying]
60 0
page 0
resizepic 50 10 3600 510 460
dtext 140 10 95 Esya Fiyat Stock Miktar
button 210 420 5031 5031 1 0 2 // sat
dtext 230 417 63 Esya sat
button 320 420 5031 5031 1 0 1 // satin al
dtext 328 417 033 Esya satin al
page 1
local.sayfa 1
local.gecis 0
for 0 <eval <findlayer.26.rescount>-1>
obj=<findlayer.26.findcont.<eval <local._for>>>
if (<local.gecis> > 18)
local.gecis 0
local.sayfa += 1
button 500 420 4006 4007 0 <local.sayfa> 102
page <local.sayfa>
button 70 420 4015 4016 0 <eval <local.sayfa>-1> 101 // geri
endif
tilepic 70 <eval ((<local.gecis>+1)*20)+10> <obj.id>
dtext 110 <eval ((<local.gecis>+1)*20)+10> 55 <obj.name>
dtext 310 <eval ((<local.gecis>+1)*20)+10> 33 <obj.value>
dtext 395 <eval ((<local.gecis>+1)*20)+10> 995 <obj.amount>
resizepic 460 <eval ((<local.gecis>+1)*20)+10> 3000 60 20
dtextentry 470 <eval ((<local.gecis>+1)*20)+10> 55 25 270 <eval <local._for>> 0
local.gecis += 1
endif
endfor
[dialog d_buying button]
on=0 2
if (<argn> == 1)
if (<distance> < 3) && (<canseelos>)
src.tag.satis 0
for 0 <eval <findlayer.26.rescount>-1>
if !strmatch(*"*,<argtxt[<eval <local._for>>]>>) && (<isvcheck <argtxt[<eval <local._for>>]>>)
obj=<findlayer.26.findcont.<eval <local._for>>>
if (<obj.amount> >= <argtxt[<eval <local._for>>]>)
if (<src.restest <argtxt[<eval <local._for>>]>*<obj.value> i_gold>)
call f_buying 1 <argtxt[<eval <local._for>>]>
elseif (<src.gp> >= <argtxt[<eval <local._for>>]>*<obj.value>>)
call f_buying 2 <argtxt[<eval <local._for>>]>
else
f_tutar
src.sysmessage <obj.name> icin yeterli para uzerinizde ve bankanizda bulunmuyor.
return 1
endif
else
f_tutar
src.sysmessage Belirttiginiz miktarda <obj.name> stokta kalmamis.
return 1
endif
endif
endfor
f_tutar
else
src.sysmessage Vendora ulasamiyorsunuz.
endif
elseif (<argn> == 2)
if (<distance> < 3) && (<canseelos>)
hear sell
endif
endif
src.tag.satis
return 1
[EOF]
Total votes: 0
Ultima Online 4 gün önce
Sunucular 1 hafta önce
Duyurular 3 hafta önce
Sphere Scripting 3 hafta önce
Ultima Online 3 hafta önce
Sunucular 4 hafta önce
Diğer Oyunlar 1 ay önce
Sunucular 1 ay önce
Ultima Online 1 ay önce
Sunucular 1 ay önce
Ultima Online 1 ay önce
Ultima Online 2 ay önce
2024-10-31 22:47
2024-10-14 17:45
2024-09-26 14:21
2024-07-08 22:50
2024-07-08 22:34
2024-06-19 22:05
2024-06-01 02:19
2024-05-31 21:17
Yorumlar (0)