Jump to content
  • 0
almarket23

Need script for this. Please help

Question

Hi everyone...

 

Does anyone know how to do this?

 

Green Area = where only GM's can stay and watched the Players.

Orange Area = Normal Players can stay

Red Area = where dead players teleported and be resurrected

Black Lines = Non walkable area

 

post-9806-0-72906900-1435725287_thumb.png

 

Heres the things that I want:

 

In the green Area only the GM's can stay and watch all the players playing the event.

 

 

 

the player will speak to the npc in prontera to join the event and they will be teleported to the event area in which they will be landed randomly in the orange area.

 

before the event start, the script will count all the players that is standing in the orange area. If there is only 1 player standing in the orange area the event will be halted and that player will be warp back to prontera. But if there's more than 1 player standing in the orange area the event will start. And after that theirs a monster that will appear and the players need to flee from the monster. once the player was killed by the monster they will be teleported randomly to the red area in which that player will be resurrected so that they can watch the game. Once there is only 1 player left in the orange area that player will receive a prize automatically.

 

the game will have 2 rounds. In the 2nd round all the players that are standing in the red area will be teleported randomly to the orange area again and the last round will begin and the process will be the same. Once theirs a winner in the last round the winning player will receive a prize and and all the players standing in the red and orange area will be teleported back to prontera.

Share this post


Link to post
Share on other sites

14 answers to this question

Recommended Posts

  • 0

@@Aeromesi

 

no sir. this is just a simple script that will count the players in the orange area. I know how to do the getareausers commands or getmapusers but if I do that the GM that is in the green area will be counted as well which the GM should not be counted by the script. I find a script same as what I want here before but I cant find it anymore now. maybe it was deleted or something..

 

Please help guys..

Share this post


Link to post
Share on other sites
  • 0

For the black walls you should probably use setwall, or alter the map in browedit if you'll be using it only for the event.

 

About counting players just use getareausers (rectangle around orange area) - getareausers (rectangle around green area).

 

If you want a full script you'd need to provide more info, like rectangle corners coords, map that the event will run on and so on and so forth.

Edited by Garr

Share this post


Link to post
Share on other sites
  • 0

@@Garr

 

this is the coordinates of the Green Area 46,53,53,46

this is the coordinates of the Orange Area 36,63,63,36

this is the coordinates of the Red Area 28,71,71,28

 

so in order for me to count the players inside the orange area. should it be like this? Please correct me if Im wrong.

 

getareausers("<mapname>",46,53,53,46) - getareausers("<mapname>",36,63,63,36)

 

is this correct?

 

And what about the players killed by the monster in the orange area? how can they be teleported to the red area and be resurrected?



@Garr

 

Im almost done doing this event. theres only one last problem.. how can you able to give a prize to the last player standing in the orange area automatically? Please help out with this last problem..

Share this post


Link to post
Share on other sites
  • 0

The other way around.

By the coords you gave me ( I assume that x,y coords for lower left corner of green area is 46,46, upper right 53,53. For orange area 36,36 and 63,63 respectively)

getareausers( "map",36,36,63,63) - getareausers( "map",46,46,53,53)

As in you deduce GMs (green area, 2nd getareausers) from all the players inside orange area + green area (1st getareausers).

In getareausers I prefer lower left and upper right corners (not sure if it can be the other way, never really tried), so I use the command like this:

getareausers( "mapname", lower left corner x, lower left corner y, upper right corner x, upper right corner y)

Just so you can check that both x and y are increasing and you're actually getting the right area :P

 

To check for dead players you'd want to trigger an event:

OnPCDieEvent:This special label triggers when a player dies. The variable 'killerrid' is set to the ID of the killer.

Just don't forget to limit it only to the players you want it triggered on, since it'll trigger FOR EVERY DEATH EVER.

Usually limits include checking if the person is on the right map, has needed variables on him (or some global event variabe is set), and I'd exclude GMs from this as well even if they fall under both previous conditions.

Share this post


Link to post
Share on other sites
  • 0

@Garr

 

Im almost done doing this event. theres only one last problem.. how can you able to give a prize to the last player standing in the orange area automatically? Please help out with this last problem..



 hello??? anyone please help me with this one last problem to finish the event the I am doing..

Share this post


Link to post
Share on other sites
  • 0

@Garr

 

