منظمة قانون التطور - Evolution Law Organization
موضوع بعنوان :كويست الأحداث
الكاتب :NaNOo


سلام عليكم شباب
حبيت اقدم لكم كويست بسيط
تفعل الاحداث من تاجر معين
 quest item_drop begin
    state start begin
        when 20020.chat."Item_Drop" with pc.is_gm() begin
            if game.get_event_flag("item_open") == 0 then
                say(" هلا "..pc.get_name().."  ")
                say(" هل تريد فعلا تفعيل مسابقة السقوط ")
                say(" يجب ان تأخذ الاذن من صاحب السيرفر ")
                if select(" نعم "," لا ") == 2 then return end
                say(" ادخل كود الاداة ")
                kill_item = tonumber(input()) or 0
                if kill_item == 0 then
                    say(" كود غير صالح ")
                    return
                end    
                say(" نسبة سقوط الاداة كم من 100 ")
                kill_prozent = tonumber(input()) or 0
                if kill_prozent == 0 then
                    say(" نسبة خاطئة ")
                    return
                end    
                say(" مدة المسابقة بالدقايق كم تبيها ")
                zeit = tonumber(input()) or 0
                if zeit == 0 then
                    say(" المدة خاطئ ")
                    return
                end
                game.set_event_flag("item_time", get_time()+zeit*60)
                game.set_event_flag("item_open", 1)
                notice_all(" تم بدء مسابقة سقوط الان!!.. ")
                notice_all(" اسم الاداة "..item_name(kill_item).." تستطيع الحصول عليها عن طريق قتل جميع الوحوش ")
                notice_all(" مدة المسابقة "..zeit.." دقيقة ")
            else 
                say(" المسابقة حاليا فعالة ")
                say(" هل تريد الغائها ")
                if select(" نعم ", " لا ")==2 then return end
                game.set_event_flag("item_open", 0)
                kill_prozent, kill_item = nil, nil
            end
        end
        when kill with game.get_event_flag("item_open") == 1 and not npc.is_pc() begin
            if kill_prozent == nil then game.set_event_flag("item_open", 0) return end
            if game.get_event_flag("item_time") < get_time() then
                notice_all(" لقد انتهت مسابقة السقوط ")
                notice_all(" انتظرنا في موعد قادم ")
                game.set_event_flag("item_open", 0)
                kill_prozent, kill_item = nil, nil
                return
            end
            local s=number(1, 101-kill_prozent) 
            if s==1 then
                game.drop_item(kill_item, 1) 
            end
        end
        when login with game.get_event_flag("item_open") == 1 begin
            notice(" يلا الحق نفسك مسابقة السقوط شغالة ") 
            notice(" الادةهي "..item_name(kill_item).." يلا روح اقتل وحووش ")
        end
    end
end

طبعا 
 20020 
هذا كود التاجر
             notice(" يلا الحق نفسك مسابقة السقوط شغالة ") 
            notice(" الادةهي "..item_name(kill_item).." يلا روح اقتل وحووش ")
هذا طبعا لما تفعل الحدث وما يشوف انه تفعل من يفوت يظهر له في الشات انه مفعل
طبعا هذا الكويست شامل مختصر كثير بس تحط الكود حتى لو وشاح :) وتحط نسبة السقوط
وشكرا لكم :)