Jump to content
  • 0

Bombring Event Problems Please Help


Brahms

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  149
  • Reputation:   3
  • Joined:  07/29/16
  • Last Seen:  

Quote

 

-    script    Bombring    -1,{
OnInit:
    set .eventstarted, 0;
    set $bombring_reward,21020;
    bindatcmd "enablebombring","Bombring::OnGMStart";
    bindatcmd "disablebombring","Bombring::OnGMStop";
    hideonnpc "The Baaam#qz";
    hideonnpc "The Baaam#prt";
    end;
    
OnGMStart:
    if (getgroupid() < 99){
        dispbottom "You are not eligible for this command.", RED;
        end;
    }
OnClock0535:
OnClock0225:
OnClock0825:
OnClock1425:
    set .eventstarted, 0;
OnEventStart:
    initnpctimer;
    hideoffnpc "The Baaam#prt";
    set .x, 5;
OnTimer0000:
    if (.eventstarted == 1) 
        end;
    announce "The Baaam: The bombring event has started!",bc_all;
    announce "The Baaam: Come to prontera and talk to me to join!",bc_all;
    announce "The Baaam: "+.x+" minutes remaining before it starts!",bc_all;
    set .x, .x - 1;
    end;
OnTimer60000:
OnTimer120000:
OnTimer180000:
OnTimer240000:
    if (.eventstarted == 1) 
        end;
    announce "The Baaam: "+.x+" minutes remaining before the bombring event starts!",bc_all;
    set .x, .x - 1;
    end;
OnTimer290000:
    if (.eventstarted == 1) 
        end;
    announce "The Baaam: 10 seconds before the bombring event starts!",bc_all;
    end;
OnTimer300000:
    if (.eventstarted == 1) 
        end;
    set .totalplayers, getmapusers ("quiz_02");
    announce "The Baaam: "+.totalplayers+" players joined!",bc_all;
    announce "The Baaam: The bombring even has started! Ciao!",bc_all;
    hideonnpc "The Baaam#prt";
    stopnpctimer;
    callsub OnEventStart1;
    end;
    
OnEventStart1:
    set .totalplayers, getmapusers ("quiz_02");
    mapannounce "quiz_02","The Baaam: Okay listen up, this is how it works.",bc_all;
    sleep 2000;
    mapannounce "quiz_02","The Baaam: Bombrings will run rampant in this area.",bc_all;
    sleep 2000;
    mapannounce "quiz_02","The Baaam: and all of them will go booooooom!",bc_all;
    sleep 2000;
    mapannounce "quiz_02","The Baaam: all you have to do is avoid them and stay alive :P",bc_all;
    sleep 2000;
    mapannounce "quiz_02","The Baaam: This will run for 30 seconds for 5 total rounds.",bc_all;
    sleep 2000;
    mapannounce "quiz_02","The Baaam: Sooooooooooo, ready or not here they come!!!", bc_all;
    
    for (set .round,1;.round <= 5;set .round, .round + 1) {
        set .totalplayers, getmapusers ("quiz_02");
        callsub OnBombringSummon;
        sleep 10000;
    }

    if (.round > 5 && getmapusers("quiz_02") > 0){
        hideoffnpc "The Baaam#qz";
        mapannounce "quiz_02","The Baaam: Wooooow! That's rare! People won! :D",bc_all;
    }
    end;
        
OnBombringSummon:
    mapannounce "quiz_02","The Baaam: Round "+.round+"!!",bc_all;
    set .eventstarted, 1;
    initnpctimer;
    while (.eventstarted == 1) {
        if ( (3 * .totalplayers) <= 60)
            areamonster "quiz_02",48,334,71,357,"Run for you life!",1904,3 * .totalplayers;
        else
            areamonster "quiz_02",48,334,71,357,"Run for you life!",1904,60;
        
        if(.round == 1) {
            sleep 4000;
        } else if (.round == 2) {
            sleep 3000;
        } else if (.round == 3) {
            sleep 2000;
        } else if (.round == 4) {
            sleep 1500;
        } else if (.round == 5) {
            sleep 1000;
        }
    }
    if (.eventstarted == 1)
        mapannounce "quiz_02","The Baaam: Round "+.round+" has finished!!",bc_all;
    if (.round < 5)
        mapannounce "quiz_02","The Baaam: Next round in 10 seconds.",bc_all;
    return;
    
OnTimer31000:
    if (.eventstarted == 0)
        end;
    else
        set .eventstarted, 0;
        killmonsterall "quiz_02";
        cleanmap "quiz_02";
    stopnpctimer;
    end;
    
OnPCDieEvent:
    if (strcharinfo(3) == "quiz_02") {
        mapannounce "quiz_02","The Baaam: "+strcharinfo(0)+" has been blown up!!",bc_all;
        dispbottom "You have received 5 CASHPOINTS for participating in this event.";
        set #CASHPOINTS, #CASHPOINTS + 5;
        warp "savepoint",0,0;
        if (getmapusers("quiz_02") <= 1) {
            stopnpctimer;
            set .eventstarted, 0;
            set .round, 6;
            killmonsterall "quiz_02";
            cleanmap "quiz_02";
            hideoffnpc "The Baaam#qz";
            mapannounce "quiz_02","The Baaam: Alright! We have a winner!!",bc_all;
        }     
    }
    end;
    
OnGMStop:
    set .eventstarted, 0;
    set .round, 6;
    killmonsterall "quiz_02";
    cleanmap "quiz_02";
    hideoffnpc "The Baaam#qz";    
    end;
}

