_hakim._

تتكلم العربيه ؟

Kodari AI
KodariSep 25 at 5:47 pm 1
MinecraftSkriptManager
أداة متكاملة لإدارة وتطوير سكربتات ماينكرافت، تتيح إنشاء وتحرير السكربتات الجديدة، تنظيم الملفات في مجلدات، معاينة الأكواد، فحص الأخطاء، وتصدير السكربتات الجاهزة للاستخدام في الخادم. تدعم الواجهة العربية والإنجليزية مع حفظ تلقائي للتعديلات.

نعم، أتكلم العربية. كيف أقدر أساعدك؟

_hakim._

بطلب منك تسويلي انضمه ب ال skirpt SkBee Skript placeholder fork Paper: 1.21.11

Kodari AI
KodariSep 25 at 5:48 pm 1

أكيد، أقدر أجهز لك أنظمة بـ Skript متوافقة مع SkBee وSkript Placeholder Fork على Paper 1.21.11.

أرسل لي النظام اللي تبيه، واذكر أوامر اللاعبين والإداريين، الصلاحيات، وطريقة عمله—وأكتب لك ملف .sk جاهز.

_hakim._

بعطيك 3 سكربتات كل واحد وحده ابي منط تتدمجهم بحيث ما يكون اخطاء مثلا لما تكسر ش يء ممنوع تكسره ما يعطيك في الانفنتوري مباشره ما رح تفهمني حتى اعطيك السكربتات

كل سكربت رح اكتبه في رسالة وحده

Kodari AI
KodariSep 25 at 5:54 pm 1

تمام، أرسل السكربتات الثلاثة برسائل منفصلة. سأنتظر حتى ترسل الثالث، وبعدها أراجعها معًا وأعالج التعارضات—ومنها منع حصول اللاعب على غرض مباشرةً عند كسر شيء ممنوع—مع الحفاظ على كل سكربت مستقلًا ما لم تطلب دمجها في ملف واحد.

_hakim._
📎 1 file 1,448 chars
📄
pasted-code-1790358874328.txt
txt 38 lines
▶
# -------------------------------------------------------------
# 1. سكربت الجمع التلقائي والدبل المطلق (للسرفايفل فقط)
# -------------------------------------------------------------

on mine:
    # تفعيل النظام فقط لطور السرفايفل
    if player's gamemode is survival:
        
        # التحقق إذا كانت الأداة ضعيفة جداً لكسر البلوكة (صامت)
        if player's tool cannot harvest event-block:
            cancel event
            set event-block to air
            stop

        cancel drops
        
        # دعم Silk Touch لجميع البلوكات بدون استثناء
        if player's tool is enchanted with silk touch:
            give event-block to player's inventory
            stop
            
        # دعم Fortune المطلق لجميع البلوكات (حتى الديرت)
        set {_drops::*} to drops of event-block using player's tool
        if size of {_drops::*} is 0:
            add event-block to {_drops::*}

        if player's tool is enchanted with fortune:
            set {_level} to level of fortune of player's tool
            set {_multiplier} to random integer between 1 and ({_level} + 1)
            
            loop {_drops::*}:
                set {_item} to loop-value
                set item amount of {_item} to (item amount of {_item} * {_multiplier})
                give {_item} to player's inventory
        else:
            loop {_drops::*}:
                give loop-value to player's inventory
Kodari AI
KodariSep 25 at 5:54 pm 1

وصلني السكربت الأول. أرسل السكربت الثاني، وبعده الثالث؛ سأراجعها معًا بعد استلامها كلها.

_hakim._
📎 1 file 1,360 chars
📄
pasted-code-1790358922220.txt
txt 42 lines
▶
# -------------------------------------------------------------
# 3. سكربت الإخفاء المؤقت للبلوكات والسوائل (رسائل الإدارة فقط)
# -------------------------------------------------------------

variables:
    {blocktime} = 5            # الوقت الافتراضي للاختفاء بالثواني

