summaryrefslogblamecommitdiff
path: root/npc/commands/debug-quest.txt
blob: f3a51c0b11d6b08d66fe9f97cfa3fa3470503420 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
                                                                                

                                                 










                                                                                                        
                                  



                                



                                                                                      
                               
                                                                                                                                                 





                                                                                                              
                               


                                                                     







                                                        

                           
                                



                    




                                                              







                               
                 







                     
                                                     
 
// TODO: This script must be auto-generated from db/quests.conf to be of any use
function	script	GlobalQuestDebug	{

    function qDebugGeneral {
        do
        {
            clear;
            setnpcdialogtitle l("Quest debug") + " - " + l("Other");
            mes l("This menu gives access to quest debug menus for @@ quests.", strtolower(l("Other")));
            next;
            mes l("Please select a quest:");

            menuint
                menuimage("actions/back", l("Go back")), -1,
                l("Custom"), -136;

            switch (@menuret)
            {
                case -1: return;
                case -136:
                        mes "Determine the quest number, as stated in db/quests.conf";
                        input .@quest;
                        if (!.@quest) return;
                        mes "";
                        mes l("DEBUG: Changing @@, Values: (@@, @@, @@).", getquestlink(.@quest), getq(.@quest), getq2(.@quest), getq3(.@quest));
                        select
                            "set 1",
                            "set 2",
                            "set 3",
                            "reset";
                        mes l("DEBUG: Changing @@ field @@ to something else.", getquestlink(.@quest), @menu);
                        mes "";
                        mes "Determine the new value (numeric only)";
                        input .@value;
                        if (.@value < 0) return;
                        if (@menu == 1)
                            setq1 .@quest, .@value;
                        if (@menu == 2)
                            setq2 .@quest, .@value;
                        if (@menu == 3)
                            setq3 .@quest, .@value;
                        if (@menu == 4)
                            setq .@quest, .@value, 0, 0;

                    return;
                default: return;
            }
        } while (1);
    }

    clear;
    setnpcdialogtitle l("Quest debug");
    mes l("This menu gives access to all quest debug menus.");
    next;
    qDebugGeneral;
}



-	script	@qdebug	32767,{
    end;

OnCall:
    if (!is_gm())
    {
        end;
    }
    GlobalQuestDebug;
    closedialog;
    end;

OnInit:
    bindatcmd "qdebug", "@qdebug::OnCall", 99, 99, 1;
}