UO-Dev Arama

 



İçerde : 1 misafir, 0 üye : --- Sayfalar: 1
Yazar

Syrinks


Yasaklı
Skill Title: Apprentice
Online durumu
Toplam Mesaj: 65
Oyun Tarzı: Pvp
Emulatör: 0.56b
Tecrübe: Hosting
Yaş: 25
Mesaj #92164   15-06-2017 23:04 GMT    
        
Kod:
[itemdef i_vendor_Stone]
name Vendor Kirala
id i_grave_Stone
weight 5000
type t_eq_Script

on=@click
message vendor kiralama tasi
return 1

on=@pickup_ground
return 1

on=@timer
return 1

on=@dclick
if (<more1> = 0)
if (0<src.tag.vendor>)
src.sysmessage @55 Zaten bir vendora sahipsiniz.
else
dialog d_kira
endif
else
src.sysmessage @55 Bir hata olusmus olabilir. Lutfen yetkililere iletiniz.
endif
return 1

[dialog d_vendor_hasilat]
300,300

resizepic 0 0 5120 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_vendor_hasilat text]
<eval (<findlayer(29).more1> - 2500)>

[dialog d_vendor_hasilat button]
On=1
if (<eval <argtxt[1]>> <= 0)
src.sysmessage Bir miktar belirleyin..
elseif (<eval <argtxt[1]>> > <eval <findlayer(29).more1>>)
src.sysmessage Bu miktar kasada bulunmuyor.
elseif (<eval (<findlayer(29).more1> - <argtxt[1]>)> < 2500)
src.sysmessage Bu miktari alamazsiniz, en az 2500 altin kalmali.
elseif (<eval <argtxt[1]>> >= 65000)
vend_collect <eval <argtxt[1]>>
src.sysmessage <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>
src.sysmessage <argtxt[1]> altin bankaniza aktarildi.
endif
src.fix

[dialog d_vendor_buy]
300,300

resizepic 0 0 5120 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_vendor_buy text]
<name>, fiyati: <eval <tag.price>> altin. Bunu satin almak istediginize emin misiniz?

[dialog d_vendor_buy button]
On=1
src.pay <eval <tag.price>>
if (<var.enough>)
if !(<src.targ.topobj.uid> = <src.tag.pvendor_fix>)
src.sysmessage @55 Bu esya vendorun cantasinda degil yada satilmis.
return 1
else
topobj.findlayer(29).more1 (<topobj.findlayer(29).more1> + <eval <tag.price>>)
src.targ.cont <src.findlayer(21).uid>
src.targ.tag.price
src.targ.update
endif
if ((<src.targ.baseid> == i_spellbook) || (<src.targ.baseid> == i_runebook) || (<src.targ.baseid> == i_regs_lesser) || (<src.targ.baseid> == i_regs_normal) || (<src.targ.baseid> == i_regs_greater) || (<src.targ.baseid> == i_dye_fur) || (<src.targ.baseid> == i_alet_cantasi) || (<src.targ.dispid> == i_deed))
attr <attr>|attr_newbie
endif
endif

[dialog d_kira_uzat]
300,300

resizepic 0 0 3500 200 75
dhtmlgump 50 20 100 20 0 0 1 hafta uzat (250k)
dhtmlgump 50 40 100 20 0 0 iptal
button 20 20 56 55 1 0 1
button 20 40 56 55 1 0 2

[dialog d_kira_uzat text]

[dialog d_kira_uzat button]
on=1
src.pay 250000
if (<var.enough>)
timer <eval <timer> + 604800> //1 hafta uzat
cont.say Sizinle calisma sureme 7 gun eklendi. Tesekkur ederim.
endif

[dialog d_kira]
300,300

resizepic 0 0 3500 200 75
dhtmlgump 50 20 150 20 0 0 2 hafta kirala (700k)
dhtmlgump 50 40 100 20 0 0 iptal
button 20 20 56 55 1 0 1
button 20 40 56 55 1 0 2

[dialog d_kira text]

[dialog d_kira button]
on=1
src.pay 700000
if (<var.enough>)
src.newnpc c_player_vendor
src.act.p <p>
src.act.tag.sahip <src.uid>
src.act.findlayer(29).more1 2500
src.act.memorydel <src.uid>
src.tag.vendor <src.act.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
src.sysmessage Vendorunuz kuruldu, komutlar icin '<src.act.name> bilgi' yaziniz.
remove
endif