quiz_02,59,345,5    script    The Baaam#qz    856,{
mes "[The Baaam]";
mes "Ha! You were really good back there!";
mes "Here's a token for entertaining me.";
next;
mes "^00FF00You Received 10 CASHPOINTS!";
mes "You have received ^00FF00"+getitemname($bombring_reward)+"^000000!";
set #CASHPOINTS, #CASHPOINTS + 10;
getitem $bombring_reward,1;
next;
mes "[The Baaam]";
mes "Now get out of here before I make you explode!";
next;
atcommand "@go 0";
end;
}

prontera,153,182,5    script    The Baaam#prt    879,{
mes "[The Baaam]";
mes "Hi! Wanna join the Bombring event?";
Switch(Select("Yes!:What is it about?:Nah, not interested.")) {
    case 1:
        mes "[The Baaam]";
        mes "Alright! Get ready!";
        next;
        warp "quiz_02",59,345;    
        break;
    case 2:
        mes "[The Baaam]";
        mes "Well all you have to do is stay alive.";
        mes "That is by dodging exploding ^00FF00Bombrings^000000!";
        next;
        mes "[The Baaam]";
        mes "If you win, you will get:";
        mes "1x ^00FF00250 CASHPOINTS^000000!";
        mes "1x ^00FF00"+getitemname($bombring_reward)+"^000000!";
        close;
        break;
    case 3:
        mes "[The Baaam]";
        mes "Alright, see you around!";
        close;
        break;
    }
end;

OnInit:
    hideonnpc "The Baaam#prt";
}

quiz_02    mapflag Nowarpto
quiz_02    mapflag Nodrop
quiz_02    mapflag Nomobloot
quiz_02    mapflag Noskill
quiz_02    mapflag NoSave    

 

Here's my bombring event script.. my problem is when someone die for every round this error shows in my map server console.. can anyone here help me to solve this problem??

Thank you in advance...

Kindly see the screenshots below for my map server errors...

Bombring.PNG

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

41 minutes ago, Brahms said:

Here's my bombring event script.. my problem is when someone die for every round this error shows in my map server console.. can anyone here help me to solve this problem??

Thank you in advance...

Kindly see the screenshots below for my map server errors...

Bombring.PNG

Change 

warp "savepoint",0,0; 
to

warp "SavePoint",0,0; 
 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  149
  • Reputation:   3
  • Joined:  07/29/16
  • Last Seen:  

Thank you for this.. im going to try it once i get home.. :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...