Jump to content

Luciar

Members
  • Posts

    177
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Luciar

  1. I'm not sure I understand what you're asking. Try using the international support forums that match your native language.

    As a side note and word of caution, you should be very careful when distributing or playing songs (e.g. Linkin Park) that you do not have a license for. It is illegal. /end_DMCA_warning

  2. 
    

    // Awesomazing Coin Rewards

    - shop Emistry_Shop1 -1,512:100

    turbo_room,123,97,4 script Donation Rewards 829,{

    function ShopSettings;

    function ValidateCost;

    function CurrencyInfo;

    function ClearData;

    function ValueConvert;

    function ErrorNotice;

    mes "[ RO2K15 Coin Rewards]";

    mes "^d21838PODs^000000 can be traded here.";

    mes "You can obtain PODs from:";

    mes "1. Donation";

    mes "2. Lotti Girl";

    mes "3. GM Held Events";

    mes "4. Facebook Contest";

    next;

    // Menu Selection

    select("Headgear","Mid Headgear","Lower Headgear","Consumables & ETC");

    ClearData();

    ShopSettings( @menu );

    npcshopitem "Emistry_Shop1",512,100;

    npcshopdelitem "Emistry_Shop1",512;

    for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1)

    npcshopadditem "Emistry_Shop1",@ItemLists[.@i],@ItemCost[.@i];

    CurrencyInfo( @Currency$ );

    callshop "Emistry_Shop1",1;

    npcshopattach "Emistry_Shop1";

    end;

    function ShopSettings {

    switch( getarg(0) ){

    Case 1:

    // Currency [ Item ID / Variable Name ]

    set @Currency$,"7179";

    // Item ID Lists

    setarray @ItemLists[0],5375,5376,5396,5498,5420,5383,5481,5423,5564,5399,5374,5518,5805,5452;

    // Item Price

    setarray @ItemCost[0],5,5,5,5,5,5,5,7,7,10,10,10,12,15;

    break;

    Case 2:

    // Currency [ Item ID / Variable Name ]

    set @Currency$,"7179";

    // Item ID Lists

    setarray @ItemLists[0],5421,5325,5800,5389,5664,5471,5402;

    // Item Price

    setarray @ItemCost[0],5,5,5,5,5,5,5;

    break;

    Case 3:

    // Currency [ Item ID / Variable Name ]

    set @Currency$,"7179";

    // Item ID Lists

    setarray @ItemLists[0],5532,5462,5155,5377,5521;

    // Item Price

    setarray @ItemCost[0],3,6,8,9,15;

    break;

    Case 4:

    // Currency [ Item ID / Variable Name ]

    set @Currency$,"7179";

    // Item ID Lists

    setarray @ItemLists[0],7776,7619,7620;

    // Item Price

    setarray @ItemCost[0],1,1,1;

    break;

    // Case 4,5,6.....etc...

    default:

    ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." );

    close;

    }

    if( @Currency$ == "" )

    ErrorNotice( "Invalid Currency Setting in Menu "+@menu+" ." );

    if( getarraysize( @ItemCost ) != getarraysize( @ItemLists ) || getarraysize( @ItemLists ) != getarraysize( @ItemCost ) )

    ErrorNotice( "Missing or Extra Value of Item or Cost Settings in Menu "+@menu+" ." );

    return;

    }

    function ErrorNotice {

    mes "^FF0000ERROR^000000 - "+getarg(0);

    mes "^00FF00____________________________^000000";

    mes "Inform this Message to ^0000FFGame Staffs^000000 immediately !";

    close;

    }

    function CurrencyInfo {

    if( getitemname( atoi( getarg(0) ) ) != "null" ){

    mes "Item Currency : ^FF0000"+getitemname( atoi( getarg(0) ) )+"^000000";

    mes "Available Amount : ^0000FF"+ValueConvert( countitem( atoi( getarg(0) ) ) )+"^000000";

    }else if( getitemname( atoi( getarg(0) ) ) == "null" ){

    mes "Variable Currency : ^FF0000"+getarg(0)+"^000000";

    mes "Available Amount : ^0000FF"+ValueConvert( getd( getarg(0) ) )+"^000000";

    }

    return;

    }

    function ValidateCost {

    if( getitemname( atoi( getarg(0) ) ) != "null" ){

    if( countitem( atoi( getarg(0) ) ) < getarg(1) ) return 1;

    }else{

    if( getd( getarg(0) ) < getarg(1) ) return 1;

    }

    return 0;

    }

    function ClearData {

    set @Currency$,"";

    set @TotalCost,0;

    deletearray @bought_nameid[0],getarraysize( @bought_nameid );

    deletearray @bought_quantity[0],getarraysize( @bought_quantity );

    deletearray @ItemLists[0],getarraysize( @ItemLists );

    deletearray @ItemCost[0],getarraysize( @ItemCost );

    return;

    }

    function ValueConvert {

    set .@num, atoi(""+getarg(0));

    if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);

    set .@l, getstrlen(""+.@num);

    for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {

    set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;

    if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;

    }

    return .@num$;

    }

    OnBuyItem:

    ShopSettings( @menu );

    for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)

    for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1)

    if( @ItemLists[@j] == @bought_nameid[@i] )

    set @TotalCost,@TotalCost + ( @ItemCost[@j] * @bought_quantity[@i] );

    for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 )

    mes "Reward : "+@bought_quantity[@i]+" "+getitemname( @bought_nameid[@i] )+"";

    mes "-----------------------------------";

    if( getitemname( atoi( @Currency$ ) ) != "null" )

    mes "Total Cost : "+ValueConvert( @TotalCost )+" "+getitemname( atoi( @Currency$ ) )+"";

    else if( getitemname( atoi( @Currency$ ) ) == "null" ){

    mes "Total Cost : "+ValueConvert( @TotalCost )+" "+@Currency$+"";

    }

    if( ValidateCost( @Currency$,@TotalCost ) ){

    if( getitemname( atoi( @Currency$ ) ) != "null" )

    mes " Insufficient "+getitemname( atoi( @Currency$ ) )+"";

    else{

    mes "[^00FF00Insufficient^000000"+@Currency$+"";

    }

    }else{

    if( select( "^0000FFPurchase^000000:Cancel" ) == 1 ){

    if( getitemname( atoi( @Currency$ ) ) != "null" )

    delitem atoi( @Currency$ ),@TotalCost;

    else{

    set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost;

    }

    for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)

    getitem @bought_nameid[@i],@bought_quantity[@i];

    announce "Player "+ strcharinfo(0) +" has purchased "+ @bought_quantity[@i] +" "+ getitemname(@bought_nameid[@i]),bc_all;

    message strcharinfo(0),"Purchased "+getarraysize( @bought_nameid )+" Items.";

    mes "Thank you for purchasing!.";

    }

    }

    ClearData();

    close;

    }

    Try that
  3. A GM can whisper to NPC:fi. The first word is either "map" or "all". This will determine who receives the item. The second word is the item ID you wish to give. The third input is the quantity of the item. The fourth word is an optional map name. If "map" is specified without a specific map, then it will default to the map on which the GM is standing.

  4. 
    

    - script AtCmdHeal -1,{

    OnInit:

    bindatcmd "buff","AtCmdHeal::OnAtcommand";

    end;

    OnAtcommand:

    percentheal 100,100;

    skilleffect 384,0; sc_start SC_MELTDOWN,360000,5;

    skilleffect 383,0; sc_start SC_WINDWALK,360000,5;

    skilleffect 378,0; sc_start SC_EDP,360000,5;

    skilleffect 465,0; sc_start SC_KAITE,360000,7;

    skilleffect 464,0; sc_start SC_KAUPE,360000,3;

    skilleffect 463,0; sc_start SC_KAAHI,360000,7;

    skilleffect 462,0; sc_start SC_KAIZEL,360000,7;

    skilleffect 8,0; sc_start SC_ENDURE,360000,10;

    skilleffect 33,0; sc_start SC_ANGELUS,360000,10;

    skilleffect 45,0; sc_start SC_CONCENTRATE,360000,10;

    skilleffect 74,0; sc_start SC_MAGNIFICAT,360000,5;

    skilleffect 75,0; sc_start SC_GLORIA,360000,5;

    skilleffect 459,0; sc_start SC_ADRENALINE2,360000,1;

    skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5;

    skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3;

    skilleffect 34,0; sc_start SC_BLESSING,360000,10;

    skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;

    skilleffect 112,0; sc_start SC_WEAPONPERFECTION,360000,10;

    skilleffect 113,0; sc_start SC_OVERTHRUST,360000,5;

    skilleffect 114,0; sc_start SC_MAXIMIZEPOWER,360000,5;

    skilleffect 357,0; sc_start SC_CONCENTRATION,360000,5;

    skilleffect 355,0; sc_start SC_AURABLADE,360000,5;

    skilleffect 155,0; sc_start SC_LOUD,360000,1;

    skilleffect 157,0; sc_start SC_ENERGYCOAT,360000,1;

    sc_start SC_ASPDPOTION2,360000,0;

    sc_start SC_STRFood,360000,10;

    sc_start SC_AGIFood,360000,10;

    sc_start SC_VITFood,360000,10;

    sc_start SC_INTFood,360000,10;

    sc_start SC_DEXFood,360000,10;

    sc_start SC_LUKFood,360000,10;

    sc_start SC_HitFood,1200000,30;

    sc_start SC_FleeFood,1200000,30;

    sc_start SC_BATKFood,1200000,10;

    sc_start SC_MATKFood,120000,10;

    skilleffect 380,0; sc_start SC_TRUESIGHT,360000,5;

    skilleffect 361,0; sc_start SC_ASSUMPTIO,360000,5;

    end;

    }

    isnt' working for you?
  5. use bindatcmd

    -	script	warp#11	-1,{
    	
    	
    OnInit:
    bindatcmd "maintown ", strnpcinfo(3) +"::OnMaintown";
    bindatcmd "mall", strnpcinfo(3) +"::OnMall";
    bindatcmd "event", strnpcinfo(3) +"::OnEvent";
    bindatcmd "donate", strnpcinfo(3) +"::OnDonate";
    end;
    		
    	
    	
    OnMaintown:	
    warp "phtownall",199,184;
    end;
    
    
    OnMall:	
    warp "turbo_room",100,100;
    end;
    
    
    OnEvent:	
    warp "quiz_02",100,100;
    end;
    
    
    OnDonate:	
    warp "turbo_room",200,200;
    end;
    }	
    

    Each atcommand is only allowed one binding. If you rebind, it will override the original binding.

    and

     

    -	script	maintown	-1,{
    OnInit:
    	bindatcmd "maintown",strnpcinfo(3)+"::OnAtcommand";
    	end;
    OnAtcommand:
    	atcommand "@warp phtownall 199 184";
    	end;
    }
    Why use atcommand "@war... when you can use the warp script command?

    i.e.

    warp "phtownhall",199,184;
    So.. Maybe something like this (untested):

     

    -	script	atcmdwarp#Maintown	-1,{
    
    	OnInit:
    		bindatcmd strnpcinfo(3)+"::On"+strnpcinfo(3);
    		end;
    	
    	OnMaintown:
    		warp "phtownall",199,184;
    		end;
    	
    	OnMall:
    		warp "turbo_room",100,100;
    		end;
    	
    	OnEvent:
    		warp "quiz_02",100,100;
    		end;
    	
    	OnDonate:
    		warp "turbo_room",200,200;
    		end;
    }
    -	duplicate(Maintown)	atcmdwarp#Mall	-1
    -	duplicate(Maintown)	atcmdwarp#Event	-1
    -	duplicate(Maintown)	atcmdwarp#Donate	-1
  6. Change:

    prontera,159,193,5 script Healer 834,{
    to

    -(tab)script(tab)AtCmdHeal(tab)-1,{
    then below add:

     

    OnInit:
    bindatcmd "buff","AtCmdHeal::OnAtcommand";
    end;
    
    OnAtcommand:
    percentheal 100,100;
    skilleffect 384,0; sc_start SC_MELTDOWN,360000,5;
    skilleffect 383,0; sc_start SC_WINDWALK,360000,5;
    skilleffect 378,0; sc_start SC_EDP,360000,5;
    skilleffect 465,0; sc_start SC_KAITE,360000,7;
    skilleffect 464,0; sc_start SC_KAUPE,360000,3;
    skilleffect 463,0; sc_start SC_KAAHI,360000,7;
    skilleffect 462,0; sc_start SC_KAIZEL,360000,7;
    skilleffect 8,0; sc_start SC_ENDURE,360000,10;
    skilleffect 33,0; sc_start SC_ANGELUS,360000,10;
    skilleffect 45,0; sc_start SC_CONCENTRATE,360000,10;
    skilleffect 74,0; sc_start SC_MAGNIFICAT,360000,5;
    skilleffect 75,0; sc_start SC_GLORIA,360000,5;
    skilleffect 459,0; sc_start SC_ADRENALINE2,360000,1;
    skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5;
    skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3;
    skilleffect 34,0; sc_start SC_BLESSING,360000,10;
    skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
    skilleffect 112,0; sc_start SC_WEAPONPERFECTION,360000,10;
    skilleffect 113,0; sc_start SC_OVERTHRUST,360000,5;
    skilleffect 114,0; sc_start SC_MAXIMIZEPOWER,360000,5;
    skilleffect 357,0; sc_start SC_CONCENTRATION,360000,5;
    skilleffect 355,0; sc_start SC_AURABLADE,360000,5;
    skilleffect 155,0; sc_start SC_LOUD,360000,1;
    skilleffect 157,0; sc_start SC_ENERGYCOAT,360000,1;
    sc_start SC_ASPDPOTION2,360000,0;
    sc_start SC_STRFood,360000,10;
    sc_start SC_AGIFood,360000,10;
    sc_start SC_VITFood,360000,10;
    sc_start SC_INTFood,360000,10;
    sc_start SC_DEXFood,360000,10;
    sc_start SC_LUKFood,360000,10;
    sc_start SC_HitFood,1200000,30;
    sc_start SC_FleeFood,1200000,30;
    sc_start SC_BATKFood,1200000,10;
    sc_start SC_MATKFood,120000,10;
    skilleffect 380,0; sc_start SC_TRUESIGHT,360000,5;
    skilleffect 361,0; sc_start SC_ASSUMPTIO,360000,5;
    end;
    }
    Warning!!!: Players will be able to use @buff at any time to heal to 100%. Consider adding a cooldown.
  7. Posts in the support sections may be bumped with MORE INFORMATION no less than 24 hours after the last post.Any other bumping is not allowed.

    Please stop bumping. This exact question has been answered several times on this support forum and request section. Use the search feature and you'll surely find your answer.

  8. Here's an old automated event manager that I wrote in the past. You will have to modify it to meet what you want, or just look at it to get an idea of one possible way to accomplish your goal.

     

    //===== rAthena Script =======================================================
    //= Automated Events Manager
    //===== By: ==================================================================
    //= Dab (Luciar) - StaR-o
    //===== Current Version: =====================================================
    //= 1.0
    //===== Compatible With: =====================================================
    //= StaR-O rAthena SVN ONLY
    //===== Description: =========================================================
    //= Allows authorized GMs to disable all automated events
    //= Allows authorized GMs to disable specific events from the automated rotation
    //= --View active/inactive events
    //= Allows authorized GMs to manually activate specific events
    //============================================================================
    ms_main,116,243,4	script	AutoEvents Manager	123,{
    	OnWhisperGlobal:
    		callfunc("checkPermission","4,5,7,8,9,10,11,12,99",1);
    		set .@name$,"[^0000FFAutomated Events Manager^000000]";
    	
    		mes .@name$;
    		mes "Hello, " + strcharinfo(0) +". How can I help you?";
    		mes " ";
    		if(!.master) mes "^FF0000Automated events are currently disabled!^000000";
    		if(.lastevent$ != "") mes "Last AutoEvent Held @ "+ .lastevent$;
    		mes "Current Date: "+ gettimestr("%m/%d Current Time: %H:%M",64);
    		set .@m$,(.master ? "Disable Automated Events" : "Enable Automated Events");
    		if(callfunc("checkPermission","9,12,99")) set .@m$, .@m$ + ":Manage Individual Events:Trigger A Specific Event";
    		next;
    		switch(select(.@m$)) {
    	
    			//Enable/Disable Automated Events
    			case 1:
    				if(.master) {
    					set .master,0;
    					mes .@name$;
    					mes "Automated events have been ^FF0000Deactivated^000000.";
    					stopnpctimer;
    					addtimer 600000,"AutoGMRemind::OnRemindGM";
    					close;
    				} else {
    					set .master,1;
    					mes .@name$;
    					mes "Automated events have been ^00FF00Activated^000000.";
    					initnpctimer;
    					deltimer "AutoGMRemind::OnRemindGM";
    					close;
    				}
    				break;
    		
    			//Manage Individual Events	
    			case 2:
    				mes .@name$;
    				mes "Please choose an event to activate or deactivate:";
    				for(set .@i,0;.@i < getarraysize(.eventnames$); set .@i,.@i+1) {
    					if(.@i != getarraysize(.eventnames$) - 1) set .@m2$,.@m2$ + (getd("."+strtolower(.eventnames$[.@i])+"_status") ? "^00FF00=^000000"+.eventnames$[.@i]+":" : "^FF0000=^000000"+.eventnames$[.@i]+":");
    					else set .@m2$,.@m2$ + (getd("."+strtolower(.eventnames$[.@i])+"_status") ? "^00FF00=^000000"+.eventnames$[.@i] : "^FF0000=^000000"+.eventnames$[.@i]);
    				}
    				select(.@m2$);
    				if(getd("." + .eventnames$[@menu-1] + "_status")) {
    					setd "." + .eventnames$[@menu-1] + "_status",0;
    					mes .eventnames$[@menu-1] + " has been ^FF0000Deactivated^000000.";
    					close;
    				} else {
    					setd "." + .eventnames$[@menu-1] + "_status",1;
    					mes .eventnames$[@menu-1] + " has been ^00FF00Activated^000000.";
    					close;
    				}
    				close;
    				break;
    
    			//Trigger Individual Events
    			case 3:
    				if(!.master) {
    					mes .@name$;
    					mes "These events have been disabled globally, please make sure it is ok to host an event now before proceeding.";
    					select("I understand");
    					next;
    				}
    				mes .@name$;
    				mes "Which event would you like to trigger manually? This will reset the auto timer.";
    				for(set .@i,0;.@i < getarraysize(.eventnames$); set .@i,.@i+1) {
    					if(.@i != getarraysize(.eventnames$) - 1) set .@m2$,.@m2$ + .eventnames$[.@i]+":";
    					else set .@m2$,.@m2$ + .eventnames$[.@i];
    				}
    				select(.@m2$);
    				set .@choice,@menu-1;
    				next;
    				if(!getd("."+strtolower(.eventnames$[@menu-1])+"_status")) {
    					mes .@name$;
    					mes "This event is currently disabled from the automatic rotation.";
    					mes "Please make sure it is ok to run this event before proceeding.";
    					select("I understand");
    					next;
    				}
    				initnpctimer;
    				donpcevent .npcnames$[.@choice]+"::OnAuto";
    				.lastevent$ = gettimestr("%m/%d %H:%M",12);
    				mes .@name$;
    				mes .eventnames$[.@choice]+" has been activated!";
    				mes "Auto timer reset!";
    				close;
    		}
    	
    	//Automatically trigger random event engine on hour
    	OnTimer3600000:
    		if(.master) {
    			set .@delaycoeff,rand(1,32);
    			//25% Chance of Not Hosting Event on Hour + Delay
    			if(.@delaycoeff <= 8) {
    				initnpctimer;
    				end;
    			}
    			sleep .@delaycoeff*60000;
    			L_randevt:
    			set .@randevent,rand(0,getarraysize(.eventnames$)-1);
    			if(getd("."+.eventnames$[.@randevent] + "_status") == 0) goto L_randevt;
    			if(.master) {
    				donpcevent .npcnames$[.@randevent] + "::OnAuto";
    				.lastevent$ = gettimestr("%m/%d %H:%M",12);
    			}
    		}
    		initnpctimer;
    		end;
    	
    	//Remind GM That He/She Has Disabled Automated Events	
    	OnRemindGM:
    		mes "[^0000FFAutomated Events Manager^000000]";
    		mes "This serves as a reminder that you have disabled automated events.";
    		mes "Please remember to turn them back on once your event has concluded!";
    		close2;
    		addtimer 600000,"AutoGMRemind::OnRemindGM";
    		end;
    	
    	//Initial Configuration of NPC
    	OnInit: 
    		initnpctimer;
    		set .master,1;
    		setarray .eventnames$[0],"Werewolf Game","Hide n Seek","Stop the Clock","Monster Count Game";
    		setarray .npcnames$[0],"Werewolf Event#Init","Hide n Seek Event","Stop the Clock","Monster Count Game";
    		for(set .@i,0;.@i < getarraysize(.eventnames$); set .@i,.@i + 1) {
    			setd "." + .eventnames$[.@i] + "_status",1;
    		}
    		end;
    }
    
    -	script	AutoGMRemind	-1,{
    	OnRemindGM:
    		mes "[^0000FFAutomated Events Manager^000000]";
    		mes "This serves as a reminder that you have disabled automated events.";
    		mes "Please remember to turn them back on once your event has concluded!";
    		close2;
    		addtimer 600000,strnpcinfo(3)+"::OnRemindGM";
    		end;
    		
    	OnPCLoginEvent:
    		if(callfunc("checkPermission","4,6,7,8,10,11,99")) {
    			if(getvariableofnpc(.master,"AutoEvents Manager") == 0) {
    				announce "[Warning] : Automated Events are DISABLED. Check with online GMs to ensure this is intentional.",bc_self,0xFF0000;
    			}
    		}
    		end;
    }
    
    function	script	AutoReward	{
    	sendmail getarg(0),"Server","Minigame Reward","Congratulations, you were the winner of an automated minigame event! Please accept the prize attached to this mail!",0,30301,1;
    	return;
    }
    Find //Initial Configuration of NPC and set the names and NPC names of each of your automated events in the correct setting array. Next, add an OnAuto: event label to each of your event NPCs that will activate the event.

    The system is triggered every hour, but might not run an event every hour exactly. It adds a slight delay (sometimes) or might not host the event (sometimes) to prevent automated camping of certain events (i.e stop the clock)

    You'll have to remove any instances of:

    callfunc("checkPermission"...
    as well as this was written for a private server with a special permissions system
  9. No. You posted a request on the rAthena support forums. Of course it's written to the most recent rAthena standards. In the future I would highly suggest including ALL pertinent information in your request post to avoid such issues. If you're asking the community to do something for you, the least you can do is provide them with all the information they need.

     

    Change any instance of variable = value; to set variable,value;

  10. I wrote this very quickly, forgive any errors. It's pretty straight forward, see what you can do with it

    quiz_02,347,387,4	script	Trivia Control	123,{
    
    	.@n$ = "[^0000FFTrivial Controller^000000]";
    	
    	mes .@n$;
    	mes "Hello " + strcharinfo(0);
    	if(getgmlevel() < .minGM) close;
    	switch(.active) {
    		
    		case 1:
    			mes "Players are still entering. Please wait.";
    			close;
    		
    		case 2:
    			switch(select("Ask Question:End Event")) {
    				case 1:
    					mes "Please input your question.";
    					input .@q$;
    					mes "Is it true or false?";
    					.@a = select("True:False"); 
    					next;
    					mes .@n$;
    					mes "Please verify your question:";
    					mes .@q$;
    					mes (.@a == 1 ? "True" : "False");
    					select("Proceed");
    					close2;
    					announce "Question time!",bc_map;
    					sleep2 2000;
    					announce "True or False?",bc_map;
    					announce .@q$,bc_map;
    					donpcevent "TrueWarp::OnActive";
    					donpcevent "FalseWarp::OnActive";
    					sleep2 25000;
    					announce "5 seconds!",bc_map;
    					sleep2 5000;
    					donpcevent "TrueWarp::OnClose";
    					donpcevent "FalseWarp::OnClose";
    					announce "The answer is...",bc_map;
    					sleep2 5000;
    					announce (.@a  == 1 ? "TRUE!!" : "FALSE!!"),bc_map;
    					callsub OnReveal,.@a;
    					end;
    				
    				case 2:
    					mes "Event Ended.";
    					announce "[Trivia Event] : The event has been ended by a GM",bc_all;
    					.active = 0;
    					close;
    			}
    			break;
    		
    		default:
    			select("Activate Event");
    			.active = 1;
    			announce "[Trivia Event] : The event has been activated. Come to Prontera and warp to the event to participate!",bc_all;
    			donpcevent "Trivia Warp::OnActivate";
    			mes "Come talk to me when you're ready to proceed!";
    			close2;
    			sleep2 30000;
    			announce "[Trivia Event] : You have 30 more seconds to join the event. Come to Prontera to participate!",bc_all;
    			sleep2 30000;
    			announce "[Trivia Event] : The event has started and the warp has been closed.",bc_all;
    			.active = 2;
    			announce "[Trivia Event] : Welcome to the trivia event!",bc_map;
    			sleep2 3000;
    			announce "[Trivia Event] : You will have 30 seconds to select True or False after the question is displayed.",bc_map;
    			sleep2 3000;
    			announce "[Trivia Event] : Simply warp to the corresponding answer. O = TRUE X = FALSE",bc_map;
    			end;		
    	}
    
    	OnInit:
    		.minGM = 1;
    		.active = 0;
    		end;
    	
    	OnReveal:
    		if(getarg(0) == 1) {
    			areawarp "quiz_02",324,334,347,357,"quiz_02",350,371;
    			areawarp "quiz_02",352,334,352,357,"prontera",156,191;
    		} else {
    			areawarp "quiz_02",352,334,352,357,"quiz_02",350,371;
    			areawarp "quiz_02",324,334,347,357,"prontera",156,191;
    		}
    		return;
    }
    
    quiz_02,337,365,0	script	TrueWarp	45,2,2,{
    	
    	warp "quiz_02",335,345;
    	end;
    	
    	OnActive:
    		enablenpc strnpcinfo(0);
    		waitingroom "TRUE",0;
    		end;
    		
    	OnClose:
    	OnInit:
    		disablenpc strnpcinfo(0);
    		end;
    }
    
    quiz_02,362,365,0	script	FalseWarp	45,2,2,{
    	
    	warp "quiz_02",364,346;
    	end;
    	
    	OnActive:
    		enablenpc strnpcinfo(0);
    		waitingroom "FALSE",0;
    		end;
    		
    	OnClose:
    	OnInit:
    		disablenpc strnpcinfo(0);
    		end;
    }
    
    prontera,150,191,0	script	Trivia Warp	45,2,2,{
    
    	if(getvariableofnpc(.active,"Trivia Control")) warp "quiz_02",350,371;
    	end;
    
    	OnActivate:
    		enablenpc strnpcinfo(0);
    		waitingroom "Trivia Event",0;
    		initnpctimer;
    		end;
    	
    	OnTimer60000:
    		stopnpctimer;
    	OnInit:
    		disablenpc strnpcinfo(0);
    		end;
    }
    
    • Upvote 1
×
×
  • Create New...