[chardef c_player_vendor]
defname c_player_vendor
name #names_humanmale the Player Vendor
id c_man
can mt_equip|mt_nonmover
hiredaywage 52
desires i_gold

tspeech player_vendor

On=@Create
events +e_player_vendor
str 9500
dex 25
int 25
color colors_skin
speechcolor 0481
food 990
npc 1

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 014
itemnewbie i_player_vendor

On=@Spelleffect
return 1

On=@Gethit
return 1

On=@Death
hits <str>
return 1

[speech player_vendor]
on=*bilgi*
on=*help*
on=*yard*
if (<src.uid> == <tag.sahip>)
say Kullanabileceginiz komutlar; durum, fiyat, hasilat, kira
endif
return 1

on=*durum*
if (<src.uid> == <tag.sahip>)
findid.i_player_vendor.morex (<findid.i_player_vendor.timer> / 60) //dakika
findid.i_player_vendor.morey (<findid.i_player_vendor.morex> / 60) //saat
findid.i_player_vendor.morez (<findid.i_player_vendor.morey> / 24) //gün

if (<findid.i_player_vendor.morez> < 1)
if (<findid.i_player_vendor.morey> < 1)
say Sizinle <findid.i_player_vendor.morex> dakika daha calisabilirim
else
say Sizinle <findid.i_player_vendor.morey> saat daha calisabilirim
endif
else
say Sizinle <findid.i_player_vendor.morez> gun daha calisabilirim
endif
endif
return 1

on=fiyat *
if (<src.uid> == <tag.sahip>)
if !(<findlayer(21).findcont(0)>)
src.sysmessage Vendorun cantasinda fiyatlandirilacak mal bulunmuyor.
else
try <args>
endif
endif
return 1

on=hasila*
if (<src.uid> == <tag.sahip>)
if (<eval <findlayer(29).more1>> < 1)
say Suan size verecek hic param yok
else
dialog d_vendor_hasilat
endif
endif
return 1

on=*kira*
if (<src.uid> == <tag.sahip>)
findid.i_player_vendor.morex (<findid.i_player_vendor.timer> / 60) //dakika
findid.i_player_vendor.morey (<findid.i_player_vendor.morex> / 60) //saat
findid.i_player_vendor.morez (<findid.i_player_vendor.morey> / 24) //gün
if (<findid.i_player_vendor.morez> > 2)
say Kirayi uzatmak icin son 2 calisma gunumu beklemelisiniz. Sizinle daha <findid.i_player_vendor.morez> gun calisabilirim
else
findid.i_player_vendor.dialog d_kira_uzat
endif
endif
return 1

on=*buy*
if (<src.uid> == <tag.sahip>)
say Siz benim isverenim oldugunuz icin ucretsiz alabilirsiniz.
elseif !(<findlayer(21).findcont(0)>)
src.sysmessage @55 Vendorda su an satilik mal yok.
else
findid.i_player_vendor.more1 2
findid.i_player_vendor.target
endif
return 1

on=*
say
return 1

[function fiyat]
if (<eval <argn>> > 5000000)
src.sysmessage @55 Tek bir mali 5 milyon altinin uzerinde fiyatla satilamaz.
else
findid.i_player_vendor.more1 1
findid.i_player_vendor.more2 <eval <argn>>
findid.i_player_vendor.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

[itemdef i_player_vendor]
id i_memory
name player vendor kontrol
type t_eq_script

on=@create
timer 60*60*24*14

on=@timer
cont.newitem i_vendor_Stone
cont.act.p <cont.p>
cont.findlayer(21).color 033
cont.findlayer(21).attr 00
cont.findlayer(21).cont <uid.<cont.tag.sahip>.findlayer(29).uid>
try uid.<cont.tag.sahip>.tag.vendor
cont.remove
return 1

on=@targon_item
if (<more1> == 1) //fiyat belirmele
if !(<src.uid> == <cont.tag.sahip>)
src.sysmessage @55 Siz bu vendorun isvereni degilsiniz.
elseif !(<src.targ.topobj.uid> == <cont.uid>)
src.sysmessage @55 Bu esya vendorun cantasinda degil.
elseif (<eval <more2>> <= 0)
src.targ.tag.price 0
src.sysmessage @55 <src.targ.name>: 'satilik degil' olarak isaretlendi.
else
src.targ.tag.price <eval <more2>>
more2 0
src.sysmessage @55 <src.targ.name>: <eval <src.targ.tag.price>> altin.
endif
elseif (<more1> == 2) //buy
src.pay <eval <src.targ.tag.price>>
if (<var.enough>)
if !(<src.targ.topobj.uid> == <cont.uid>)
src.sysmessage @55 Bu esya vendorun cantasinda degil.
elseif (strmatch('<src.targ.tag.price>',''))
src.sysmessage @55 Bu esya satilik degil.
elseif (<src.targ.tag.price> <= 0)
src.sysmessage @55 Bu esya satilik degil.
else
src.targ.dialog d_vendor_buy
src.tag.pvendor_fix <cont.uid>
endif
endif
endif
return 1

[events e_player_vendor]
On=@Click
message * <memoryfindtype.memory_ipet.link.name> *
return 1

On=@DClick
if !(<memoryfindtype.memory_ipet>)
memorydel <src.uid>
newitem i_memory
act.attr 04
act.more1 04
act.more2 <serv.time>
act.morep <link.p>
act.color memory_ipet
act.timer -1
act.link <tag.sahip>
act.cont <uid>
flags <flags>&statf_pet
endif

if (<src.uid> == <tag.sahip>)
src.tag.vendor <uid>
endif

if (<src.isgm>)
pack
elseif (<src.flags>&statf_dead)
src.sysmessage @55 Su anki durumuzda bu islemi gerceklestiremezsiniz.
elseif ((<canseelos>) && (<distance> < 4))
if (<src.uid> == <tag.sahip>)
say Satilacak esyalari buraya koyabilirsiniz.
pack
elseif !(<findlayer(21).findcont(0)>)
say Su an satilik mal yok.
else
pack
endif
else
src.sysmessage @55 Vendor'a ulasamiyorsunuz.
endif
src.events +e_vendor_player
return 1

On=@EnvironChange
if (<flags>&statf_war)
flags <flags>&~statf_war
update
endif
food 990

[events e_vendor_player]
on=@Spellcast
if (<act.id> == c_player_vendor) || (<act.topobj.id> == c_player_vendor))
skill fail
return 1
endif

On=@Attack
If (<src.id> == c_player_vendor)
return 1
endif

On=@SkillStart
if ((<action> == id(skill_herding)) || (<action> == skill_herding))
if (<targ.id> == c_player_vendor)
skill fail
return 1
endif
elseif ((<action> == id(skill_stealing)) || (<action> == skill_stealing))
if (<targ.topobj.id> == c_player_vendor)
src.sysmessage @55 Player vendorlardan herhangi birsey calamazsiniz.
skill fail
return 1
endif

On=@ItemDClick
if (<targ.topobj.id> == c_player_vendor)
if (<targ.type> == t_container)
targ.open
endif
return 1
endif

On=@ItemClick
if (<act.topobj.id> == c_player_vendor)
if (0<act.tag.price> < 1)
act.message @33 [satilik degil]
else
if ((<act.type> == t_armor) || (<act.type> == t_armor_leather) || (<act.type> == t_shield) || (<act.type> == t_clothing) || (<act.type> == t_weapon_sword) || (<act.type> == t_weapon_fence) || (<act.type> == t_weapon_mace_staff) || (<act.type> == t_weapon_mace_smith) || (<act.type> == t_weapon_mace_pick) || (<act.type> == t_weapon_bow) || (<act.type> == t_weapon_xbow))
if !(<eval ((<act.more1l> * 100) / <act.more1h>)> == 100)
act.message @55 [<eval <act.tag.price>> gp] [%<eval (100 - ((<act.more1l> * 100) / <act.more1h>))> eski]
else
act.message @55 [<eval <act.tag.price>> gp] [yeni]
endif
else
act.message @55 [<eval <act.tag.price>> gp]
endif
endif
endif

On=@ItemPickUp_Pack
if (<act.topobj.id> == c_player_vendor)
if !(<uid> == <act.topobj.tag.sahip>)
return 1
endif
endif