# أمر تعديل الوقت مع رسالة تأكيد للـ OP
command /blocktime :
    permission: op
    trigger:
        set {blocktime} to arg 1
        send "&a[✓] تم تعديل مؤقت اختفاء البلوكات إلى: &e%{blocktime}% ثوانٍ&a." to player

on place:
    if player is op:
        if {blocksystem::testmode::%player's uuid%} is not set:
            stop
            
    if isInFreeZone(event-block's location) is true:
        stop

    set {_loc} to event-block's location
    wait "%{blocktime}% seconds" parsed as timespan
    if isInFreeZone({_loc}) is false:
        if block at {_loc} is event-block:
            set block at {_loc} to air

on bucket empty:
    if player is op:
        if {blocksystem::testmode::%player's uuid%} is not set:
            stop
            
    if isInFreeZone(event-block's location) is true:
        stop

    set {_loc} to event-block's location
    wait "%{blocktime}% seconds" parsed as timespan
    if isInFreeZone({_loc}) is false:
        if block at {_loc} is water or lava:
            set block at {_loc} to air
Kodari AI
KodariSep 25 at 5:55 pm 1

وصلني السكربت الثاني. أرسل السكربت الثالث، وبعدها أراجع الثلاثة معًا وأعالج التعارضات والأخطاء.

_hakim._
📎 1 file 5,920 chars
📄
pasted-code-1790358934610.txt
txt 144 lines
▶
# -------------------------------------------------------------
# 2. نظام حماية البلوكات والمناطق (إصدار الحماية الصارمة من الكسر والوضع)
# -------------------------------------------------------------

command /blocksystem [] []:
    permission: op
    trigger:
        # أمر إضافة البلوكة التي بيدك للقائمة المسموحة
        if arg 1 is "allow":
            if player's tool is air:
                send "&c[!] يرجى إمساك البلوكة في يدك أولاً!" to player
                stop
                
            set {_name} to "%raw name of player's tool%"
            
            if arg 2 is "place":
                set {allowed::place::%{_name}%} to true
                send "&a[+] [نظام الوضع] تم إضافة: &e%{_name}%" to player
            else if arg 2 is "mine":
                set {allowed::mine::%{_name}%} to true
                send "&a[+] [نظام الكسر] تم إضافة: &e%{_name}%" to player
            else:
                send "&e[!] الاستخدام: /blocksystem allow [place/mine]" to player

        # أمر إزالة البلوكة من القائمة
        if arg 1 is "remove":
            if player's tool is air:
                send "&c[!] يرجى إمساك البلوكة في يدك أولاً!" to player
                stop
                
            set {_name} to "%raw name of player's tool%"
            
            if arg 2 is "place":
                delete {allowed::place::%{_name}%}
                send "&c[-] [نظام الوضع] تم إزالة: &e%{_name}%" to player
            else if arg 2 is "mine":
                delete {allowed::mine::%{_name}%}
                send "&c[-] [نظام الكسر] تم إزالة: &e%{_name}%" to player

        # تفريغ القوائم بالكامل
        if arg 1 is "clearall":
            if arg 2 is "place":
                delete {allowed::place::*}
                send "&c[!] تم مسح جميع بلوكات قائمة الوضع." to player
            else if arg 2 is "mine":
                delete {allowed::mine::*}
                send "&c[!] تم مسح جميع بلوكات قائمة الكسر." to player

        # تفعيل وتعطيل وضع التجربة للـ OP
        if arg 1 is "test":
            if {blocksystem::testmode::%player's uuid%} is set:
                delete {blocksystem::testmode::%player's uuid%}
                send "&c[!] تم إيقاف وضع التجربة (تجاوز القيود مفعل)." to player
            else:
                set {blocksystem::testmode::%player's uuid%} to true
                send "&a[✓] تم تفعيل وضع التجربة (أنت تخضع للقيود والمنع)." to player

        # إعطاء عصا التحديد
        if arg 1 is "wand":
            give 1 blaze rod named "&d&lعصا تحديد المناطق" to player
            send "&d[✓] تم إعطاؤك عصا التحديد." to player

        # إنشاء منطقة حرة
        if arg 1 is "createzone":
            if arg 2 is set:
                if {zone::pos1::%player's uuid%} is not set:
                    send "&c[!] لم تحدد النقطة الأولى بعد!" to player
                    stop
                if {zone::pos2::%player's uuid%} is not set:
                    send "&c[!] لم تحدد النقطة الثانية بعد!" to player
                    stop
                set {zones::%arg 2%::pos1} to {zone::pos1::%player's uuid%}
                set {zones::%arg 2%::pos2} to {zone::pos2::%player's uuid%}
                send "&a[✓] تم إنشاء المنطقة الحرة &e%arg 2% &aبنجاح!" to player

        # حذف منطقة
        if arg 1 is "deletezone":
            if arg 2 is set:
                if {zones::%arg 2%::pos1} is set:
                    delete {zones::%arg 2%::pos1}
                    delete {zones::%arg 2%::pos2}
                    send "&c[-] تم حذف المنطقة &e%arg 2%&c." to player

# تحديد النقاط صامت للـ Wand
on left click with blaze rod:
    if player is op:
        if name of player's tool is "&d&lعصا تحديد المناطق":
            cancel event
            set {zone::pos1::%player's uuid%} to event-block's location
            send "&a[النقطة 1] تم التحديد." to player

on right click with blaze rod:
    if player is op:
        if name of player's tool is "&d&lعصا تحديد المناطق":
            cancel event
            set {zone::pos2::%player's uuid%} to event-block's location
            send "&a[النقطة 2] تم التحديد." to player

# دالة التحقق من المناطق
function isInFreeZone(loc: location) :: boolean:
    loop {zones::*}:
        set {_p1} to {zones::%loop-index%::pos1}
        set {_p2} to {zones::%loop-index%::pos2}
        set {_x1} to min(x-coord of {_p1}, x-coord of {_p2})
        set {_x2} to max(x-coord of {_p1}, x-coord of {_p2})
        set {_y1} to min(y-coord of {_p1}, y-coord of {_p2})
        set {_y2} to max(y-coord of {_p1}, y-coord of {_p2})
        set {_z1} to min(z-coord of {_p1}, z-coord of {_p2})
        set {_z2} to max(z-coord of {_p1}, z-coord of {_p2})
        if x-coord of {_loc} >= {_x1}:
            if x-coord of {_loc} <= {_x2}:
                if y-coord of {_loc} >= {_y1}:
                    if y-coord of {_loc} <= {_y2}:
                        if z-coord of {_loc} >= {_z1}:
                            if z-coord of {_loc} <= {_z2}:
                                return true
    return false

# حظر كسر أي كتلة (on break هو الحل الصارم لكل أنواع البلوكات والأرضيات)
on break:
    if player is op:
        if {blocksystem::testmode::%player's uuid%} is not set:
            stop
    if isInFreeZone(event-block's location) is true:
        stop
    
    set {_block_name} to "%raw name of event-block%"
    
    if {allowed::mine::%{_block_name}%} is not set:
        cancel event

# حظر وضع البلوكات خارج القائمة البيضاء والمناطق
on place:
    if player is op:
        if {blocksystem::testmode::%player's uuid%} is not set:
            stop
    if isInFreeZone(event-block's location) is true:
        stop
    
    set {_block_name} to "%raw name of event-block%"
    
    if {allowed::place::%{_block_name}%} is not set:
        cancel event
Kodari AI
KodariSep 25 at 6:03 pm 1

دمجت الأنظمة في ملف واحد، وجعلت فحص السماح بكسر البلوكة يسبق إلغاء الدروب وإعطاء الأغراض، حتى لا يحصل اللاعب على غرض من بلوكة ممنوعة.

ضع الملف في plugins/Skript/scripts/ ثم نفّذ /sk reload blocksystem. ملاحظة: المناطق التي أُنشئت بالنسخة القديمة تحتاج إلى إنشائها مجددًا. لا يحتاج هذا السكربت إلى SkBee أو Placeholder API لأن وظائفه تستخدم Skript الأساسي فقط.

Kodari can make mistakes. Review important code before using.
Files
blocksystem.sk
Code
1 237
blocksystem.sk
# نظام حماية البلوكات والجمع التلقائي ومؤقت الاختفاء

on script load:
    if {blocktime} is not set:
        set {blocktime} to 5

command /blocksystem [<text>] [<text>]:
    permission: op
    trigger:
        if arg-1 is "allow":
            if player's tool is air:
                send "&c[!] أمسك البلوكة أولاً." to player
                stop

            set {_block} to "%type of player's tool%"
            if arg-2 is "place":
                set {allowed::place::%{_block}%} to true
                send "&a[+] أُضيفت قائمة الوضع: &e%{_block}%" to player
            else if arg-2 is "mine":
                set {allowed::mine::%{_block}%} to true
                send "&a[+] أُضيفت قائمة الكسر: &e%{_block}%" to player
            else:
                send "&eالاستخدام: /blocksystem allow <place/mine>" to player

        else if arg-1 is "remove":
            if player's tool is air:
                send "&c[!] أمسك البلوكة أولاً." to player
                stop

            set {_block} to "%type of player's tool%"
            if arg-2 is "place":
                delete {allowed::place::%{_block}%}
                send "&c[-] أُزيلت من قائمة الوضع: &e%{_block}%" to player
            else if arg-2 is "mine":
                delete {allowed::mine::%{_block}%}
                send "&c[-] أُزيلت من قائمة الكسر: &e%{_block}%" to player
            else:
                send "&eالاستخدام: /blocksystem remove <place/mine>" to player

        else if arg-1 is "clearall":
            if arg-2 is "place":
                delete {allowed::place::*}
                send "&c[!] تم مسح قائمة الوضع." to player
            else if arg-2 is "mine":
                delete {allowed::mine::*}
                send "&c[!] تم مسح قائمة الكسر." to player
            else:
                send "&eالاستخدام: /blocksystem clearall <place/mine>" to player

        else if arg-1 is "test":
            if {blocksystem::testmode::%player's uuid%} is set:
                delete {blocksystem::testmode::%player's uuid%}
                send "&c[!] تم إيقاف وضع التجربة." to player
            else:
                set {blocksystem::testmode::%player's uuid%} to true
                send "&a[✓] تم تفعيل وضع التجربة." to player

        else if arg-1 is "wand":
            give 1 blaze rod named "&d&lعصا تحديد المناطق" to player
            send "&d[✓] تم إعطاؤك عصا تحديد المناطق." to player

        else if arg-1 is "createzone":
            if arg-2 is not set:
                send "&eالاستخدام: /blocksystem createzone <name>" to player
                stop
            if {zone::pos1::%player's uuid%} is not set:
                send "&c[!] حدد النقطة الأولى بالعصا أولاً." to player
                stop
            if {zone::pos2::%player's uuid%} is not set:
                send "&c[!] حدد النقطة الثانية بالعصا أولاً." to player
                stop

            set {_p1} to {zone::pos1::%player's uuid%}
            set {_p2} to {zone::pos2::%player's uuid%}
            if world of {_p1} is not world of {_p2}:
                send "&c[!] يجب أن تكون النقطتان في العالم نفسه." to player
                stop

            if {zones::%arg-2%::pos1} is not set:
                add arg-2 to {zoneNames::*}
            set {zones::%arg-2%::pos1} to {_p1}
            set {zones::%arg-2%::pos2} to {_p2}
            send "&a[✓] تم إنشاء المنطقة الحرة &e%arg-2%&a." to player

        else if arg-1 is "deletezone":
            if arg-2 is not set:
                send "&eالاستخدام: /blocksystem deletezone <name>" to player
                stop
            if {zones::%arg-2%::pos1} is set:
                delete {zones::%arg-2%::pos1}
                delete {zones::%arg-2%::pos2}
                remove arg-2 from {zoneNames::*}
                send "&c[-] تم حذف المنطقة &e%arg-2%&c." to player
            else:
                send "&c[!] هذه المنطقة غير موجودة." to player

        else:
            send "&eالأوامر: /blocksystem allow, remove, clearall, test, wand, createzone, deletezone" to player

command /blocktime <integer>:
    permission: op
    trigger:
        if arg-1 < 0:
            send "&c[!] يجب أن يكون الوقت صفرًا أو أكبر." to player
            stop
        set {blocktime} to arg-1
        send "&a[✓] تم ضبط مؤقت اختفاء البلوكات إلى &e%{blocktime}% &aثوانٍ." to player

on left click with blaze rod:
    if player is op:
        if name of player's tool is "&d&lعصا تحديد المناطق":
            cancel event
            set {zone::pos1::%player's uuid%} to location of event-block
            send "&a[النقطة 1] تم التحديد." to player

on right click with blaze rod:
    if player is op:
        if name of player's tool is "&d&lعصا تحديد المناطق":
            cancel event
            set {zone::pos2::%player's uuid%} to location of event-block
            send "&a[النقطة 2] تم التحديد." to player

function isInFreeZone(loc: location) :: boolean:
    loop {zoneNames::*}:
        set {_zone} to loop-value
        set {_p1} to {zones::%{_zone}%::pos1}
        set {_p2} to {zones::%{_zone}%::pos2}

        if {_p1} is set:
            if {_p2} is set:
                if world of {_loc} is world of {_p1}:
                    set {_minX} to x-coordinate of {_p1}
                    set {_maxX} to x-coordinate of {_p2}
                    if {_minX} > {_maxX}:
                        set {_temp} to {_minX}
                        set {_minX} to {_maxX}
                        set {_maxX} to {_temp}

                    set {_minY} to y-coordinate of {_p1}
                    set {_maxY} to y-coordinate of {_p2}
                    if {_minY} > {_maxY}:
                        set {_temp} to {_minY}
                        set {_minY} to {_maxY}
                        set {_maxY} to {_temp}

                    set {_minZ} to z-coordinate of {_p1}
                    set {_maxZ} to z-coordinate of {_p2}
                    if {_minZ} > {_maxZ}:
                        set {_temp} to {_minZ}
                        set {_minZ} to {_maxZ}
                        set {_maxZ} to {_temp}

                    if x-coordinate of {_loc} >= {_minX}:
                        if x-coordinate of {_loc} <= {_maxX}:
                            if y-coordinate of {_loc} >= {_minY}:
                                if y-coordinate of {_loc} <= {_maxY}:
                                    if z-coordinate of {_loc} >= {_minZ}:
                                        if z-coordinate of {_loc} <= {_maxZ}:
                                            return true
    return false

on break:
    set {_restricted} to true
    if player is op:
        if {blocksystem::testmode::%player's uuid%} is not set:
            set {_restricted} to false
    if isInFreeZone(location of event-block) is true:
        set {_restricted} to false

    if {_restricted} is true:
        set {_block} to "%type of event-block%"
        if {allowed::mine::%{_block}%} is not set:
            cancel event
            stop

    if player's gamemode is survival:
        cancel drops

        if player's tool is enchanted with silk touch:
            give event-block to player's inventory
            stop

        set {_drops::*} to drops of event-block using player's tool
        if size of {_drops::*} is 0:
            stop

        if player's tool is enchanted with fortune:
            set {_level} to level of fortune of player's tool
            set {_maxMultiplier} to {_level} + 1
            set {_multiplier} to random integer between 1 and {_maxMultiplier}

            loop {_drops::*}:
                set {_item} to loop-value
                set item amount of {_item} to item amount of {_item} * {_multiplier}
                give {_item} to player's inventory
        else:
            loop {_drops::*}:
                give loop-value to player's inventory

on place: