Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on script load:
- wait 3 ticks
- invoke "iptalIhale" from "&cConsole"
- if folder "plugins/Auctions" doesn't exists:
- create folder "plugins/Auctions"
- command /auc [<text>] [<text>] [<text>]:
- aliases: auctions, a
- trigger:
- if arg 1 is not set:
- if player has permission "auctions.admin" or "auctions.*":
- set {_loopN} to 9
- else:
- set {_loopN} to 6
- send "%{AUC::Messages::Top_Title}%"
- loop {_loopN} times:
- send "%{AUC::Messages::Line_%loop-value%}%"
- send "%{AUC::Messages::Down_Title}%"
- else if arg 1 is "start" or "baslat":
- if player's tool isn't air:
- if {Auctions::Durum} is not set:
- set {_miktar} to "%arg 2%" parsed as integer
- if {_miktar} is set:
- if {_miktar} is greater than 0:
- set {_minimumPr} to "%arg 3%" parsed as number
- if {_minimumPr} is set:
- if {_minimumPr} is greater than 0:
- if number of player's tool in player's inventory is greater or equal to {_miktar}:
- if id of player's tool is not 403 or 421 or 387:
- set {_name} to name of player's tool
- set {Auctions::Name} to {_name}
- set {Auctions::Esya} to {_miktar} of held item
- set {Auctions::Miktar} to {_miktar}
- set {Auctions::Durum} to player
- set {Auctions::Tur} to "%type of player's tool%"
- remove {Auctions::Esya} from player's inventory
- send "%{AUC::Prefix}% %{AUC::Messages::Item_Received}%"
- set {Auctions::minimumPr} to {_minimumPr}
- clear {Auctions::Teklif_Verenler}
- set {Auctions::Teklif_Fiyatı} to 0
- set {_msg} to {AUC::Messages::Auc_Has_Been_Started}
- replace all "{PLAYER}" with "%player%" in {_msg}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg}
- replace all "{MINPR}" with "%{_minimumPr}%" in {_msg}
- set {_msg2} to {AUC::Action_Bars::Started}
- replace all "{PLAYER}" with "%player%" in {_msg2}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg2}
- replace all "{PR}" with "%{_minimumPr}%" in {_msg2}
- send action bar from "%{_msg2}%" to players
- set {_msg3} to {AUC::Titles::Started_SBT}
- replace all "{PLAYER}" with "%player%" in {_msg3}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg3}
- replace all "{PR}" with "%{_minimumPr}%" in {_msg3}
- set {_control} to single value "General.Titles" get of "plugins/Auctions/General.yml"
- if {_control} is "True":
- send players title "%{AUC::Titles::Main}%" with subtitle "%{_msg3}%"
- broadcast ""
- broadcast " &6&lAUCTIONS"
- broadcast ""
- broadcast "%{_msg}%"
- broadcast "%{AUC::Messages::Give_Offer_Or_See}%"
- broadcast ""
- set {_playedT} to single value "%player%.Played-Time" get of "plugins/Auctions/Players/%player%.yml" parsed as integer
- set {_playedT} to {_playedT} + 1
- set "%player%.Played-Time" to "%{_playedT}%" in yaml file "plugins/Auctions/Players/%player%.yml"
- set {_second} to 30
- while {_second} is not 0:
- if {Auctions::Durum} is set:
- if {_second} is 30 or 20 or 10 or 5 or 4 or 3 or 2 or 1:
- set {_msg} to {AUC::Messages::Remaining_Time}
- replace all "{TIME}" with "%{_second}%" in {_msg}
- broadcast "%{AUC::Prefix}% %{_msg}%"
- else if {_second} is 15:
- if {Auctions::Teklif_Verenler} isn't set:
- set {_msg} to {AUC::Messages::No_Bidder}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg}
- broadcast "%{AUC::Prefix}% %{_msg}%"
- set {_aucmsg} to {AUC::Action_Bars::Not_Offer}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_aucmsg}
- send action bar from "%{_aucmsg}%" to players
- set {_msg2} to {AUC::Messages::Item_Gived}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg2}
- send "%{AUC::Prefix}% %{_msg2}%" to player
- set {_msg3} to {AUC::Titles::No_Bidder_SBT}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg3}
- set {_control} to single value "General.Titles" get of "plugins/Auctions/General.yml"
- if {_control} is "True":
- send players title "%{AUC::Titles::Main}%" with subtitle "%{_msg3}%"
- give {Auctions::Esya} to player
- clear {Auctions::*}
- set {Auctions::Teklif_Fiyatı} to 0
- remove 1 from {_second}
- wait 1 seconds
- else:
- stop
- if {Auctions::Teklif_Verenler} is set:
- set {_msg} to {AUC::Messages::Bid_Finished}
- replace all "{PLAYER}" with "%{Auctions::Teklif_Verenler}%" in {_msg}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg}
- replace all "{PR}" with "%{Auctions::Teklif_Fiyatı}%" in {_msg}
- broadcast "%{AUC::Prefix}% %{_msg}%"
- remove {Auctions::Teklif_Fiyatı} from {Auctions::Teklif_Verenler}'s balance
- add {Auctions::Teklif_Fiyatı} to player's balance
- give {Auctions::Esya} to {Auctions::Teklif_Verenler}
- set {_msg2} to {AUC::Messages::You_Win_Bid}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg2}
- replace all "{PR}" with "%{Auctions::Teklif_Fiyatı}%" in {_msg2}
- send "%{AUC::Prefix}% %{_msg2}%" to {Auctions::Teklif_Verenler}
- set {_aucmsg} to {AUC::Action_Bars::Finished}
- replace all "{PLAYER}" with "%{Auctions::Teklif_Verenler}%" in {_aucmsg}
- replace all "{PR}" with "%{Auctions::Teklif_Fiyatı}%" in {_aucmsg}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_aucmsg}
- send action bar from "%{_aucmsg}%" to players
- set {_msg3} to {AUC::Titles::Finished_SBT}
- replace all "{PLAYER}" with "%{Auctions::Teklif_Verenler}%" in {_msg3}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg3}
- replace all "{PR}" with "%{_minimumPr}%" in {_msg3}
- set {_control} to single value "General.Titles" get of "plugins/Auctions/General.yml"
- if {_control} is "True":
- send players title "%{AUC::Titles::Main}%" with subtitle "%{_msg3}%"
- set {_depositP} to single value "%{Auctions::Teklif_Verenler}%.Deposit" get of "plugins/Auctions/Players/%{Auctions::Teklif_Verenler}%.yml" parsed as number
- set {_depositA} to single value "General.All-Deposit" get of "plugins/Auctions/General.yml" parsed as number
- set {_winP} to single value "%{Auctions::Teklif_Verenler}%.Win-Time" get of "plugins/Auctions/Players/%{Auctions::Teklif_Verenler}%.yml" parsed as integer
- set {_allP} to single value "General.All-Played" get of "plugins/Auctions/General.yml" parsed as integer
- set {_depositP} to {_depositA} + {Auctions::Teklif_Fiyatı}
- set {_depositA} to {_depositA} + {Auctions::Teklif_Fiyatı}
- set {_winP} to {_winP} + 1
- set {_allP} to {_allP} + 1
- set "%{Auctions::Teklif_Verenler}%.Deposit" to "%{_depositA}%" in yaml file "plugins/Auctions/Players/%{Auctions::Teklif_Verenler}%.yml"
- set "General.All-Deposit" to "%{_depositA}%" in yaml file "plugins/Auctions/General.yml"
- set "%{Auctions::Teklif_Verenler}%.Win-Time" to "%{_winP}%" in yaml file "plugins/Auctions/Players/%{Auctions::Teklif_Verenler}%.yml"
- set "General.All-Played" to "%{_allP}%" in yaml file "plugins/Auctions/General.yml"
- clear {Auctions::*}
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Not_Accept_Item}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Not_Have}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Integer_Greater_0}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Correct_Money}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Integer_Greater_0}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Correct_Number}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Bid_Right_Now}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Not_Air}%"
- else if arg 1 is "bid" or "teklif":
- if {Auctions::Durum} is set:
- if {Auctions::Durum} isn't "%player%":
- if arg 2 is set:
- set {_offerPr} to "%arg 2%" parsed as number
- if {_offerPr} is set:
- if {_offerPr} is greater or equal to {Auctions::minimumPr}:
- if player's balance is greater or equal to {_offerPr}:
- if {_offerPr} is bigger than {Auctions::Teklif_Fiyatı}:
- set {Auctions::Teklif_Verenler} to player
- set {Auctions::Teklif_Fiyatı} to {_offerPr}
- set {_msg} to {AUC::Messages::Offered}
- replace all "{PLAYER}" with "%player%" in {_msg}
- replace all "{PR}" with "%{_offerPr}%" in {_msg}
- broadcast "%{AUC::Prefix}% %{_msg}%"
- set {_msg2} to {AUC::Messages::You_Join_The_Bid}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg2}
- replace all "{PR}" with "%{_offerPr}%" in {_msg2}
- send "%{AUC::Prefix}% %{_msg2}%"
- set {_aucmsg} to {AUC::Action_Bars::Offered}
- replace all "{PLAYER}" with "%{Auctions::Teklif_Verenler}%" in {_aucmsg}
- replace all "{PR}" with "%{Auctions::Teklif_Fiyatı}%" in {_aucmsg}
- send action bar from "%{_aucmsg}%" to players
- else:
- set {_msg} to {AUC::Messages::Low_Bid}
- replace all "{PR}" with {Auctions::minimumPr} in {_msg}
- send "%{_msg}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Low_Balance}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Low_EnteredMoney}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Correct_Money}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Correct_Money}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Not_Join_Your_Bid}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Not_Bid}%"
- else if arg 1 is "cancel" or "iptal":
- if {Auctions::Durum} is set:
- if {Auctions::Durum} is "%player%":
- invoke "iptalIhale" from "&9%player%"
- else:
- if player has permission "cancel.auctions":
- invoke "iptalIhale" from "&cOP Player"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Not_Your_Bid}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Not_Bid}%"
- else if arg 1 is "info" or "bilgi":
- if {Auctions::Durum} is set:
- wait 2 ticks
- open chest with 1 rows named "%{AUC::Menus::Bid}%" to player
- play raw sound "note.pling" at player with pitch 1 volume 0.1
- set {_i} to "%{Auctions::Tur}%" parsed as material
- set {_lore} to {AUC::Menus::Item_Lore}
- replace all "{PLAYER}" with "%{Auctions::Durum}%" in {_lore}
- replace all "{PR}" with "%{Auctions::minimumPr}%" in {_lore}
- replace all "{AMOUNT}" with "%{Auctions::Miktar}%" in {_lore}
- if {Auctions::Name} isn't set:
- format slot 4 of player with {_i} with lore "%{_lore}%" to be unstealable
- else:
- format slot 4 of player with {_i} named "%{Auctions::Name}%" with lore "%{_lore}%" to be unstealable
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::Not_Bid}%"
- else if arg 1 is "admin":
- if player has permission "auctions.admin" or "auctions.*":
- wait 2 tick
- open chest with 1 rows named "%{AUC::Menus::Admin}%" to player
- set {_playedT} to single value "General.All-Played" get of "plugins/Auctions/General.yml" parsed as number
- format slot 0 of player with gray dye named "%{AUC::Menus::Played_Time}%" with lore "||&e- &a%{_playedT}% &7%{AUC::Menus::Times}%" to be unstealable
- set {_depositA} to single value "General.All-Deposit" get of "plugins/Auctions/General.yml" parsed as number
- format slot 2 of player with sunflower named "%{AUC::Menus::Deposited_Money}%" with lore "||&e- &a%{_depositA}%$" to be unstealable
- format slot 4 of player with diamond of unbreaking 10 named "&aVersion;" with lore "||&e- &a%{AUC::Version}%||&f" to be unstealable
- set {_titles} to single value "General.Titles" get of "plugins/Auctions/General.yml"
- if {_titles} is "True":
- set {_lore} to {AUC::Menus::Titles_Close}
- format slot 6 of player with gold nugget named "%{AUC::Menus::Title_On_Off}%" with lore "%{_lore}%" to close then run [invoke "setTitle" from player and "False"]
- else if {_titles} is "False":
- set {_lore} to {AUC::Menus::Titles_Open}
- format slot 6 of player with ghast tear named "%{AUC::Menus::Title_On_Off}%" with lore "%{_lore}%" to close then run [invoke "setTitle" from player and "True"]
- set {_purge} to single value "General.PurgePlayer-Spam" get of "plugins/Auctions/General.yml"
- if {_purge} is "True":
- set {_item} to "341" parsed as material
- set {_lore} to {AUC::Menus::Purge_Close}
- set {_cmd} to "False"
- else if {_purge} is "False":
- set {_item} to "378" parsed as material
- set {_lore} to {AUC::Menus::Purge_Open}
- set {_cmd} to "True"
- format slot 8 of player with {_item} named "%{AUC::Menus::PurgePlayer_Spam}%" with lore "%{_lore}%" to close then run [invoke "setPurge" from player and {_cmd}]
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::No_Perm}%"
- else if arg 1 is "version":
- send "%{AUC::Messages::Top_Title}%"
- send ""
- send "&e- &aVersion: &7##%{AUC::Version}%"
- send "&e- &aCreated By: &7Murat Kandilli"
- send ""
- send "%{AUC::Messages::Down_Title}%"
- else if arg 1 is "stats" or "istatistik":
- open chest with 1 rows named "%{AUC::Menus::Stats}%" to player
- set {_deposit} to single value "%player%.Deposit" get of "plugins/Auctions/Players/%player%.yml" parsed as number
- set {_win} to single value "%player%.Win-Time" get of "plugins/Auctions/Players/%player%.yml" parsed as integer
- set {_start} to single value "%player%.Played-Time" get of "plugins/Auctions/Players/%player%.yml" parsed as integer
- format slot 1 of player with skull of player named "&a%player%" to be unstealable
- format slot 4 of player with sunflower named "%{AUC::Menus::Deposited}%" with lore "||&e- &a%{_deposit}%$||&f" to be unstealable
- format slot 5 of player with diamond of unbreaking 10 named "%{AUC::Menus::Win-Time}%" with lore "||&e- &a%{_win}% %{AUC::Menus::Times}%||&f" to be unstealable
- format slot 6 of player with flint named "&b%{AUC::Menus::Played-Time}%" with lore "||&e- &a%{_start}% %{AUC::Menus::Times}%||&f" to be unstealable
- else if arg 1 is "lang" or "dil":
- if player has permission "auctions.admin" or "auctions.*" or "auctions.lang":
- if arg 2 is set:
- if arg 2 is "en_EN" or "tr_TR":
- wait 1 ticks
- if file "plugins/Skript/scripts/Auctions-SYNC.sk" exists:
- download from "https://raw.githubusercontent.com/MuratKandilli/AUCTIONS/master/%arg 2%" to file "plugins/Skript/scripts/Auctions-SYNC.sk"
- wait 5 ticks
- execute console command "sk reload Auctions-SYNC"
- wait 30 ticks
- set {_msg} to {AUC::Messages::Lang_Setted}
- replace all "{LANG}" with "%arg 2%" in {_msg}
- send "%{AUC::Prefix}% %{_msg}%"
- else:
- set {_msg1} to {AUC::Messages::No_File-1}
- set {_msg2} to {AUC::Messages::No_File-2}
- send "%{AUC::Prefix}% %{_msg1}%"
- wait 2 tick
- send "%{AUC::Prefix}% %{_msg2}%"
- else:
- execute player command "a lang"
- else:
- send ""
- send "%{AUC::Messages::Current_Langs}%"
- loop 5 times:
- send "%{AUC::Messages::Current_Langs-%loop-value%}%"
- send ""
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::No_Perm}%"
- else if arg 1 is "reload":
- if player has permission "auctions.admin" or "auctions.*" or "auctions.reload":
- send "%{AUC::Prefix}% %{AUC::Messages::Reloading_1}%"
- execute console command "sk reload Auctions-SYNC"
- send "%{AUC::Prefix}% %{AUC::Messages::Reloading_2}%"
- else:
- send "%{AUC::Prefix}% %{AUC::Messages::No_Perm}%"
- else:
- execute player command "auc"
- sub "setTitle":
- set {_p} to "%parameter 1%" parsed as player
- set {_cmd} to "%parameter 2%"
- set "General.Titles" to "%{_cmd}%" in yaml file "plugins/Auctions/General.yml"
- send "%{AUC::Prefix}% %{AUC::Messages::Turned_%{_cmd}%_Titles}%" to {_p}
- wait 4 tick
- execute {_p} command "a admin"
- sub "setPurge":
- set {_p} to "%parameter 1%" parsed as player
- set {_cmd} to "%parameter 2%"
- set "General.PurgePlayer-Spam" to "%{_cmd}%" in yaml file "plugins/Auctions/General.yml"
- send "%{AUC::Prefix}% %{AUC::Messages::Turned_%{_cmd}%_Purge}%" to {_p}
- wait 4 tick
- execute {_p} command "a admin"
- sub "iptalIhale":
- set {_p} to "%parameter 1%" parsed as player
- if {Auctions::Durum} is set:
- set {_msg} to {AUC::Messages::Bid_Canceled}
- replace all "{BY}" with "%{_p}%" in {_msg}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg}
- broadcast "%{AUC::Prefix}% %{_msg}%"
- set {Auctions::Teklif_Fiyatı} to 0
- give {Auctions::Esya} to {Auctions::Durum}
- set {_msg} to {AUC::Messages::Item_Gived}
- replace all "{ITEM}" with "%{Auctions::Miktar}% %{Auctions::Tur}%" in {_msg}
- send "%{AUC::Prefix}% %{_msg}%" to {Auctions::Durum}
- clear {Auctions::*}
Advertisement
Add Comment
Please, Sign In to add comment