On=@ItemTargOn_Item
if ((<targ.topobj.id> == c_player_vendor) && (<act.cont.uid> != <targ.topobj.uid>))
return 1
endif

[function pay]
if !(<args>) //empty command line?
var.enough=1
return 1 //then do nothing
endif
if (<src.isgm>)
if (<src.account.plevel> < 7)
src.sysmessage @55 Yetkililer bu islemi gercekletiremez.
var.enough=0
return 1
else
src.sysmessage @55 Gmden parami :)
var.enough=1
return 1
endif
endif
var.enough=0 //if not enough gold, var.enough will be '0'
var.totalgold=<findlayer.21.rescount i_gold> + <bankbalance>
if (<eval <args>> > <var.totalgold>) //the amount to pay is more then you own??
src.sysmessage @55 Bankanizda <eval <args>> gp yok.//refuse transaction
else //you have enough to pay
var.enough=1 //allow you to check transaction later
if (<argn> > <src.findlayer.21.rescount i_gold>)
goldtopack <eval <argn>-<src.findlayer.21.rescount i_gold>> //put the needed money in the backpack
endif
payamount <args> //pay the needed amount
endif

[function goldtopack] //move enough gold so that we can pay
//argn- amount of gold left to move
var.found=(<argn> - <src.findlayer.29.findid.i_gold.amount>) //amount found
if (<var.found> > 0) //pile is not big enough, so move it all
src.findlayer.29.findid.i_gold.cont=<src.findlayer.21.uid> // transfer to backpack
goldtopack <var.found> //get the next pile of gold
else //not entire pile needed
var.left=(0 - <var.found>) // get the amount of money left in this pile
if (<var.left>)
src.findlayer.29.findid.i_gold.amount <var.left> //set this amount
else
src.findlayer.29.findid.i_gold.remove
endif
src.newitem i_gold //create a new pile of gold
src.act.amount <args> //the needed amount
src.act.cont=<src.findlayer.21.uid> //place in backpack
endif //done

[function payamount]
var.counter=<eval <args>> //amount left to pay
if (<var.counter> > 65000) // more then 65000 left to pay??
src.consume 65000 i_gold //consume 65000 first
var.counter=(<var.counter> - 65000)
payamount <var.counter> //then get the rest
else
src.consume <args> i_gold //consume the rest of the needed amount
endif // we are finished

[EOF]


Player vendor için şu kodu kullanıyorum ancak buy dediğimizde direkt para düşüyor üstüne açılan diyalogta bir daha evet dediğinizde bir daha düşüyor yani iki defa para düşüyor neden?



Yazar

halisakts


UO-Dev Üyesi
Skill Title: Novice
Online durumu
Toplam Mesaj: 46
Oyun Tarzı: Pvp
Emulatör: 0.56b
Tecrübe: Scripter
Yaş: 24
Mesaj #92169   16-06-2017 14:02 GMT    
        
Scriptlerin içerisinde başka bi player vendor bulunuyor olabilir öleyse çakışma yapar


Skype:halisakts

Falcona is walking towards the moon

Sayfalar: 1



Benzer Konular

KonularMesajlarSon gönderenTarih
Vendor hatası3gareth09-08-2018
Vendor restock ayarlama2Daedhelon29-07-2018
Sphere Connecting Sorunu4Alp03-05-2018
Koordinat Bulma Sorunu4MirroR20-04-2018
İki Scriptin Çakışma Sorunu104s3d319-04-2018


Keywords:

ultima online, RunUO, ultima online download, sphere scripting, role play, uo grafik, second age ultima, uo loop, macroman, pvp server, server kurulumu, sphere, multool, ml mulls, 56b 55r 55i, htmlgumps, client 4x, client edit, sphere release, osi, rp server, sunucular, ghost mouse, inside uo, kingdom reborn, stygian abyss, uo nasıl oynanır, mondain's legacy, age of shadows, world build, grandmaster, ultima online pvp, player dosyaları, ultima online indir, frp game, RunUO 1.0.0, razor, uo rice, hue editör, skill tools, ultima online patch, axis, world build, verdata, verdata patcher, map editör, gump editör, mul patcher, aos mulls, scriptler, anim edit, anim publish, hues mul, hosting vps, event dialog, account sistemi, skill gain, static yapımı,