Çözüldü Oluşturduğumuz Argları Silebilmeyi Bilenler İçeri !

  • Konuyu Başlatan Konuyu Başlatan wontis
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 347
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

wontis

Zombi Geldi, Beni Yedi
Katılım
30 Nisan 2018
Mesajlar
227
Elmaslar
17
Puan
13.445
Yaş
26
Arkadaşlar öncelikle herkese merhaba. Ben bir report skripti indirdim. Fakat komutlarında kafam baya karıştı. Oyuncuların oluşturduğu raporları silme komutu koyulmamış. Bir başka komut koyulmuş fakat bütün raporları birden siliyor ve birdaha kimse report yazamıyor bir süre boyunca. Benim sizden istediğim yeni bir komut daha eklemeniz. Bu komut raporları tek tek rapor ismini yazarak okduğumu silebileyim. Skript hakkında bilgi vericek olursam çalışma şekli şu şekilde, Öncelikle bir kişi /report <nick> <sebep> şeklinde bir rapor yazıyor. Daha sonra o yazdığı rapor otomatik yazılma zamanına göre bir sayı veriyor. Örneğin 3 tane rapor yazılmışsa birdahaki raporun adı 4 oluyor. Yani /reports list komutunu yazdığımızda orda 1.[Tarih/Saat].yazankişi şeklinde gözüküyor. Daha sonra /reports view 1 yani başındaki sayıyı yazdığımızda raporun ismi o olduğu için ayrıntılı bakılıyor. Kısaca bu şekilde çalışıyor. Benim sizden istediğim /reportdel <raporismi> şeklinde bir komut daha eklemeniz. O komutu yazdığımda okuduğum raporu silmek istiyorum. Fakat diğerleri silinmesin. Kod biraz zor bende çok fazla anlamadım kodu aşağıya atacağım lütfen anlayan kişiler yardım edebilir mi!
Not: En alttaki /reset komutunu yazdığımızda yukarıda dediğim gibi bütün raporlar siliniyor ve birdaha belli bir süre report edemiyoruz. Lütfen onu ellemeyiniz.


Kod:
variables:
    {id} = 0
options:
#█▀▀█ █▀▀ █▀▀█ █▀▀█ █▀▀█ ▀▀█▀▀         █▀▀ █░█ █▀▀█ ░▀░ █▀▀█ ▀▀█▀▀
#█▄▄▀ █▀▀ █░░█ █░░█ █▄▄▀ ░░█░░         ▀▀█ █▀▄ █▄▄▀ ▀█▀ █░░█ ░░█░░
#▀░▀▀ ▀▀▀ █▀▀▀ ▀▀▀▀ ▀░▀▀ ░░▀░░         ▀▀▀ ▀░▀ ▀░▀▀ ▀▀▀ █▀▀▀ ░░▀░░


#█▀▀█ █▀▀█ █▀▀ █▀▀ ░▀░ █░█
#█░░█ █▄▄▀ █▀▀ █▀▀ ▀█▀ ▄▀▄
#█▀▀▀ ▀░▀▀ ▀▀▀ ▀░░ ▀▀▀ ▀░▀
    prefix: &c&lReports &f>


#█▀▀█ █▀▀ █▀▀█ █▀▄▀█ ░▀░ █▀▀ █▀▀ ░▀░ █▀▀█ █▀▀▄ █▀▀
#█░░█ █▀▀ █▄▄▀ █░▀░█ ▀█▀ ▀▀█ ▀▀█ ▀█▀ █░░█ █░░█ ▀▀█
#█▀▀▀ ▀▀▀ ▀░▀▀ ▀░░░▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀▀ ▀░░▀ ▀▀▀
    UseTheCommand: use.report
    CommentOnAReview: comment.report


#▒█▀▀█ █▀▀█ █▀▀█ █▀▀█ █▀▀ █▀▀ ▀▀█▀▀   ▒█░▒█ █▀▀ █▀▀█ █▀▀▀ █▀▀
#▒█░░░ █░░█ █▄▄▀ █▄▄▀ █▀▀ █░░ ░░█░░   ▒█░▒█ ▀▀█ █▄▄█ █░▀█ █▀▀
#▒█▄▄█ ▀▀▀▀ ▀░▀▀ ▀░▀▀ ▀▀▀ ▀▀▀ ░░▀░░   ░▀▄▄▀ ▀▀▀ ▀░░▀ ▀▀▀▀ ▀▀▀
    Arg-1NotCorrectUsage: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &eUsage: &7/&8report &7<&4&l&nname&7> &7<&8reason&7>&4! %nl% %nl% %nl%
    Arg-2NotCorrectUsage: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &eUsage: &7/&8report &7<&8name&7> &7<&4&l&nreason&7>&4! %nl% %nl% %nl%   
