Jump to content

Lary

Members
  • Posts

    116
  • Joined

  • Last visited

Posts posted by Lary

  1. Hello rAthena...

     

    This is my Error when no 1 enters LMS - Plz suggest an edit !

     

     [Error]: npc_enable: Attempted to hide a non-existing NPC 'Banker' (flag=0).

     

    My Script:

     

    -    script    LMS#disable    -1,{
    OnInit:
    disablenpc "Mr. Banker";
    enablenpc "Last Man Standing";
    end;
    }
    -    script    LMS    -1,{
    OnClock000:
    OnClock0305:
    OnClock0605:
    OnClock0905:
    OnClock1205:
    OnClock1505:
    OnClock1805:
    OnClock2105:
    goto startlmsevent;
    startlmsevent:
    announce "Mr. Manager: The Last Man Standing event will be starting shortly.",0;
    sleep2 10000;
    announce "Mr. Manager: Those who want to play, please proceed to Maintown.",0;
    sleep2 10000;
    announce "Mr. Manager: After 1 Minute the LMS NPC will close.",0;
    sleep2 10000;
    announce "Mr. Manager: Please go to Maintown now if you want to join.",0;
    enablenpc "Last Man Standing";
    initnpctimer;
    end;
    OnTimer30000:
    announce "Mr. Manager: Last 30 seconds.",0;
    sleep2 5000;
    announce "Mr. Manager: If you want to join go in Maintown.",0;
    end;
    OnTimer50000:
    announce "Mr. Manager: Last 10 seconds.",0;
    end;
    OnTimer55000:
    announce "Mr. Manager: 5.",0;
    end;
    OnTimer56000:
    announce "Mr. Manager: 4.",0;
    end;
    OnTimer57000:
    announce "Mr. Manager: 3.",0;
    end;
    OnTimer58000:
    announce "Mr. Manager: 2.",0;
    end;
    OnTimer59000:
    announce "Mr. Manager: 1.",0;
    end;
    OnTimer60000:
    announce "Mr. Manager: Time's up.",0;
    end;
    OnTimer61000:
    disablenpc "Last Man Standing";
    donpcevent "Mr. Banker::OnEnable";
    stopnpctimer;
    end;
    }
    //---------All Job Registration---------------
    prontera,155,176,5    script    Last Man Standing    488,{
    if( Class == Job_Novice ){
      mes "Novice cant join.";
      close;
    }
    if (ismounting) atcommand "@newmount";
    else if (checkriding()) atcommand "@mount";
    warp "quiz_02",310,267;
    atcommand "@disguise 1163";
    atcommand "@fakename Raydric";
    atcommand "@size 0";
    mes "[Mr. Manager]";
    mes "Hello What can I do for you?";
    next;
    menu "Register",-,"What is LMS?",what,"Leave",leave;
    next;
    mes "[Mr. Manager]";
    mes "Thankyou for registering Mr. " + strcharinfo(0) + ", Have fun!";
    warp "quiz_02",310,267;
    end;
    what:
    mes "[Mr. Manager]";
    mes "LMS is also known as Last Man Standing Event";
    next;
    mes "[Mr. Manager]";
    mes "LMS is also like a PvP.";
    mes "The only difference is at LMS you will get 5 Proof of Donation if you are the Last Man Standing at the arena.";
    next;
    mes "[Mr. Manager]";
    mes "That's all";
    close;
    leave:
    mes "[Mr. Manager]";
    mes "I hope you will register next time";
    close;
    }
    //--------------------------
    //--------------------------
    quiz_02,303,265,6    script    Mr.Banker    56,{
    mes "[ Mr.Banker ]";
    mes "Congrats. You've won.";
    next;
    announce "Mr. Manager: We have a winner! well done "+strcharinfo(0)+".",0;
    getitem 7179, 5; // Change This item id to what ever you want . item id,amount
    getitem 110, 30;
    dispbottom "5 Proof of Donation and 30 Event Coins";
    mes "You will return now";
    warp "phtownall",200,180;
    disablenpc "Mr.    Banker";
    close;
    end;
    OnEnable:
    pvpoff "quiz_02";
    mapannounce "quiz_02","Mr. Manager:The Last Man Standing Event will start shortly",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager:But before we start this is just a few reminders..",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager:Using Cloaking , Hiding is strictly not allowed..",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager: Only the Last Man Standing will win this event!!",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager: What are we waiting for?..Let's Get Ready to Rumble!!...",0;
    sleep2 10000;
    goto L_Start;
    end;
    L_Start:
    if(getmapusers("quiz_02") == 1) goto L_Champ;
    if(getmapusers("quiz_02") == 0) goto L_None;
    if(getmapusers("quiz_02") > 1) {
    mapannounce "quiz_02","Mr. Manager: Get ready at the count of 5 we will start!....",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager: 5",0;
    sleep2 5000;
    mapannounce "quiz_02","Mr. Manager: 4",0;
    sleep2 4000;
    mapannounce "quiz_02","Mr. Manager: 3",0;
    sleep2 3000;
    mapannounce "quiz_02","Mr. Manager: 2",0;
    sleep2 2000;
    mapannounce "quiz_02","Mr. Manager: 1",0;
    sleep2 1000;
    pvpon "quiz_02";
    goto timer;
    end;
    }
    timer:
    initnpctimer;
    end;
    OnTimer1000:
    end;
    OnTimer1100:
    if(getmapusers("quiz_02") == 1) goto L_Champ;
    if(getmapusers("quiz_02") > 2) goto timer;
    if(getmapusers("quiz_02") == 2) goto champ;
    stopnpctimer;
    end;
    champ:
    announce "Mr. Manager: Last 2 Brave warriors are still alive!",0;
    sleep2 10000;
    if(getmapusers("quiz_02") == 1) goto L_Champ;
    if(getmapusers("quiz_02") > 1) goto timer;
    end;
    L_Champ:
    mapannounce "quiz_02","Mr. Banker: Please talk to me to get your prize..",0;
    pvpoff "quiz_02";
    enablenpc "Mr. Banker";
    end;
    L_None:
    disablenpc "Mr. Banker";
    pvpoff "quiz_02";
    end;
    }
    //----- Die = warp prt -----
    - script Killa_warp -1,{
    OnPCDieEvent:
    getmapxy(.@map$,.@x,.@y,0);
    if(.@map$=="quiz_02")
    {
    set #kill_point, 0;
    announce ""+strcharinfo(0)+" died, and out of the game!.",bc_all;
    warp "phtownall",188,188;
    sleep 1;
    atcommand "@raise";
    end;
    }
    OnPCKillEvent:
    getmapxy(.@map$,.@x,.@y,0);
    if(.@map$=="quiz_02")
    {
    set #kill_point,#kill_point+1;
    if ( #kill_point % 4 == 0) {
    announce ""+strcharinfo(0)+" have made 4 Consecutive Kills!!He will be granted an item",bc_all;
    getitem 671, 10;
    getitem 7619, 2;
    getitem 7620, 2;
    end;
    }
    }
    }
    // == Mapflags
    quiz_02 mapflag nowarp
    quiz_02 mapflag nowarpto
    quiz_02 mapflag noteleport
    quiz_02 mapflag nosave
    quiz_02 mapflag nomemo
    quiz_02 mapflag nobranch
    quiz_02 mapflag pvp_noparty
    quiz_02 mapflag restricted 1
    quiz_02 mapflag pvp_noguild
    quiz_02 mapflag nocommand 1
  2. Hello rAthena - Help me with this error on LMS Script...Thanks a million in Advance....

    My Error : ==========================================>

    [Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/LMS.txt', line '1'. Stopping...
    My Script : ===============================>

     

    - script LMS#disable -1,{
    OnInit:
    disablenpc "Mr. Banker";
    enablenpc "Last Man Standing";
    end;
    }
    - script LMS -1,{
    OnClock000:
    OnClock0305:
    OnClock0605:
    OnClock0905:
    OnClock1205:
    OnClock1505:
    OnClock1805:
    OnClock2105:
    goto startlmsevent;
    startlmsevent:
    announce "Mr. Manager: The Last Man Standing event will be starting shortly.",0;
    sleep2 10000;
    announce "Mr. Manager: Those who want to play, please proceed to Maintown.",0;
    sleep2 10000;
    announce "Mr. Manager: After 1 Minute the LMS NPC will close.",0;
    sleep2 10000;
    announce "Mr. Manager: Please go to Maintown now if you want to join.",0;
    enablenpc "Last Man Standing";
    initnpctimer;
    end;
    OnTimer30000:
    announce "Mr. Manager: Last 30 seconds.",0;
    sleep2 5000;
    announce "Mr. Manager: If you want to join go in Maintown.",0;
    end;
    OnTimer50000:
    announce "Mr. Manager: Last 10 seconds.",0;
    end;
    OnTimer55000:
    announce "Mr. Manager: 5.",0;
    end;
    OnTimer56000:
    announce "Mr. Manager: 4.",0;
    end;
    OnTimer57000:
    announce "Mr. Manager: 3.",0;
    end;
    OnTimer58000:
    announce "Mr. Manager: 2.",0;
    end;
    OnTimer59000:
    announce "Mr. Manager: 1.",0;
    end;
    OnTimer60000:
    announce "Mr. Manager: Time's up.",0;
    end;
    OnTimer61000:
    disablenpc "Last Man Standing";
    donpcevent "Mr. Banker::OnEnable";
    stopnpctimer;
    end;
    }
    //---------All Job Registration---------------
    phtownall,194,184,5 script Last Man Standing 488,{
    if( Class == Job_Novice ){
    mes "Novice cant join.";
    close;
    }
    if (ismounting) atcommand "@newmount";
    else if (checkriding()) atcommand "@mount";
    warp "quiz_02",310,267;
    atcommand "@disguise 1163";
    atcommand "@fakename Raydric";
    atcommand "@size 0";
    mes "[Mr. Manager]";
    mes "Hello What can I do for you?";
    next;
    menu "Register",-,"What is LMS?",what,"Leave",leave;
    next;
    mes "[Mr. Manager]";
    mes "Thankyou for registering Mr. " + strcharinfo(0) + ", Have fun!";
    warp "quiz_02",310,267;
    end;
    what:
    mes "[Mr. Manager]";
    mes "LMS is also known as Last Man Standing Event";
    next;
    mes "[Mr. Manager]";
    mes "LMS is also like a PvP.";
    mes "The only difference is at LMS you will get 5 Proof of Donation if you are the Last Man Standing at the arena.";
    next;
    mes "[Mr. Manager]";
    mes "That's all";
    close;
    leave:
    mes "[Mr. Manager]";
    mes "I hope you will register next time";
    close;
    }
    //--------------------------
    //--------------------------
    quiz_02,303,265,6 script Mr. Banker 56,{
    mes "[Banker]";
    mes "Congrats. You've won.";
    next;
    announce "Mr. Manager: We have a winner! well done "+strcharinfo(0)+".",0;
    getitem 7179, 5; // Change This item id to what ever you want . item id,amount
    getitem 110, 30;
    dispbottom "5 Proof of Donation and 30 Event Coins";
    mes "You will return now";
    warp "phtownall",200,180;
    disablenpc "Mr. Banker";
    close;
    end;
    OnEnable:
    pvpoff "quiz_02";
    mapannounce "quiz_02","Mr. Manager:The Last Man Standing Event will start shortly",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager:But before we start this is just a few reminders..",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager:Using Cloaking , Hiding is strictly not allowed..",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager: Only the Last Man Standing will win this event!!",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager: What are we waiting for?..Let's Get Ready to Rumble!!...",0;
    sleep2 10000;
    goto L_Start;
    end;
    L_Start:
    if(getmapusers("quiz_02") == 1) goto L_Champ;
    if(getmapusers("quiz_02") == 0) goto L_None;
    if(getmapusers("quiz_02") > 1) {
    mapannounce "quiz_02","Mr. Manager: Get ready at the count of 5 we will start!....",0;
    sleep2 10000;
    mapannounce "quiz_02","Mr. Manager: 5",0;
    sleep2 5000;
    mapannounce "quiz_02","Mr. Manager: 4",0;
    sleep2 4000;
    mapannounce "quiz_02","Mr. Manager: 3",0;
    sleep2 3000;
    mapannounce "quiz_02","Mr. Manager: 2",0;
    sleep2 2000;
    mapannounce "quiz_02","Mr. Manager: 1",0;
    sleep2 1000;
    pvpon "quiz_02";
    goto timer;
    end;
    }
    timer:
    initnpctimer;
    end;
    OnTimer1000:
    end;
    OnTimer1100:
    if(getmapusers("quiz_02") == 1) goto L_Champ;
    if(getmapusers("quiz_02") > 2) goto timer;
    if(getmapusers("quiz_02") == 2) goto champ;
    stopnpctimer;
    end;
    champ:
    announce "Mr. Manager: Last 2 Brave warriors are still alive!",0;
    sleep2 10000;
    if(getmapusers("quiz_02") == 1) goto L_Champ;
    if(getmapusers("quiz_02") > 1) goto timer;
    end;
    L_Champ:
    mapannounce "quiz_02","Mr. Banker: Please talk to me to get your prize..",0;
    pvpoff "quiz_02";
    enablenpc "Mr. Banker";
    end;
    L_None:
    disablenpc "Banker";
    pvpoff "quiz_02";
    end;
    }
    //----- Die = warp prt -----
    - script Killa_warp -1,{
    OnPCDieEvent:
    getmapxy(.@map$,.@x,.@y,0);
    if(.@map$=="quiz_02")
    {
    set #kill_point, 0;
    announce ""+strcharinfo(0)+" died, and out of the game!.",bc_all;
    warp "phtownall",188,188;
    sleep 1;
    atcommand "@raise";
    end;
    }
    OnPCKillEvent:
    getmapxy(.@map$,.@x,.@y,0);
    if(.@map$=="quiz_02")
    {
    set #kill_point,#kill_point+1;
    if ( #kill_point % 4 == 0) {
    announce ""+strcharinfo(0)+" have made 4 Consecutive Kills!!He will be granted an item",bc_all;
    getitem 671, 10;
    getitem 7619, 2;
    getitem 7620, 2;
    end;
    }
    }
    }
    // == Mapflags
    quiz_02 mapflag nowarp
    quiz_02 mapflag nowarpto
    quiz_02 mapflag noteleport
    quiz_02 mapflag nosave
    quiz_02 mapflag nomemo
    quiz_02 mapflag nobranch
    quiz_02 mapflag pvp_noparty
    quiz_02 mapflag restricted 1
    quiz_02 mapflag pvp_noguild
    quiz_02 mapflag nocommand 1
    
  3. Hello rAthena, Here is my script which ain't working - Plz help me to fix this PVP DOta Announcer !

    prontera,162,190,4    script    PvPLadder    416,{
        set @ctr,0;
        query_sql("select char_id,pvp_kills,pvp_deaths,char_name from `"+$@pvpsystable$+"` ORDER BY `pvp_kills`  DESC  LIMIT 100", @charid, @kills, @deaths,@names$);
        
        if(getarraysize(.charid))
        {
            mes .name$;
            mes "No entries found.";
                close;
        }
        
        while(@ctr<getarraysize(@charid))
        {
            mes .name$;
            mes "#    KILLS    DEATHS    NAME";
            set @start,@ctr;
            while((@ctr<@start+10) && @charid[@ctr])
            {
                mes (@ctr+1)+"    "+@kills[@ctr]+"    "+@deaths[@ctr]+"    "+@names$[@ctr];
                set @ctr,@ctr+1;
            
            }
            next;
        }
        
        mes .name$;
        mes "You reached the end of the list.";
        close;
    OnInit:
        set .name$,"[PvP Ladder]";
    end;
    }
    
    
    -    script    PvPCounter    -1,{
    OnPCKillEvent:
        if($pvpsyson)
        {
            if(getcharid(0)!=killedrid)
            {
                set @contains,0;
                for(set @x,0; @x<getarraysize(@killedID); set @x,@x+1)
                {
                    if(getcharid(0)==@killedID[@x])
                    {
                        set @contains,1;
                        break;
                    }
                }
                
                if(!@contains)
                {
                    set @pvppoint,rand(1,3);
                    set @pvpkills,@pvpkills+1;
                    dispbottom "Total PvP Points: "+@pvpkills;
                    set @killedID[killCTR],killedrid;
                    set killCTR,killCTR+1;
                    if(killCTR>=$pvpMaxKillCache) set killCTR,0;
                    set @streak,@streak+1;
                    set @multikillCTR,@multikillCTR+1;
                    if(!@multikill)
                    {
                        deltimer "PvPMultiKillTrigger";
                        addtimer 13500,"PvPCounter::OnMultiKillTrigger";
                        set @multikill,1;
                    }
                    else
                    {
                        switch(@multikillCTR)
                        {
                            case 1:
                                break;
                            case 2:
                                announce strcharinfo(0)+" just got a Double Kill on "+strcharinfo(3),bc_blue|bc_all;
                                soundeffectall "Double_Kill.wav",0;
                                set @streak$,"DoubleKill";
                                break;
                            case 3:
                                announce strcharinfo(0)+" just got a Triple Kill on "+strcharinfo(3),bc_blue|bc_all;
                                soundeffectall "triple_kill.wav",0;
                                set @streak$,"TripleKill";
                                break;
                            default:
                                announce strcharinfo(0)+" just got a Triple Kill on "+strcharinfo(3),bc_blue|bc_all;
                                soundeffectall "triple_kill.wav",0;
                                set @streak$,"TripleKill";
                                break;
                        }
                    }
                    
                    switch(@streak)
                    {
                        case 1:
                            mapannounce strcharinfo(3), strcharinfo(0)+" just drew First blood!",bc_map,"0xFFCE00";
                            soundeffect "firstblood.wav",0;
                            break;
                        case 2:
                            break;
                        case 3:
                            mapannounce strcharinfo(3), strcharinfo(0)+"  is on a Killings Spree!",bc_map,"0xFFCE00";
                            soundeffect "Killing_Spree.wav",0;
                            set @streak$,"KillSpree";
                            break;
                        case 4:
                            mapannounce strcharinfo(3), strcharinfo(0)+"  is Dominating",bc_map,"0xFFCE00";
                            soundeffect "Dominating.wav",0;
                            set @streak$,"Dominating";
                            break;
                        case 5:
                            mapannounce strcharinfo(3), strcharinfo(0)+"  is Mega Kill!",bc_map,"0xFFCE00";
                            soundeffect "MegaKill.wav",0;
                            set @streak$,"MegaKill";
                            break;
                        case 6:
                            mapannounce strcharinfo(3), strcharinfo(0)+"  is Unstoppable!",bc_map,"0xFFCE00";
                            soundeffect "Unstoppable.wav",0;
                            set @streak$,"Unstoppable";
                            break;
                        case 7:
                            mapannounce strcharinfo(3), strcharinfo(0)+"  is Wicked Sick!",bc_map,"0xFFCE00";
                            soundeffect "WhickedSick.wav",0;
                            set @streak$,"WhickedSick";
                            break;
                        case 8:
                            mapannounce strcharinfo(3), strcharinfo(0)+"  is Monster Kill!",bc_map,"0xFFCE00";
                            soundeffect "monster_kill.wav",0;
                            set @streak$,"MonsterKill";
                            break;
                        case 9:
                            mapannounce strcharinfo(3), strcharinfo(0)+"  is God Like!",bc_map,"0xFFCE00";
                            soundeffect "GodLike.wav",0;
                            set @streak$,"GodLike";
                            break;
                        case 10:
                            mapannounce strcharinfo(3), strcharinfo(0)+" is Beyond Godlike! Somebody kill him!",bc_map,"0xFFCE00";
                            soundeffect "HolyShit.wav",0;
                            set @streak$,"HolyShit";
                            break;
                        default:
                            mapannounce strcharinfo(3), strcharinfo(0)+" is Beyond Godlike! Somebody kill him!",bc_map,"0xFFCE00";
                            soundeffect "HolyShit.wav",0;
                            set @streak$,"Beyond Godlike";
                            break;
                    }
                    set @streak,@streak+1;
                    mapannounce strcharinfo(3), strcharinfo(0)+" just pawned "+rid2name(killedrid)+" for "+@pvppoint+" Cash Points.",bc_map,"0xFFCE00";
                    set #CASHPOINTS,#CASHPOINTS+@pvppoint;
                }
            }
        }
        end;
    OnPCDieEvent:
        if($pvpsyson)
        {
            set @pvpdeaths,@pvpdeaths+1;
            set @streak,0;
        }
        end;
    OnPCLoginEvent:
        if($pvpsyson)
        {
            query_sql("select pvp_kills,pvp_deaths from `"+$@pvpsystable$+"` WHERE `char_id`="+getcharid(0)+";", @pvpkills, @pvpdeaths);
            dispbottom "Total PvP Points: "+@pvpkills;
            set @streak,0;
            set @streak$,"None";
            set @multikill,0;
            set @multikillCTR,0;
        }
        end;
    OnPCLogoutEvent:
        if($pvpsyson)
        {
            query_sql("INSERT INTO `"+$@pvpsystable$+"` (char_id,pvp_kills,pvp_deaths,char_name,streak) VALUES ("+getcharid(0)+","+@pvpkills+","+@pvpdeaths+",'"+strcharinfo(0)+"','None') ON DUPLICATE KEY UPDATE pvp_kills="+@pvpkills+",pvp_deaths="+@pvpdeaths+",streak='"+@streak$+"';");
        }
        end;
    OnMultiKillTrigger:
        set @multikill,0;
        set @multikillCTR,0;
    end;
    }
    
    
    
    
    -    script    PvPSystem    -1,{
    //Initialize Settings here
    OnInit:
        set $@pvpsystable$,"npc_pvpsys"; //SQL Table Name
    end;
    
    
    OnWhisperGlobal:
        if(getgmlevel()>=60)
        {
            mes "[PVP System]";
            mes "Configuration Menu";
            switch(select("Execute SQL Tables:Reset Tables:Turn On:Turn Off"))
            {
                case 1:
                    query_sql "CREATE TABLE  `"+$@pvpsystable$+"` (`char_id` INT NOT NULL ,`pvp_kills` INT NOT NULL ,`pvp_deaths` INT NOT NULL, `char_name` varchar(20) NOT NULL, `streak` varchar(15) NOT NULL,PRIMARY KEY (  `char_id`) )";
                    // Players
                    set $pvpsyson,1;
                    set $pvpMaxKillCache,5;
                    break;
                    
                case 2:
                    query_sql "DROP TABLE `"+$@pvpsystable$+"`;";
                    query_sql "CREATE TABLE  `"+$@pvpsystable$+"` (`char_id` INT NOT NULL ,`pvp_kills` INT NOT NULL ,`pvp_deaths` INT NOT NULL ,`char_name` varchar(20) NOT NULL ,`streak` varchar(15) NOT NULL,PRIMARY KEY (  `char_id` ) )";
                    break;
                case 3:
                    set $pvpsyson,1;
                    break;
                case 4:
                    set $pvpsyson,0;
                    break;
            }
            close;
        }
        else
        {
            if(@whispervar0$=="showpoints")
            {
                dispbottom "Total PvP Points: "+@pvpkills;
                dispbottom "Total Deaths: "+@pvpdeaths;
            }
        }
        end;
    } 
    
×
×
  • Create New...