Im almost done doing this event. theres only one last problem.. how can you able to give a prize to the last player standing in the orange area automatically? Please help out with this last problem.. hello??? anyone please help me with this one last problem to finish the event the I am doing..

Count users with getareausers.

If its 1, enable the npc on that location and announce on area, to talk to npc to get Prize. So , once prize is taken, warp all of them out of map.

Share this post


Link to post
Share on other sites
  • 0

this event consist of 2 to 3 rounds. the  last player standing in the orange area will get the prize automatically without talking to any NPC. so that another round will begin. same process again

Share this post


Link to post
Share on other sites
  • 0

this event consist of 2 to 3 rounds. the  last player standing in the orange area will get the prize automatically without talking to any NPC. so that another round will begin. same process again

Hmm.. Then you have to store account Id of each player into npc variable, and remove them as they die off, when one player is remaining , his account Id is in npc variable, just use attachrid, give item, and continue.(AFAIK, there's no area item commands)

Share this post


Link to post
Share on other sites
  • 0

When they register you can stash their variables into an array, I usually get both aid and cid just incase, and to check if player changed chars and *somehow* got back.

 

Once they die you delete player from the array you created, or a copy of it if you want to keep it for some reason (like you know your players won't bail out of event and want to keep array), or if they die you delete them from copy of array, and if they log out you delete them from both arrays.

 

Another way is to use this awesome command and get player aids from within the area, and check them for being with GM commands, first one within the area that doesn't have (or has very low) GM level is the one we seek.

 

Hmm. I also have one weird idea, it might work, but I'm not really sure on few moments. I'll check it out and get back on that.

Edited by Garr

Share this post


Link to post
Share on other sites
  • 0

OKay Okay.. I surrender. This is the script that I am using and I quite modify this one. This is a Dice Event that I just change in a different way, specially the location.

 

prontera,141,174,4	script	Dice Event	4W_M_01,{            .@deName$ = "[^FF0000Dice Event^000000]";        .@menu$ = "Join the event:Cancel";    if (getgmlevel() >= .gmsetting) {        .@menu$ =  .@menu$ + ":Start Event";    }    switch(select(.@menu$)){                case 1:		            if ( .dEstart == 1 ) {			$@area = rand (1,4);			if ( $@area == 1 ) warp "dice",49,59; 			if ( $@area == 2 ) warp "dice",59,49; 			if ( $@area == 3 ) warp "dice",49,40; 			if ( $@area == 4 ) warp "dice",40,50; 			if (getgmlevel() >= .gmsetting ) warp "dice",49,49;			set .player$,strcharinfo(0);			set .winner$,getcharid(3);                end;            }            else if ( .dEstart == 2 ) {            mes .@deName$;            mes "Too late, the event has already started";            close;            }            mes .@deName$;            mes "No Event right now";            close;                    case 2:            end;                    case 3:            mes .@deName$;            mes "start the event";            donpcevent strnpcinfo(0)+"::OnStart";            close;    }OnStart:    .dEstart = 1;    announce "Dice Event: We are going to have a Dice Event",bc_all,0xFF7F50;    sleep 1 * .seconds;    announce "Dice Event: For those who want to join, please meet me @ the MARKET Place right side.",bc_all,0xFF7F50; //Edit to where would you place the warper    sleep 1 * .seconds;    announce "Dice Event: The Warper would be open for 1 minute",bc_all,0xFF7F50;    sleep 30 * .seconds;    announce "Dice Event: Last 30 Seconds.",bc_all,0xFF7F50;    sleep 30 * .seconds;OnEnable:    if((getareausers("dice",36,63,63,36)) - (getareausers("dice",46,53,53,46))== 1 ){    mapannounce "dice","Dice: The Game will start minimum of TWO player...",bc_all,0xFF7F50;    sleep 5 * .seconds;    announce "Dice Event: Last Call. We are waiting for another challenger..",bc_all,0xFF7F50;    sleep 10 * .seconds;    announce "Dice Event: For those who want to join, please meet me @ the MARKET Place right side.",bc_all,0xFF7F50; //Edit to where would you place the warper    sleep 20 * .seconds;    announce "Dice Event: The Warper would be open for 1 minute",bc_all,0xFF7F50;    sleep 30 * .seconds;    announce "Dice Event: Last 30 Seconds.",bc_all,0xFF7F50;    sleep 30 * .seconds;    announce "Dice Event: Warper Closed.",bc_all,0xFF7F50;    sleep 5 * .seconds;    if((getareausers("dice",36,63,63,36)) - (getareausers("dice",46,53,53,46)) == 1 ){        mapannounce "dice","Dice: The Dice event is HALTED...",bc_all,0xFF7F50;		sleep 5 * .second;        areawarp "dice",36,63,43,56,"prontera",156,191;		areawarp "dice",44,63,55,56,"prontera",156,191;		areawarp "dice",56,63,63,56,"prontera",156,191;		areawarp "dice",63,55,56,44,"prontera",156,191;				areawarp "dice",63,43,56,36,"prontera",156,191;		areawarp "dice",55,36,44,43,"prontera",156,191;		areawarp "dice",43,36,36,43,"prontera",156,191;		areawarp "dice",36,44,43,55,"prontera",156,191;        end;            }    }	    .dEstart = 2;    mapannounce "dice","Dice: We are about to start the Dice event.",0;sleep2 10000;    mapannounce "dice","Dice: But before we start the event here's how to play the game. . .",0;sleep2 10000;    mapannounce "dice","Dice: I'm only gonna say this once so read carefully.",0;sleep2 10000;    mapannounce "dice","Dice: I'm going to pick a number, 1 to 4. Then I'll do a count down from 5 to 0.",0;sleep2 10000;    mapannounce "dice","Dice: All you have to do is go to the box of the number you want.",0;sleep2 10000;    mapannounce "dice","Dice: Example, If I get the number of 4, All the players standing on number 4 will be out.",0;sleep2 10000;    mapannounce "dice","Dice: We will do it again and again until we only have 1 player left on the map.",0;sleep2 10000;    mapannounce "dice","Dice: Oh yeah! Before I forget you MUST GO INSIDE THE BOX, because if you're caught standing outside the box you'll be automatically disqualified.",0;sleep2 10000;    mapannounce "dice","Dice: That's it.. Now let's play...",0;sleep2 10000;    goto L_Start;end; L_Start:    if((getareausers("dice",36,63,63,36)) - (getareausers("dice",46,53,53,46)) == 1 ) goto L_Champ;    if((getareausers("dice",36,63,63,36)) - (getareausers("dice",46,53,53,46)) == 0) goto L_None;    if((getareausers("dice",36,63,63,36)) - (getareausers("dice",46,53,53,46)) > 1) {    announce "Dice: . . . . .",0;    $@number = rand(1,4);sleep2 10000;    announce "Dice: I have a number now. Please go to the box of the number you want.... GO!",0;sleep2 10000;    announce "Dice: 5",0;sleep2 5000;    announce "Dice: 4",0;sleep2 4000;    announce "Dice: 3",0;sleep2 3000;    announce "Dice: 2",0;sleep2 2000;    announce "Dice: 1",0;sleep2 1000;    announce "Dice: Time's up.",0;    donpcevent "evnt#1::OnEnable";    announce "Dice: Losing number "+$@number+".",0;    if( $@number == 1 ) goto L_Lose1;    if( $@number == 2 ) goto L_Lose2;    if( $@number == 3 ) goto L_Lose3;    if( $@number == 4 ) goto L_Lose4;    end;} L_Lose1:    monster "dice",37,62,"Detonator",3931,1;    monster "dice",42,62,"Detonator",3931,1;    monster "dice",37,57,"Detonator",3931,1;	monster "dice",42,57,"Detonator",3931,1;	sleep2 5000;	areawarp "dice",36,63,43,56,"dice",50,66;	recovery 3,"dice";    .dEstart = 0;    goto L_Start;end; L_Lose2:    monster "dice",57,62,"Detonator",3931,1;    monster "dice",62,62,"Detonator",3931,1;    monster "dice",57,57,"Detonator",3931,1;	monster "dice",62,57,"Detonator",3931,1;	sleep2 5000;	areawarp "dice",56,63,63,56,"dice",50,66;	recovery 3,"dice";    .dEstart = 0;    goto L_Start;end; L_Lose3:    monster "dice",57,42,"Detonator",3931,1;    monster "dice",62,42,"Detonator",3931,1;    monster "dice",57,37,"Detonator",3931,1;	monster "dice",62,37,"Detonator",3931,1;	sleep2 5000;	areawarp "dice",56,43,63,36,"dice",50,66;	recovery 3,"dice";    .dEstart = 0;    goto L_Start;end; L_Lose4:    monster "dice",37,42,"Detonator",3931,1;    monster "dice",42,42,"Detonator",3931,1;    monster "dice",37,37,"Detonator",3931,1;	monster "dice",42,37,"Detonator",3931,1;	sleep2 5000;	areawarp "dice",36,43,43,36,"dice",50,66;	recovery 3,"dice";    .dEstart = 0;    goto L_Start;end; L_Champ:    mapannounce "dice","Dice: We have a winner. "+.player$+" wins the Dice Event.",0;	getitem 505,10,.winner$;	mapannounce "dice","Dice: Thank you for playing the Dice Event.",0;	sleep2 2000;	areawarp "dice",28,71,71,64,"prontera",156,182;	areawarp "dice",71,63,64,28,"prontera",156,182;	areawarp "dice",63,28,28,35,"prontera",156,182;	areawarp "dice",28,36,34,63,"prontera",156,182;		areawarp "dice",36,63,43,56,"prontera",156,182;	areawarp "dice",44,63,55,56,"prontera",156,182;	areawarp "dice",56,63,63,56,"prontera",156,182;	areawarp "dice",63,55,56,44,"prontera",156,182;			areawarp "dice",63,43,56,36,"prontera",156,182;	areawarp "dice",55,36,44,43,"prontera",156,182;	areawarp "dice",43,36,36,43,"prontera",156,182;	areawarp "dice",36,44,43,55,"prontera",156,182;    end; L_None:    announce "No One Wins the Dice Event. Thank you for playing this Event.",0;    sleep2 2000;	areawarp "dice",28,71,71,64,"prontera",156,182;	areawarp "dice",71,63,64,28,"prontera",156,182;	areawarp "dice",63,28,28,35,"prontera",156,182;	areawarp "dice",28,36,34,63,"prontera",156,182;		areawarp "dice",36,63,43,56,"prontera",156,182;	areawarp "dice",44,63,55,56,"prontera",156,182;	areawarp "dice",56,63,63,56,"prontera",156,182;	areawarp "dice",63,55,56,44,"prontera",156,182;			areawarp "dice",63,43,56,36,"prontera",156,182;	areawarp "dice",55,36,44,43,"prontera",156,182;	areawarp "dice",43,36,36,43,"prontera",156,182;	areawarp "dice",36,44,43,55,"prontera",156,182;    end;    OnInit:    .gmsetting = 60; // in which level the GMs can control this event ?        .seconds = 1000; // for debug purpose only, how many mili-second = 1 second ?	.player$ = 0;	.winner$ = 0;	.round = 0;} -	script	evnt#1	-1,{ OnEnable:areawarp "dice",44,63,55,56,"dice",50,66;areawarp "dice",63,55,56,44,"dice",66,48;areawarp "dice",55,36,44,43,"dice",49,33;areawarp "dice",36,44,43,55,"dice",33,50;end;} // -- Mapflagsdice	mapflag	nowarpdice	mapflag	nowarptodice	mapflag	noteleportdice	mapflag	nosavedice	mapflag	nomemodice	mapflag	nobranchdice	mapflag	nolootdice	mapflag	noskilldice	mapflag	nopenalty

And the map is this :

 

post-9806-0-12224900-1435825998_thumb.png

 

Here's what I want to this one. The players who want to join the event will be warped to this map. When the event start the NPC will pick a number from 1 to 4. and once the NPC picked a number all the players that are inside the box will not be able to get out that by setting the setcell (please inclue that as well, dont know how to do it.) and after that an explosive monster will appear inside the box to kill the players that are standing on the selected number. And those who are standing outside the box will be disqualified and they will be teleported in the Dead Player Area as well.

 

Once the players are dead they will be teleported to the Dead player Area automatically and the game will begin again until one player left in the Playing Area. 

 

The last player standing in the Playing Area will get a prize automatically. And after that all the players will be warp back in prontera.

 

*************************************************

 

On the script above, the thing that is happening is, the player who enters last will receive the prize even if that player was already been killed and sent to the Dead Player Area. this is not what I want.

 

Can you please help me fix this script?

Share this post


Link to post
Share on other sites
  • 0

interesting o.o

 

I wish to have that map

 

since you already post up the script, why not post up the map as well ?

so I can make this as free release

 

@@almarket23

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.