#reports view
    IDNotCorrectUsageReport: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &eUsage: &7/&8reports &7<&8view&7> &7<&4&l&nID&7>&4! %nl% %nl% %nl%
    Arg-1NotCorrectUsageReport: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &eUsage: &7/&8reports &7<&8view/comment/list/flag&7>&4! %nl% %nl% %nl%
    Arg-3NotCorrectUsageComment: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &eUsage: &7/&8reports &7<&8&ncomment&7> <&8ID&7> <&4&l&ncomment&7>&4%nl% %nl% %nl%
#reports comment
    Arg-2NotCorrectUsageComment: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &eUsage: &7/&8reports &7<&8&ncomment&7> <&4&nID&7> <&8comment&7>&4! %nl% %nl% %nl%
#flag comment
    Arg-2NotCorrectUsageCommentflag: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &eUsage: &7/&8reports &7<&8flag> <&4&nID&7> <&8Open/Closed&7>&4! %nl% %nl% %nl%
    Arg-3NotCorrectUsageCommentflag: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &eUsage: &7/&8reports &7<&8&ncomment&7> <&8ID&7> <&4&nOpen/Closed&7>&4! %nl% %nl% %nl%
#▒█▄░▒█ █▀▀█ ▀▀█▀▀   █▀▀█ █▀▀▄ █░░ ░▀░ █▀▀▄ █▀▀
#▒█▒█▒█ █░░█ ░░█░░   █░░█ █░░█ █░░ ▀█▀ █░░█ █▀▀
#▒█░░▀█ ▀▀▀▀ ░░▀░░   ▀▀▀▀ ▀░░▀ ▀▀▀ ▀▀▀ ▀░░▀ ▀▀▀
    notonline: &8&l&n%arg 1%&7 is not online&4&l!

#▒█░░▒█ █▀▀█ ░▀░ ▀▀█▀▀   ▀▀█▀▀ ░▀░ █▀▄▀█ █▀▀
#▒█▒█▒█ █▄▄█ ▀█▀ ░░█░░   ░░█░░ ▀█▀ █░▀░█ █▀▀
#▒█▄▀▄█ ▀░░▀ ▀▀▀ ░░▀░░   ░░▀░░ ▀▀▀ ▀░░░▀ ▀▀▀   #And Also Amount of Comments In /reports comment!
    reportwaitingtime: 3 #in seconds
    delay: &c&l|&c You'll have to wait: &7 %{_difference}% &c&l| &cbefore using this command again!
    delaymin: 5 #in minutes
#▒█▀▀█ █▀▀█ █▀▄▀█ █▀▀█ █░░ █▀▀ ▀▀█▀▀ █▀▀
#▒█░░░ █░░█ █░▀░█ █░░█ █░░ █▀▀ ░░█░░ █▀▀
#▒█▄▄█ ▀▀▀▀ ▀░░░▀ █▀▀▀ ▀▀▀ ▀▀▀ ░░▀░░ ▀▀▀
    ReportWait: &8&l| &e&lWAIT &8&l| &eChecking the database, please wait...
    ReportSuccesful: &c&lReports &f> &e&lID: &e%{id}%%nl%&c&lReports &f> &4Note: You have reported &c%arg 1%&4 for &7%arg 2%&4.%nl%&c&lReports &f> &7Thank you. Your report has been filed.%nl% &8&l- &7Your name: &8(&c %player%&8 )%nl% &8&l- &7Player you reported: &8(&c %arg 1%&8 )%nl% &8&l- &7Date (YYYY-MM-DD) (EST): &c%{date::%{id}%}% %nl% &8&l- &7Reason:%nl% &7> &c%arg 2% %nl% &7&l** Staff should view your report within 48 hours!
    #review
    ViewingAReport: &4&l&m=============[&c&lReport Viewer&4&l&m]=============%nl%&f> &7Viewing record with ID &c%{id}%&7:%nl%&4&m-------------------------%nl%&7Reported player: &c%arg 1% %nl%&7Player who reported: &c%player% %nl%&7Date (YYYY-MM-DD) (EST): &c%{date::%{id}%}% %nl%&7Reason: &c%arg 2%
    Commented: &c&lReports &f> &eYou have succesfully commented on &lTICKET &eID: &l%arg-2%&7!
    commenthowitlooks: [&c%now%&7]&c%player%&7: %arg 3%
    list: &7[&c%now%&7] &c%player%
    flaghasbeensettoopen: &c&lReports &f> &f[&cStaff&f]: &eFlag has been set to &6&nOpen&e!
    flaghasbeensettoclosed: &c&lReports &f> &f[&cStaff&f]: &eFlag has been set to &4&nClosed&e!
#▒█▀▀▀ █▀▀█ █▀▀█ █▀▀█ █▀▀█ █▀▀
#▒█▀▀▀ █▄▄▀ █▄▄▀ █░░█ █▄▄▀ ▀▀█
#▒█▄▄▄ ▀░▀▀ ▀░▀▀ ▀▀▀▀ ▀░▀▀ ▀▀▀
    NoPermissionError: %nl% %nl% %nl%&4&l>> &4Error&c:&4&l <<%nl% &8&l  -  &4You don't have permissions for this! %nl% %nl% %nl%
    #review
    NoIDCouldBeFound: &c&lReports &f> &f[&cStaff&f]: &c&lID&c, &4couldn't be found!
    NoReports: &c&lReports &f> &f[&cStaff&f]: &eThere are no report's at the moment! Good job!
    canonlybeopenorclosed: &c&lReports &f> &f[&cStaff&f]: &eYou may only use &6Closed&e/&6Open&e&l!
    closedthread: &c&lReports &f> &f[&cStaff&f]:&e You can't comment on a closed thread!
    #Hjemmeside til fed tekst!
