Jump to content
  • 0

Bombring Command


RkD-

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  09/16/18
  • Last Seen:  

Hello

I'm using this Bombring NPC currently, but the command @disablebombring isn't working and i'm can't get it to work. Can someone help?

 

-    script    Bombring    -1,{
OnInit:
    set .eventstarted, 0;
    set $bombring_reward,12256;
    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;
    }
    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 100 CASHPOINTS for participating in this event.";
        set #CASHPOINTS, #CASHPOINTS + 100;
        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 250 CASHPOINTS!";
mes "You have received ^00FF00"+getitemname($bombring_reward)+"^000000!";
set #CASHPOINTS, #CASHPOINTS + 250;
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";
}

 

Edited by Emistry
Please use codebox
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  128
  • Reputation:   53
  • Joined:  06/02/12
  • Last Seen:  

Hi!

Just like you hide the Prontera NPC using hideonnpc when the portal closes, you need to hide the quiz_02 NPC when you end the event.
In the OnGMStop label, change the hideoffnpc to the correct script command. 

hideoffnpc "The Baaam#qz";

Add a mapwarp so players dont get stuck.

mapwarp "<from map>","<to map>",<x>,<y>;

You need to hide her when the event starts too so add the same line to the OnEventStart label.

 

Also:

warp "savepoint",0,0;

savepoint is case sensitive.  Change it to "Save" or "SavePoint".

Edited by Racaae
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

What is not working? Killing the monsters? Map cleaning? Unhiding the npc?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  09/16/18
  • Last Seen:  

Nothing. The command Just isnt doing anything. It os not hidding The npc inside The room, it's not turning The event off. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  09/16/18
  • Last Seen:  

On 1/1/2019 at 3:11 PM, Normynator said:

What is not working? Killing the monsters? Map cleaning? Unhiding the npc?

Would you know The problem? 

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

Well the command UNhides the npc. Because the flow seem to be when the event is stopped by the command the NPC is unhidden so the player can take the reward.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  09/16/18
  • Last Seen:  

I can't fix this yet helppls 

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...