//Yazan: Jeem
//[Güncelleme 8 Ağustos 2009]
//[Güncelleyen = Static]
//[Yazım hataları düzeltildi, yanlış karakter kullanımları düzeltildi, işlevsiz özellikler kaldırıldı]
[DEFNAME AuctionSettings]
// Satılmasını istemediğiniz eşyaların baseid'lerini buraya aralarında virgül koyarak girebilirsiniz.
AUCTION_DeniedItems "i_gold, i_key_copper"
// Blessed eşyaların satılıp satılamayacağı (1/0)
AUCTION_AllowBlessed "0"
// Acik artirmanin suresi (x gün)
AUCTION_Length "3"
// Dialog arka planları
AUCTION_BackGround "5054"
// Dialog'larda alpha black. 3.0.8'den düşük bir client kullanıyorsanız kapalı tutun. (1/0)
AUCTION_AlphaBlack "1"
[DEFNAME def_auction_types]
AUCTION_TYPE_0 "t_weapon_mace_smith, t_weapon_mace_sharp, t_weapon_sword, t_weapon_fence, t_weapon_bow, t_weapon_mace_crook, t_weapon_mace_pick, t_weapon_axe, t_weapon_xbow"
AUCTION_TYPE_1 "t_armor, t_armor_leather"
AUCTION_TYPE_2 "t_potion, t_potion_empty"
AUCTION_TYPE_3 "t_reagent"
AUCTION_TYPE_4 "t_clothing, t_cloth"
AUCTION_TYPE_5 "t_figurine"
AUCTION_TYPE_6 "t_scroll, t_scroll_blank"
AUCTION_TYPE_7 "t_log, t_board"
AUCTION_TYPE_8 "t_ingot"
AUCTION_TYPE_9 "t_container"
[ITEMDEF i_auction_board]
ID=i_bulletin_board
NAME=auction board
TYPE=t_container
TDATA2=044
ON=@DClick
IF !<ISEMPTY <SRC.CTAG.Auction_Categorize>>
ARGS=<SRC.CTAG.Auction_Categorize>
ENDIF
FOR 0 <EVAL (<COUNT> - 1)>
IF <ARGV>
FOR _FOR2 0 <EVAL (<ARGV> - 1)>
IF (<FINDCONT(<dLOCAL._FOR>).TYPE> == <ARGV[<dLOCAL._FOR2>]>) || (<FINDCONT(<dLOCAL._FOR>).BASEID> == <ARGV[<dLOCAL._FOR2>]>)
SRC.CTAG.Auction_Item<dLOCAL.ORDER> = <FINDCONT(<dLOCAL._FOR>).UID>
LOCAL.ORDER ++
ENDIF
ENDFOR
ELSEIF <SRC.CTAG0.Auction_SearchForOwner>
IF <SRC.CTAG.Auction_SearchForOwner> == <FINDCONT(<dLOCAL._FOR>).TAG0.Auction_Seller>
SRC.CTAG.Auction_Item<dLOCAL.ORDER> = <FINDCONT(<dLOCAL._FOR>).UID>
LOCAL.ORDER ++
ENDIF
ELSEIF <SRC.CTAG0.Auction_ShowUid>
IF <FINDCONT(<dLOCAL._FOR>).CheckForOffers <SRC.CTAG0.Auction_ShowUid>>
SRC.CTAG.Auction_Item<dLOCAL.ORDER> = <FINDCONT(<dLOCAL._FOR>).UID>
LOCAL.ORDER ++
ENDIF
ELSE
SRC.CTAG.Auction_Item<dLOCAL.ORDER> = <FINDCONT(<dLOCAL._FOR>).UID>
LOCAL.ORDER ++
ENDIF
ENDFOR
SDIALOG d_auction
RETURN 1
ON=@DropOn_Self
RETURN 1
ON=@Destroy
FORCONT <UID> 0
CONT=<UID.<TAG0.Auction_Seller>.FINDLAYER(layer_bankbox).UID>
CLEARTAGS Auction
TIMERF Clear
ENDFOR
[FUNCTION CheckForOffers]
IF !<TAG0.Auction_TotalOffers>
RETURN 0
ENDIF
FOR <TAG0.Auction_TotalOffers>
IF <TAG0.Auction_Offer<dLOCAL._FOR>By> == <ARGS>
RETURN 1
ENDIF
ENDFOR
RETURN 0
[FUNCTION AddBG]
resizepic <ARGV[0]> <ARGV[1]> 5054 <ARGV[2]> <ARGV[3]>
[FUNCTION AlphaBlack]
gumppictiled <ARGV[0]> <ARGV[1]> <ARGV[2]> <ARGV[3]> 2624
checkertrans <ARGV[0]> <ARGV[1]> <ARGV[2]> <ARGV[3]>
[FUNCTION BolukAyir]
IF (<EVAL STRLEN(<ARGS>)> > 3)
LOCAL.STRLEN=<EVAL STRLEN(<ARGS>)>
LOCAL.CURRENTDIGIT=<EVAL STRLEN(<ARGS>)>
WHILE (<LOCAL.CURRENTDIGIT> > 3)
ARGS=<STRSUB 0 <EVAL (<LOCAL.CURRENTDIGIT> - 3)> <ARGS>>.<STRSUB <EVAL (<LOCAL.CURRENTDIGIT> - 3)> 50 <ARGS>>
LOCAL.CURRENTDIGIT -= 3
ENDWHILE
ENDIF
RETURN <ARGS>
[DIALOG d_auction]
50,50
resizepic 0 0 <DEF.AUCTION_BackGround> 650 550
IF (<DEF.AUCTION_AlphaBlack>)
AlphaBlack 10,10,630,420
ELSE
resizepic 10 10 3000 630 420
ENDIF
dtext 55 20 1153 Isim
dtext 240 20 1153 Satici
dtext 380 20 1153 Son Teklif
dtext 480 20 1153 Son Teklifin Sahibi
LOCAL.Y=50
FOR <SRC.CTAG0.Auction_PG_List> <EVAL (<SRC.CTAG0.Auction_PG_List> + 16)>
REF1=<SRC.CTAG0.Auction_Item<dLOCAL._FOR>>
IF <REF1>
button 20 <dLOCAL.Y> 4005 4006 1 0 <EVAL (<LOCAL._FOR> + 1)>
dcroppedtext 55 <dLOCAL.Y> 175 20 1153 <QVAL (<REF1.AMOUNT> == 1) ? <REF1.NAME>:<REF1.AMOUNT> <REF1.NAME>>
dcroppedtext 240 <dLOCAL.Y> 130 20 1153 <UID.<REF1.TAG0.Auction_Seller>.NAME>
dtext 380 <dLOCAL.Y> 1153 <BolukAyir <dREF1.TAG0.Auction_Offer<dREF1.TAG0.Auction_TotalOffers>>>
dcroppedtext 480 <dLOCAL.Y> 150 20 <QVAL (<REF1.TAG0.Auction_TotalOffers>) ? 1153 <UID.<REF1.TAG0.Auction_Offer<dREF1.TAG0.Auction_TotalOffers>By>.NAME>:38 yok>
LOCAL.Y += 20
ENDIF
ENDFOR
IF (<DEF.AUCTION_AlphaBlack>)
AlphaBlack 10,440,630,100
ELSE
resizepic 10 440 3000 630 100
ENDIF
IF (<HVAL <SRC.CTAG0.Auction_PG_List> - 17> >= 0)
button 595 410 5603 5607 1 0 50003
ELSE
gumppic 595 410 9706 38
ENDIF
IF (<COUNT> > <HVAL <SRC.CTAG0.Auction_PG_List> + 17>)
button 612 410 5601 5605 1 0 50004
ELSE
gumppic 612 410 9702 38
ENDIF
button 20 450 4005 4006 1 0 50000
dtext 55 452 1153 Acik artirmaya esya ekle
button 220 450 4005 4006 1 0 50001
dtext 255 452 1153 Bana ait eşyaları göster
button 420 450 4005 4006 1 0 50005
dtext 455 452 1153 Teklif yaptıklarımı göster
button 20 480 4005 4006 1 0 50002
dtext 55 482 1153 Kategoriler:
checkbox 140 482 210 211 <SRC.F_Check_Categorization weapon> 0
dtext 162 482 1153 Silahlar
checkbox 215 482 210 211 <SRC.F_Check_Categorization armor> 1
dtext 237 482 1153 Zirhlar
checkbox 290 482 210 211 <SRC.F_Check_Categorization potion> 2
dtext 312 482 1153 İksirler
checkbox 365 482 210 211 <SRC.F_Check_Categorization reagent> 3
dtext 387 482 1153 Reagent
checkbox 440 482 210 211 <SRC.F_Check_Categorization cloth> 4
dtext 462 482 1153 Kıyafet
checkbox 515 482 210 211 <SRC.F_Check_Categorization figurine> 5
dtext 537 482 1153 Binek
checkbox 140 512 210 211 <SRC.F_Check_Categorization scroll> 6
dtext 162 512 1153 Scroll
checkbox 215 512 210 211 <SRC.F_Check_Categorization log> 7
dtext 237 512 1153 Log
checkbox 290 512 210 211 <SRC.F_Check_Categorization ingot> 8
dtext 312 512 1153 Ingot
checkbox 365 512 210 211 <SRC.F_Check_Categorization container> 9
dtext 387 512 1153 Container
[DIALOG d_auction BUTTON]
ON=0
SRC.CLEARCTAGS Auction
ON=1 49999
REF1=<SRC.CTAG0.Auction_Item<EVAL (<ARGN1> - 1)>>
REF1.SDIALOG d_auction_info
SERV.NEWDUPE <REF1>
REF2=<NEW>
SERV.NEWITEM i_crate_lg
NEW.TYPE=t_eq_script
SRC.EVENTS +e_auction_showitem
SRC.TAG.Auction_ItemShown=<NEW>
NEW.CONT=<SRC>
NEW.TYPE=t_container
REF2.CONT=<NEW>
NEW.ATTR=attr_move_never
FORCONT <NEW> 100
ATTR |= attr_move_never
ENDFOR
NEW.OPEN
SRC.CLEARCTAGS Auction
ON=50000
SRC.CLEARCTAGS Auction
SRC.TARGETF f_auction_add_item <UID>
SRC.SYSMESSAGE @,,1 Acik arttirmaya cikarmak isdediginiz esyayi seciniz.
ON=50001
SRC.CLEARCTAGS Auction
SRC.CTAG.Auction_SearchForOwner = <SRC>
SRC.DCLICK <UID>
ON=50002
SRC.CLEARCTAGS Auction
FOR 0 9
IF <ARGCHK[<dLOCAL._FOR>]>
SRC.CTAG.Auction_Categorize .= <DEF.AUCTION_TYPE_<dLOCAL._FOR>>,
ENDIF
ENDFOR
SRC.CTAG.Auction_Categorize = <STRSUB 0 <EVAL (STRLEN(<SRC.CTAG0.Auction_Categorize>) - 1)> <SRC.CTAG0.Auction_Categorize>>
IF !STRCMP(<SRC.CTAG0.Auction_Categorize>,00)
SRC.CTAG.Auction_Categorize
ENDIF
SRC.DCLICK <UID>
ON=50003
SRC.CTAG0.Auction_PG_List -= 17
SDIALOG d_auction
ON=50004
SRC.CTAG0.Auction_PG_List += 17
SDIALOG d_auction
ON=50005
SRC.CLEARCTAGS Auction
SRC.CTAG.Auction_ShowUid = <SRC>
SRC.DCLICK <UID>
[EVENTS e_auction_showitem]
ON=@ItemPickUp_Pack
SYSMESSAGE @,,1 Acik arttirmadaki bir Item goruntulenirken bunu yapamazsiniz.
RETURN 1
ON=@ItemPickUp_Ground
SYSMESSAGE @,,1 Acik arttirmadaki bir Item goruntulenirken bunu yapamazsiniz.
RETURN 1
ON=@ItemDropOn_Ground
SYSMESSAGE @,,1 Acik arttirmadaki bir Item goruntulenirken bunu yapamazsiniz.
RETURN 1
ON=@ItemDropOn_Item
SYSMESSAGE @,,1 Acik arttirmadaki bir Item goruntulenirken bunu yapamazsiniz.
RETURN 1
ON=@ItemDropOn_Char
SYSMESSAGE @,,1 Acik arttirmadaki bir Item goruntulenirken bunu yapamazsiniz.
RETURN 1
ON=@ItemEquipTest
SYSMESSAGE @,,1 Acik arttirmadaki bir Item goruntulenirken bunu yapamazsiniz.
RETURN 1
ON=@ItemDClick
IF (<ACT.TYPE> != t_container) || (<ACT.BASEID> == i_auction_board)
SYSMESSAGE @,,1 Acik arttirmadaki bir Item goruntulenirken bunu yapamazsiniz.
RETURN 1
ENDIF
ON=@Logout
UID.<TAG.Auction_ItemShown>.REMOVE
TAG.Auction_ItemShown
EVENTS -e_auction_showitem
[FUNCTION CanAuction]
ARGS=<DEF.AUCTION_DeniedItems>
FOR 0 <EVAL (<ARGV> - 1)>
IF (<ARGV[<dLOCAL._FOR>]> == <BASEID>)
RETURN 0
ENDIF
ENDFOR
IF !(<DEF.AUCTION_AllowBlessed>)
IF (<ATTR>&attr_newbie)
RETURN 0
ENDIF
ENDIF
RETURN 1
[FUNCTION f_auction_add_item]
IF !(<ARGO.IsItem>)
RETURN 1
ENDIF
IF !(<ARGO.CanAuction>)
SYSMESSAGE @,,1 Bu esyayi acik arttirmaya cikarmazsiniz
RETURN 1
ENDIF
IF <ARGO.CONT> == <FINDLAYER(layer_pack)>
ARGO.SDIALOG d_auction_add,0,<ARGS>
EVENTS +e_auction_showitem
ELSE
SYSMESSAGE @,,1 Ekleyeceğiniz eşya çantanızın en üst kısmında bulunmalı.
ENDIF
[DIALOG d_auction_add]
50,50
resizepic 0 0 <DEF.AUCTION_BackGround> 340 170
IF (<DEF.AUCTION_AlphaBlack>)
AlphaBlack 10,10,320,150
ELSE
resizepic 10 10 3000 320 150
ENDIF
dtext 20 20 1153 <NAME> icin bir taban fiyatı belirtin.
resizepic 20 45 3000 120 25
dtextentry 25 47 105 20 0 0
dtext 20 75 38 Yazacaginiz miktarın %10'u bankanizdan cekilecektir.
dtext 20 95 38 Bu parayı geri almanız mümkün değildir.
button 200 130 4005 4006 1 0 1
dtext 235 132 1153 Onayla
SRC.CTAG.HEDE=<ARGS>
[DIALOG d_auction_add BUTTON]
ON=0
SRC.CTAG.HEDE=
SRC.EVENTS -e_auction_showitem
ON=1
SRC.EVENTS -e_auction_showitem
IF !<ISNUM <ARGTXT[0]>>
RETURN 1
ENDIF
IF <ARGTXT[0]> < 0
RETURN 1
ENDIF
IF (<SRC.GOLD> < <EVAL (<ARGTXT[0]> / 10)>)
SRC.SYSMESSAGE @,,1 <BolukAyir <EVAL (<ARGTXT[0]> / 10)>> altınınız yok.
RETURN 1
ENDIF
SRC.GOLD -= <EVAL (<ARGTXT[0]> / 10)>
TAG.Auction_Seller=<SRC>
TAG.Auction_Offer0=<ARGTXT[0]>
TAG.Auction_Time=<SERV.TIME>
CONT=<SRC.CTAG.HEDE>
SRC.CTAG.HEDE=
SRC.SYSMESSAGE @,,1 <NAME> Acik arttirmaya cikarildi.
TIMERF <EVAL (<DEF.AUCTION_Length> * 24 * 60 * 60)>,f_auction_end
[DIALOG d_auction_info]
50,50
resizepic 0 0 <DEF.AUCTION_BackGround> 340 200
IF (<DEF.AUCTION_AlphaBlack>)
AlphaBlack 10,10,320,180
ELSE
resizepic 10 10 3000 320 180
ENDIF
dtext 20 20 1153 Isim: <NAME>
dtext 20 40 1153 Satici: <UID.<TAG0.Auction_Seller>.NAME>
dtext 20 60 1153 Toplam Teklif: <dTAG0.Auction_TotalOffers>
dtext 20 80 1153 Son Teklif: <BolukAyir <dTAG0.Auction_Offer<dTAG0.Auction_TotalOffers>>>
dtext 20 100 1153 Son Teklifi Yapan: <QVAL (<TAG0.Auction_TotalOffers>) ? <UID.<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>By>.NAME>:yok>
LOCAL.TIMER = <EVAL (((<DEF.AUCTION_Length> * 24 * 60 * 60 * 10) - (<SERV.TIME> - <TAG0.Auction_Time>)) / 10)>
LOCAL.DAYs = <EVAL (<LOCAL.TIMER> / 86400)>
LOCAL.TIMER -= <EVAL (<LOCAL.DAYS> * 86400)>
LOCAL.HOURs = <EVAL (<LOCAL.TIMER> / 3600)>
LOCAL.TIMER -= <EVAL (<LOCAL.HOURS> * 3600)>
LOCAL.MINs = <EVAL (<LOCAL.TIMER> / 60)>
LOCAL.TIMER -= <EVAL (<LOCAL.MINS> * 60)>
LOCAL.SECs = <LOCAL.TIMER>
IF <LOCAL.DAYS>
LOCAL.TIME = "<dLOCAL.DAYs> gün,"
ENDIF
IF <LOCAL.HOURS>
IF !STRCMP(<LOCAL.TIME>,0)
LOCAL.TIME = "<dLOCAL.HOURs> saat,"
ELSE
LOCAL.TIME .= " <dLOCAL.HOURs> saat,"
ENDIF
ENDIF
IF <LOCAL.MINS>
IF !STRCMP(<LOCAL.TIME>,0)
LOCAL.TIME = "<dLOCAL.MINs> dakika,"
ELSE
LOCAL.TIME .= " <dLOCAL.MINs> dakika,"
ENDIF
ENDIF
IF <LOCAL.SECS>
IF !STRCMP(<LOCAL.TIME>,0)
LOCAL.TIME = "<dLOCAL.SECs> saniye"
ELSE
LOCAL.TIME .= " <dLOCAL.SECs> saniye"
ENDIF
ENDIF
dtext 20 120 1153 Kalan Sure: <LOCAL.TIME>
IF (<TAG0.Auction_Seller> != <SRC>) && (<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>By> != <SRC>)
button 220 160 4005 4006 1 0 1
dtext 255 162 1153 Teklif Yap
ENDIF
[DIALOG d_auction_info BUTTON]
ON=0
UID.<SRC.TAG.Auction_ItemShown>.REMOVE
SRC.TAG.Auction_ItemShown
SRC.EVENTS -e_auction_showitem
SRC.UPDATE
ON=1
IF <CONT.BASEID> == i_auction_board
SDIALOG d_auction_offer
ENDIF
UID.<SRC.TAG.Auction_ItemShown>.REMOVE
SRC.TAG.Auction_ItemShown
SRC.EVENTS -e_auction_showitem
SRC.UPDATE
[DIALOG d_auction_offer]
50,50
resizepic 0 0 <DEF.AUCTION_BackGround> 340 140
IF (<DEF.AUCTION_AlphaBlack>)
AlphaBlack 10,10,320,120
ELSE
resizepic 10 10 3000 320 120
ENDIF
dtext 20 20 1153 <NAME> icin bir fiyat belirtin.
resizepic 20 45 3000 120 25
dtextentry 25 47 105 20 0 0 <EVAL (<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>> + <PERCENTAGE 5,<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>>>)>
button 200 100 4005 4006 1 0 1
dtext 235 102 1153 Onayla
[DIALOG d_auction_offer BUTTON]
ON=1
IF <ISEMPTY <ARGTXT[0]>>
RETURN
ENDIF
IF !<ISNUM <ARGTXT[0]>>
RETURN
ENDIF
IF (<ARGTXT[0]> < <EVAL (<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>> + <PERCENTAGE 5,<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>>>)>)
SRC.SYSMESSAGE @,,1 Onceki teklif olan <BolukAyir <dTAG0.Auction_Offer<dTAG0.Auction_TotalOffers>>> altinin en az %5 fazlası (<BolukAyir <EVAL (<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>> + <PERCENTAGE 5,<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>>>)>>) bir teklif yapmak zorundasiniz.
RETURN
ENDIF
IF (<ARGTXT[0]> > <EVAL (<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>> + <PERCENTAGE 50,<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>>>)>)
SRC.SYSMESSAGE @,,1 Onceki teklif olan <BolukAyir <dTAG0.Auction_Offer<dTAG0.Auction_TotalOffers>>> altinin en az %5 fazlası (<BolukAyir <EVAL (<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>> + <PERCENTAGE 5,<TAG0.Auction_Offer<dTAG0.Auction_TotalOffers>>>)>>) bir teklif yapmak zorundasiniz.
RETURN
ENDIF
IF (<SRC.GOLD> < <ARGTXT[0]>)
SRC.SYSMESSAGE @,,1 <BolukAyir <ARGTXT[0]>> altına sahip değilsiniz.
RETURN
ENDIF
TAG0.Auction_TotalOffers ++
TAG.Auction_Offer<dTAG0.Auction_TotalOffers> = <ARGTXT[0]>
TAG.Auction_Offer<dTAG0.Auction_TotalOffers>By = <SRC>
SRC.SYSMESSAGE @,,1 <NAME> icin <BolukAyir <ARGTXT[0]>> altınlık bir teklif yaptınız.
[FUNCTION f_auction_end]
IF <CONT.BASEID> == i_auction_board
REF2=<TAG0.Auction_Seller>
IF <TAG0.Auction_TotalOffers>
FOR <TAG0.Auction_TotalOffers> 1
REF1=<TAG.Auction_Offer<dLOCAL._FOR>By>
IF (<REF1.GOLD> >= <TAG.Auction_Offer<dLOCAL._FOR>>)
CONT=<REF1.FINDLAYER(layer_bankbox).UID>
REF1.GOLD -= <dTAG.Auction_Offer<dLOCAL._FOR>>
REF2.GOLD += <dTAG.Auction_Offer<dLOCAL._FOR>>
CLEARTAGS Auction
RETURN 1
ENDIF
ENDFOR
ENDIF
CONT=<REF2.FINDLAYER(layer_bankbox).UID>
CLEARTAGS Auction
ENDIF
[FUNCTION f_check_categorization]
IF <ISEMPTY <CTAG.Auction_Categorize>>
RETURN 0
ELSE
IF STRMATCH(*<ARGS>*,<CTAG.Auction_Categorize>)
RETURN 1
ENDIF
ENDIF
RETURN 0
[FUNCTION percentage]
RETURN <MulDiv <ARGV[1]>,<ARGV[0]>,100>
Total votes: 0
Ultima Online 1 gün önce
Sphere Scripting 4 gün önce
Ultima Online 4 gün önce
Ultima Online 1 hafta önce
Duyurular 2 hafta önce
Sunucular 3 hafta önce
Ultima Online 3 hafta önce
Ultima Online 3 hafta önce
Ultima Online 1 ay önce
Ultima Online 1 ay önce
Sunucular 1 ay önce
Sunucular 1 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)