#    http://fsymbols.com/generators/tarty/






















#▒█▀▀█ ▒█▀▀▀█ ▒█▀▀▄ ▒█▀▀▀
#▒█░░░ ▒█░░▒█ ▒█░▒█ ▒█▀▀▀
#▒█▄▄█ ▒█▄▄▄█ ▒█▄▄▀ ▒█▄▄▄

command /report [<offline player>] [<text>]:
    trigger:
        if player has permission "{@UseTheCommand}":
            if arg 1 is set:
                if arg 1 is online:
                    if arg 2 is set:
                        set {_difference} to difference between {delayreport.%player%} and now
                        if {_difference} is less than {@delaymin} minutes:
                            set  {_difference} to difference between {_difference} and {@delaymin} minutes
                            message "{@delay}"
                            stop
                        set {delayreport.%player%} to now
                        send "{@ReportWait}"
                        add 1 to {id}
                        wait {@reportwaitingtime} seconds
                        add "{@list}" to {list::*}
                        set {date::%{id}%} to now
                        set {flag::%{id}%} to "&2&lOpen"
                        set {report::%{id}%} to "{@ViewingAReport}"
                        send "{@ReportSuccesful}"
                    else:
                        send "{@Arg-2NotCorrectUsage}"
                else:
                    send "{@notonline}"
            else:
                send "{@Arg-1NotCorrectUsage}"
        else:
            send "{@NoPermissionError}"
command /reports [<text>] [<text>] [<text>]:
    trigger:
        if player has permission "{@CommentOnAReview}":
            if arg 1 isn't set:
                send "{@Arg-1NotCorrectUsageReport}"
                stop
            else if arg 1 isn't "view" or "comment" or "list" or "flag":
                send "{@Arg-1NotCorrectUsageReport}"
                stop
                #view
            else if arg 1 is "view":
                if arg 2 is set:
                    if {report::%arg 2%} is set:
                        message "%{report::%arg 2%}%"
                        message "&7flag: %{flag::%arg-2%}%"
                        set {_a} to 0
                        loop {comment::%arg-2%::*}:
                            add 1 to {_a}
                        message "&7Found &c%{_a}% &7comments:%nl%"
                        message "&4&m-------------------------"
                        if {_a} is greater than 0:
                            loop {comment::%arg-2%::*}:
                                message "&4%loop-index%&7. [ID:&c%loop-index%&7] %loop-value%"
                        message "&4&l&m=============[&c&lReport Viewer&4&l&m]============="
                        stop
                    message "{@NoIDCouldBeFound}"
                    stop
                message "{@IDNotCorrectUsageReport}"
                #comment
            else if arg 1 is "comment":
                if arg 2 is not set:
                    message "{@Arg-2NotCorrectUsageComment}"
                    stop
                if {report::%arg 2%} is not set:
                    message "{@NoIDCouldBeFound}"
                    stop
                if {flag::%arg-2%} contains "Closed":
                    message "{@closedthread}"
                    stop
                if arg 3 is not set:
                    message "{@Arg-3NotCorrectUsageComment}"
                    stop
                add "{@commenthowitlooks}" to {comment::%arg-2%::*}
                message "{@Commented}"
            else if arg 1 is "list":
                set {_a} to 0
                loop {list::*}:
                    add 1 to {_a}
                    if {_a} is greater than 0:
                        message "&f&l - &4%loop-index%&7. %loop-value%"
                if {_a} is 0:
                    message "{@NoReports}"
                    stop
            else if arg 1 is "flag":
                if arg 2 is not set:
                    send "{@Arg-2NotCorrectUsageCommentflag}"
                    stop
                if arg 3 is not set:
                    send "{@Arg-3NotCorrectUsageCommentflag}"
                    stop
                else:
                    if {report::%arg-2%} is set:
                        if arg 3 isn't "Closed" or "Open":
                            send "{@canonlybeopenorclosed}"
                            stop
                        else:
                            if arg 3 is "Open":
                                send "{@flaghasbeensettoopen}"
                                set {flag::%arg-2%} to "&2&nOpen"
                            else:
                                send "{@flaghasbeensettoclosed}"
                                set {flag::%arg-2%} to "&4&nClosed"
                    else:
                        message "{@NoIDCouldBeFound}"
          
      

              
      
        else:
            send "{@NoPermissionError}"
command /reset:
    trigger:
        if player has permission "*":
            delete {comment::*}
            delete {report::*}
            set {id} to 0
            delete {date::*}
            delete {flag::*}
            delete {list::*}
        else:
            send "{@NoPermissionError}"
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl
Üst