S.a
Arkadaşlar elimde bir adet pazar vendoru var fakat nedense iteme bir türlü ücret yazamıyorum ve konusmalarımıda algılamıyor.
sistem gayet güzel fakat nedense vendorun sahibi olmama ragmen beni tınlamıyor.
konu hakında yardımlarınızı ve fikirlerinizi bekliyorum.
[itemdef i_pvendor]//creat system by galentos
defname i_pvendor
id 0edc//i_grave_Stone_4
name Vendor Satin Alma Tasi
weight 250
type t_script
on=@create
color 007b2
attr attr_move_never
timer 1 // birden fazla kisinin kullanimina engel olabilmek icin.
On=@Click
if (<src.region.uid> == <region.uid>)
if (<timer> > 1)
sayua 0905,0,0,0 Vendor Satin Alma Tasi[Kapali]
return 1
endif
sayua 0905,0,0,0 Vendor Satin Alma Tasi
else
message Vendor satin alma tasi
endif
return 1
on=@dclick
if (<distance> > 1)
src.sysmessage Tasin dibine girmelisiniz.
elseif (<timer> > 1)
src.sysmessage @33 Bu tasi simdilik kullanamazsiniz.
elseif (<src.account.tag0.vendor>)
src.sysmessage @33 Zaten hesabiniza ait vendor bulunmakta.
else
dialog d_vendor_satinal
timer 120
endif
return 1
on=@timer
message Kullanima acilmistir.
return 1
[dialog d_vendor_satinal]//creat by galentos
0,0
noclose
//nomove //simdilik gerek yok
resizepic 200 175 2620 400 300 //arka plan
resizepic 210 225 3000 380 240 //html arka plani
htmlgump 220 235 360 170 0 1 1
htmlgump 255 427 200 20 1 0 0
htmlgump 490 427 100 20 2 0 0
text 245 195 090 3
button 220 425 4005 4007 1 0 1
button 455 425 4005 4007 1 0 2
[dialog d_vendor_satinal text]
Merhabalar <src.name>, Esyalarinizi satabilmek icin, pazar alaninda kurulu olacak dukkaniniza vendor satin alma sistemimizi sectiniz. Buradan alacaginiz vendorunuz ile guvenle esyalarinizi satabilirsiniz. Yalniz vendor ucreti olarak bankanizdan 250k eksilecektir ve aldiginiz bu iscinizin surekli sizin adiniza calismasini saglamaniz her ay 40k gold odeme yapmaniz ile gerceklesecektir. Eger bu sozlesmeyi kabul ederseniz; isciniz sizin adiniza, guvenle, belirlediginiz esyalari satmasini saglayacaksiniz. * <serv.name> *
Evet, sozlesmeyi kabul ediyorum.
Red ediyorum.
-= <serv.name> Vendor Satin Alma Islemi =-
[dialog d_vendor_satinal button]
on=1
if !(<distance> > 1)
if (<src.account.tag0.vendor>)
src.sysmessage @33 Zaten hesabiniza ait vendor bulunmakta.
timer 1
return 1
elseif (<src.gold> > 250000)
src.sysmessage @33 Yeterli paraniz bankanizda yok.
timer 1
return 1
else
src.gpconsume 250000 i_gold
update
src.tag.upgrade_vendor 1
src.newnpc c_pzv
src.act.p <p>
src.act.name <src.name>
src.act.tag.upgrade 1
src.act.tag.p <p>
src.act.tag.px <p.x>
src.act.tag.py <p.y>
src.act.tag.pz <p.z>
src.act.findid.i_pzv.link <link.uid>
src.act.tag.owner <src.account>
src.act.findlayer(29).more1 40000
src.act.memorydel <src.uid>
src.act.newitem i_memory
src.act.act.attr 04
src.act.act.more1 04
src.act.act.more2 <serv.time>
src.act.act.morep <src.act.p>
src.act.act.color memory_ipet
src.act.act.timer -1
src.act.act.link <src.uid>
src.act.act.cont <src.act.uid>
src.act.flags <src.act.flags>&statf_pet
src.act.update
var.vendor_uid <src.act.uid>
src.sysmessage @62 Vendorunuz kuruldu, komutlar icin '<src.act.name> yardim' yaziniz.
src.tag.vendor <src.act.uid>
src.act.equip
remove
var.vendor_uid
return 1
endif
else
src.sysmessage @33 Tasin dibine girmelisiniz.
timer 1
return 1
endif
on=2
src.sysmessage @55 Vendor satin almaktan vazgectiniz.
timer 1
// **************
// VENDOR CHARDEF
// **************
[chardef c_pzv]
defname c_pzv
name Vendor
id c_man
can mt_equip|mt_nonmover
hiredaywage 52 //gunluk kiralama bedeli
desires i_gold //calisma karsiligi
tspeech pzv_spch
tevents e_pzv
On=@Create
str 9500
dex 1
int 1
color colors_skin
speechcolor 0481
food 990
npc 1
magery 100.0
evaluatingintel 100.0
meditation 100.0
itemnewbie random_male_hair
color colors_hair
itemnewbie random_facial_hair
color match_hair
item i_robe
color colors_all
item i_torch_lit
morey -1
itemnewbie i_backpack
itemnewbie i_bankbox
color 0384
timer 900
attr 015//014
itemnewbie i_pzv
timer 800
itemnewbie i_pzv_rem
// *******
// ITEMLAR
// *******
[itemdef i_premover]
id i_deed
name vendor sil
type t_eq_script
on=@create
color 01
attr attr_move_never
On=@dclick
if (strmatch('<src.account>','dream')) || (<src.account.plevel> = 7)
target Guncellenecek Vendor' u secin.
else
remove
endif
return 1
on=@targon_char
if (<src.targ.findid.i_pzv_rem>)
if (0<src.targ.tag.upgrade> == 01)
src.sysmessage @55 Bu vendor upgrade edilmis.
else
//src.targ.findid(i_pzv_rem).remove
src.sysmessage @63 <eval <src.targ.findlayer(29).more1>> miktar para vardi.
src.targ.findid.i_pzv_rem.timer 2
//src.targ.findid.i_pzv.timer 1
endif
else
src.sysmessage Bu bir player vendor degil.
endif
return 1
[itemdef i_pzv_rem]
id i_memory
name vendor silici
type t_eq_script
On=@UnEquip
cont.memoryfindtype.memory_ipet.link.tag.vendor
cont.p <cont.tag.p>
cont.update
if !(<more2> == 3)
cont.findid.i_pzv.link.tag.vendnumber <eval (<cont.findid.i_pzv.link.tag.vendnumber> - 1)>
if (<cont.findid.i_pzv.link.tag.vendor1> == <cont.uid>)
cont.findid.i_pzv.link.tag.vendor1 0
endif
endif
cont.newitem i_pvendor
cont.act.equip
cont.findid(i_pvendor).drop
cont.remove
On=@Timer
remove
return 1
[itemdef i_pzv]
id i_memory
name vendor ana kontroller
type t_eq_script
On=@TargOn_Char
if (<src.targ.uid> == <cont.uid>)
cont.findlayer(21).open
target
endif
return 1
On=@TargOn_Item
if (<more1> == 1) // dinamik fiyatlandirma
if !(<src.account.tag.vendor> == <cont.uid>)
cont.sayu <src.name>, siz benim isverenim degilsiniz.
elseif !(<src.targ.topobj.uid> == <cont.uid>)
cont.sayu Bu esya cantamda degil.
elseif (strmatch('<src.targ.price>',''))
cont.sayu Bu satilabilecek bir esya degil.
elseif (<eval <more2>> <= 0)
src.targ.price 0
cont.sayu <src.targ.name>: 'satilik degil' olarak isaretlendi.
else
src.targ.price <eval <more2>>
more2 0
cont.sayu <src.targ.name>: <src.targ.price> altin.
endif
elseif (<more1> == 2) // satis
if !(<src.targ.topobj.uid> == <cont.uid>)
cont.sayu Bu esya cantamda degil.
elseif (strmatch('<src.targ.price>',''))
cont.sayu Bu esya satilik degil.
elseif (<src.targ.price> <= 0)
cont.sayu Bu esya satilik degil.
elseif (<src.gp> < <src.targ.price>)
cont.sayu Bankanizin en ust kisminda <src.targ.price> altininiz bulunmuyor.
else
src.targ.dialog d_pzv_buy
endif
elseif (<more1> == 3) // para aktarma
if !(<src.account.tag.vendor> == <cont.uid>)
cont.sayu <src.name>, siz benim isverenim degilsiniz.
elseif !(<src.targ.topobj.uid> == <src.uid>)
cont.sayu Gosterdiginiz nesne sizin uzerinizde degil.
elseif !(<src.targ.baseid> == i_gold)
cont.sayu Bu gosterdiginiz altin degil.
else
cont.findlayer(29).more1 <eval (<cont.findlayer(29).more1> + <src.targ.amount>)>
if (<eval (<src.targ.amount> / <cont.hiredaywage>)> > 0)
cont.sayu <src.targ.amount> altin calisma suremi <eval (<src.targ.amount> / (<cont.hiredaywage> * 24))> gun uzatti, tesekkur ederim.
else
cont.sayu <src.targ.amount> altin kasama eklendi, tesekkur ederim.
endif
src.targ.remove
endif
endif
return 1
On=@Timer
timer 800 // check
if (<cont.flags>&statf_war)
cont.flags <cont.flags>&~statf_war
cont.update
endif
cont.food 990
cont.p <cont.tag.p>
cont.tag.p <cont.p>
cont.tag.px <cont.p.x>
cont.tag.py <cont.p.y>
cont.tag.pz <cont.p.z>
if (<eval <cont.findlayer(29).more1>> < 1)
if (<cont.findid.i_pzv_rem.timer> < 0)
if (<cont.findid.i_pzv_rem.more1>)
cont.sayu Bedavaya calisacak degilim.
serv.account <cont.tag.owner> tag.vendor
cont.tag.vendor_ayrildi 1
cont.salute
cont.findid.i_pzv_rem.timer 3
cont.memoryfindtype.memory_ipet.link.sysmessage @55 Vendorunuz maas alamadigi icin istifa etti.
else
cont.findid.i_pzv_rem.more1 1
cont.go <cont.tag.p>
endif
endif
endif
return 1
// *********
// DIALOGLAR
// *********
[dialog d_pzv_cash]
300,300
resizepic 0 0 5054 200 75
resizepic 5 10 2620 190 35
textentry 15 16 600 20 1152 1 0
button 165 50 4005 4006 1 0 1
[dialog d_pzv_cash text]
<eval (<findlayer(29).more1> - 40000)>
[dialog d_pzv_cash button]
On=1
if (<eval <argtxt[1]>> <= 0)
sayu Hmm.. Sanirim tam anlayamadim?
elseif (<eval <argtxt[1]>> > <eval <findlayer(29).more1>>)
sayu Bu miktar kasamda bulunmuyor.
elseif (<eval (<findlayer(29).more1> - <argtxt[1]>)> < 40000)
sayu Bu miktari veremeyecegim, kasamda en az 40000 altin kalmali.
elseif (<eval <argtxt[1]>> >= 65000)
vend_collect <eval <argtxt[1]>>
sayu <argtxt[1]> altin bankaniza aktarildi.
else
findlayer(29).more1 <eval (<findlayer(29).more1> - <argtxt[1]>)>
src.newitem i_gold
src.act.amount <eval <argtxt[1]>>
src.act.cont <src.findlayer(29).uid>
sayu <argtxt[1]> altin bankaniza aktarildi.
endif
[dialog d_pzv_buy]
300,300
resizepic 0 0 5054 270 105
htmlgump 10 15 250 60 0 1 0
button 200 80 1153 1155 1 0 1
button 233 80 1150 1152 1 0 0
[dialog d_pzv_buy text]
<name>, fiyati: <price> altin. Bunu satin almak istediginize emin misiniz?
[dialog d_pzv_buy button]
On=1
if (strmatch('<price>',''))
src.sysmessage @55 Bu esya satilik degil.
elseif (<price> <= 0)
src.sysmessage @55 Bu esya satilik degil.
elseif (<src.gp> >= <price>)
src.gpconsume <price>
topobj.findlayer(29).more1 (<topobj.findlayer(29).more1> + <price>)
cont <src.findlayer(21).uid>
price
update
if ((<baseid> == i_spellbook) || (<baseid> == i_runebook) || (<baseid> == i_magic_reg30) || (<baseid> == i_magic_reg60) || (<baseid> == i_magic_reg90) || (<baseid> == i_necro_reg20) || (<baseid> == i_necro_reg40) || (<baseid> == i_taxi_kit) || (<baseid> == i_dye_tub_furny) || (<dispid> == i_deed))
attr <attr>|attr_newbie
endif
else
topobj.sayu Bankanizin en ust kisminda bunu alacak kadar altininiz yok.
endif
[dialog d_pzv_dismiss]
300,300
resizepic 0 0 5054 270 105
htmlgump 10 15 250 60 0 1 0
button 200 80 1153 1155 1 0 1
button 233 80 1150 1152 1 0 0
[dialog d_pzv_dismiss text]
DIKKAT! Tezgahtarinizda <findlayer(21).rescount> adet esya ve <eval <findlayer(29).more1>> altin bulunuyor, isten atmak istediginize emin misiniz?
[dialog d_pzv_dismiss button]
On=1
if (<findid.i_pzv_rem.timer> < 0)
if (<findid.i_pzv_rem.more2> == 1)
sayu Sizinle calismak guzeldi.
tag.vendor_ayrildi 1
bow
findid.i_pzv_rem.timer 3
src.act.tag.vendor <tag.owner>
src.act.equip
src.tag.upgrade_vendor
src.tag.vendor
elseif (<findid.i_pzv_rem.more2> == 2)
sayu Nasil isterseniz.
salute
src.act.tag.vendor <tag.owner>
src.act.equip
src.tag.upgrade_vendor
src.tag.vendor
findid.i_pzv_rem.timer 3
endif
endif
// ******
// SPEECH
// ******
[speech pzv_spch]
On=*Seventy*
sayu Tanri Seventy'i korusun.
salute
return 1
On=*slm*
sayu Selamlar. Tanri Seventy'i korusun.
salute
return 1
On=*fiyat*
if (<src.account.tag.vendor> == <uid>)
if (strmatch('<args>','fiyat ?'))
sayu Cantama yerlestirdiginiz esyalari fiyatlandirmakta kullanacaginiz komuttur. Kullanilisi, X'in yerine bir sayi gelecek bicimde 'Fiyat X' seklindedir.
sayu Satilamaz ibareli esyalari asla fiyatlandiramazsiniz. Satilik haldeki bir esyayi 'satilik degil' hale getirmek icin 0 fiyat vermeniz gereklidir.
else
if !(<findlayer(21).findcont(0)>)
sayu Cantamda fiyatlandirilacak mal bulunmuyor.
else
try <args>
endif
endif
endif
return 1
On=buy
On=satin al
if (0<src.account.tag.vendor> == <uid>)
sayu Isverenim oldugunuz icin istediginizi alabilirsiniz, para vermenize gerek yok.
elseif !(<findlayer(21).findcont(0)>)
sayu Su an satilik malim yok uzgunum.
else
findid.i_pzv.more1 2
findid.i_pzv.target
endif
return 1
On=*
return 1
// *****
// EVENT
// *****
[events e_pzv]
On=@GetHit
if !(<src.npc>)
src.newitem i_killer
src.act.equip
else
src.leave 20
endif
return 1
On=@Hit
return 1
On=@HitTry
return 1
On=@Death
hits <str>
return 1
On=@SpellEffect
if (<src.npc>)
src.leave 20
endif
return 1
On=@ItemEquip
if ((<act.layer> == 1) || (<act.layer> == 2))
findid.i_torch.equip
findid.i_torch.dclick
return 1
endif
On=@Click
if !(strmatch('<eval 0<tag.px>>','<eval <p.x>>')) || !(strmatch('<eval 0<tag.py>>','<eval <p.y>>')) || !(strmatch('<eval 0<tag.pz>>','<eval <p.z>>'))
p <tag.p>
update
return 1
endif
//message * <memoryfindtype.memory_ipet.link.name> *
return 1
On=@DClick
if !(strmatch('<eval 0<tag.px>>','<eval <p.x>>')) || !(strmatch('<eval 0<tag.py>>','<eval <p.y>>')) || !(strmatch('<eval 0<tag.pz>>','<eval <p.z>>'))
p <tag.p>
update
return 1
endif
//if (<uid> == <src.account.tag.vendor>)
// src.tag.vendor <uid>
//endif
if (<src.flags>&statf_dead)
src.sysmessage @33 Su anki durumuzda bu islemi gerceklestiremezsiniz.
elseif (<src.isgm>)
pack
elseif ((<canseelos>) && (<distance> < 4))
face
if (0<src.account.tag.vendor> == <uid>)
if (0<src.memoryfindtype.memory_gumprecord>)
return 1
elseif (0<tag.vendor_ayrildi> == 1)
src.sysmessage @55 Vendorunuz isi birakmis!
return 1
endif
//if !(<memoryfindtype.memory_ipet>)
memorydel <src.uid>
newitem i_memory
act.attr 04
act.more1 04
act.more2 <serv.time>
act.morep <p> //link.p to p
act.color memory_ipet
act.timer -1
act.link <src.uid>
act.cont <uid>
flags <flags>&statf_pet
//endif
dialog d_vendor_islem
elseif !(<findlayer(21).findcont(0)>)
sayu Su an satilik malim yok, lutfen daha sonra tekrar geliniz.
else
pack
endif
else
src.sysmessage @33 Vendor'a ulasamiyorsunuz.
endif
return 1
On=@EnvironChange
if (<flags>&statf_war)
flags <flags>&~statf_war
update
endif
food 990
p <tag.p>
tag.p <p>
tag.px <p.x>
tag.py <p.y>
tag.pz <p.z>
if (<eval <findlayer(29).more1>> < 1)
if (<findid.i_pzv_rem.timer> < 0)
if (<findid.i_pzv_rem.more1>)
sayu Bedavaya calisacak degilim.
salute
findid.i_pzv_rem.timer 3
serv.account <cont.tag.owner> tag.vendor
memoryfindtype.memory_ipet.link.sysmessage @55 Vendorunuz maas alamadigi icin istifa etti.
else
findid.i_pzv_rem.more1 1
go <tag.p>
endif
endif
endif
// *********************
// ALTINSAL FONKSIYONLAR
// *********************
[function fiyat]
if (<eval <argn>> > 1000000)
sayu Tek bir mali 1 milyon altinin uzerinde fiyatla satmam yasalara aykiridir.
else
findid.i_pzv.more1 1
findid.i_pzv.more2 <eval <argn>>
findid.i_pzv.target
endif
[function vend_collect]
var.vendorcash <eval (<argn> - 65000)>
findlayer(29).more1 <eval (<findlayer(29).more1> - 65000)>
src.newitem i_gold
src.act.amount 65000
src.act.cont <src.findlayer(29).uid>
if (<eval <var.vendorcash>> >= 65000)
vend_collect <eval <var.vendorcash>>
elseif (<eval <var.vendorcash>> > 0)
findlayer(29).more1 <eval (<findlayer(29).more1> - <var.vendorcash>)>
src.newitem i_gold
src.act.amount <eval <var.vendorcash>>
src.act.cont <src.findlayer(29).uid>
var.vendorcash
else
var.vendorcash
endif
[function packo] // (special thx to laroux below this line)
try src.tag.<uid> <rescount>
packo_loop <args>
[function packo_loop]
if (<eval <src.tag.<uid>>> > 0)
try src.tag.<uid> <eval (<src.tag.<uid>> - 1)>
//if (strmatch('<findcont.<eval <src.tag.<uid>>>.type>','t_container'))
// try findcont.<eval <src.tag.<uid>>>.packo <args>
//else
try findcont.<eval <src.tag.<uid>>>.<args>
//endif
packo_loop <args>
else
try src.tag.<uid>
endif
[function gp]
var.gp 0
//findlayer(21).packo gp_ctrl
findlayer(29).packo gp_ctrl
return <eval <var.gp>>
[function gp_ctrl]
if (strmatch('<baseid>','i_gold'))
var.gp <eval (<var.gp> + <amount>)>
endif
[function gpconsume]
var.gp <argn>
//findlayer(21).packo gpconsume_ctrl <argn>
findlayer(29).packo gpconsume_ctrl <argn>
return 1
[function gpconsume_ctrl]
if ((<var.gp> > 0) && (strmatch('<baseid>','i_gold')))
if (<amount> > <eval (<var.gp>)>)
amount <eval (<amount> - <var.gp>)>
var.gp 0
else
var.gp <eval (<var.gp> - <amount>)>
remove
endif
endif
[function evl]
sysmessage @55 Evaluating [0<args>]: <eval 0<args>>.
return <valstr 0<args>>
[dialog d_vendor_islem]//creat by galentos
0,0
//noclose
//nomove //simdilik gerek yok
resizepic 250 175 2620 300 300 //arka plan
resizepic 265 225 3000 271 240 //html arka plani
resizepic 275 250 3000 250 188 //button cevre
//resizepic 480 275 2620 80 30
//textentry 485 280 65 25 270 1 7 //miktar seysi
htmlgump 345 262 50 30 1 0 0
htmlgump 345 332 50 30 2 0 0
htmlgump 345 402 50 30 3 0 0
htmlgump 465 262 50 30 4 0 0
htmlgump 465 332 55 30 5 0 0
htmlgump 465 402 60 30 6 0 0
text 280 195 090 0
button 305 260 4005 4007 1 0 1
button 305 330 4005 4007 1 0 2
button 305 400 4005 4007 1 0 3
button 425 260 4005 4007 1 0 4
button 425 330 4005 4007 1 0 5
button 425 400 1150 1151 1 0 6
button 275 260 4030 4031 1 0 7
button 275 330 4030 4031 1 0 8
button 275 400 4030 4031 1 0 9
button 395 260 4030 4031 1 0 10
button 395 330 4030 4031 1 0 11
//button 445 400 4030 4031 1 0 12
[dialog d_vendor_islem text]
-= Seventy Vendor Islemleri =-
Durum
Kasa
Hasilat
Fiyat
Alis-Veris
Isten AT!
//<tag.bosluk>
[dialog d_vendor_islem button]
on=7
src.sysmessage @55 Vendor kasasindaki para miktarini ve vendorun calisacagi gun sayisini gosterir.
dialog d_vendor_islem
on=1
src.sysmessage @68 Vendor kasasindaki <eval <findlayer(29).more1>> altin ile <eval (<findlayer(29).more1> / (<hiredaywage> * 24))> gun daha sizin icin calisacak.
dialog d_vendor_islem
on=8
src.sysmessage @55 Satis olmamasi ve vendor kasasindaki paranin azalmasi durumunda kasaya yaninizda getireceginiz altini eklemek icin kullanabilirsiniz.
dialog d_vendor_islem
on=2
findid.i_pzv.more1 3
findid.i_pzv.target
src.sysmessage @68 Vendorun kasasina yatirmak istediginiz parayi seciniz.
on=9
src.sysmessage @55 Vendor kasasindaki parayi banka hesabiniza aktarmak icin kullanacaksiniz. Vendor kasasindaki son 40000 altini aktarmaniz mumkun degildir.
dialog d_vendor_islem
on=3
if (<eval <findlayer(29).more1>> < 40001)
sayu Kasamda 40000 veya daha az altin var, su durumda size nakit veremem.
else
dialog d_pzv_cash
endif
on=10
src.sysmessage @55 Kutuya fiyati yazarak kullanabileceginiz gibi; ornegin "fiyat 100" yazarak fiyati 100gp olarak belirleyebilirsiniz.
dialog d_vendor_islem
on=4
if !(<findlayer(21).findcont(0)>)
sayu Cantamda fiyatlandirilacak mal bulunmuyor.
else
src.sysmessage @68 "fiyat 100" yazarak fiyati 100gp olarak belirleyebilirsiniz.
endif
return 1
on=11
src.sysmessage @55 Vendorunuzun cantasina ulasabilirsiniz.
dialog d_vendor_islem
on=5
if !((<canseelos>) && (<distance> < 4))
face
else
pack
endif
on=6
if ((<src.account.tag.vendor> == <uid>) || (<src.isgm>))
if (<findid.i_pzv_rem.timer> < 0)
findid.i_pzv_rem.more2 1
dialog d_pzv_dismiss
endif
endif
return 1
[eof]