Jump to content
  • 0

Setup Satan Catcher Event by Karul, make it auto event.


madtoyz

Question


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  142
  • Reputation:   10
  • Joined:  01/21/12
  • Last Seen:  

Which part i need to writedown the OnClock in this script ?

 

//Made by Karul
//==========Start/Announcer NPC
izlude,142,184,3    script    Satan Catcher Event    793,{

set .@name$,"^9932CC[Satan Catcher] ^000000";

if(getgmlevel() < 80) {
    mes .@name$;
    mes "Sorry you are no Level 80 GM";
    close;
    } else {
    L_Main:
    mes .@name$;
    mes "What do you want to do?";
    switch(select("Item [" + getitemname($@SatanReward) + "]:Start Event")) {
            case 1: next;
                    mes .@name$;
                    mes "What item do you want as the reward?";
                    input $@SatanReward;
                    next;
                    mes .@name$;
                    mes "How many of that item(s) do you want to give?";
                    input $@SatanRewardItems;
                    next;
                    mes .@name$;
                    mes "This is your amount:";
                    mes ""+$@SatanRewardItems+"";
                    next;
                    goto L_Main;
            case 2: next;
                    mes .@name$;
                    mes "Starting Event...";
                    close2;
                    Announce "Satan Catcher Event is being held!",bc_all;
                    sleep 5000;
                    Announce "The warp portal has appeared in izlude infront of me!",bc_all;
                    enablenpc "satanevent";
                    initnpctimer;
                    end;
                    
                    OnTimer30000:
                            Announce "Thirty Seconds Have Passed By!",bc_all;
                            sleep 5000;
                            Announce "Hurry to infront of me if you want to join!",bc_all;
                            end;
                            
                    OnTimer40000:
                            Announce "Twenty seconds left!",bc_all;
                            end;
                            
                    OnTimer50000:
                            Announce "Ten seconds left!",bc_all;
                            end;
                            
                    OnTimer55000:
                            Announce "5!",bc_all;
                            sleep 1000;
                            Announce "4!",bc_all;
                            sleep 1000;
                            Announce "3!",bc_all;
                            sleep 1000;
                            Announce "2!",bc_all;
                            sleep 1000;
                            Announce "1!",bc_all;
                            sleep 1000;
                            Announce "0!",bc_all;
                            sleep 1000;
                            disablenpc "satanevent";
                            donpcevent "Rewarder::OnEnable";
                            stopnpctimer;
                            end;
        }
    }
OnInit:
disablenpc "satanevent";
hideonnpc "Rewarder";
}

//=================Warp NPC
izlude,140,182,0    warp    satanevent    1,1,2008rwc_08,50,51

//=================Reward NPC
2008rwc_08,50,51,5    script    Rewarder    793,{

set .@sname$,"[Rewarder]";

    mes .@sname$;
    if(.@SATAN == 1) goto L_SATAN;
    mes "Please tell me your name.";
    next;
    input .@charname$;
    if(.@charname$ != strcharinfo(0)) {
        mes .@name$;
        mes "Are you sure that is your character name?";
        close;
    }
    mes .@name$;
    mes "Congratulations You Have Won!";
    Announce "Congratulations to " + .@charname$ + "! He / She has won " + $@SatanRewardItems + " " + getitemname($@SatanReward) + "(s)!",bc_all;
    getitem $@SatanReward,$@SatanRewardItems;
    atcommand "@go 0";
    hideonnpc "Rewarder";
    end;
    
L_SATAN:
    mes .@sname$;
    mes "Please tell me your name";
    next;
    input .@charname$;
    if(.@charname$ != strcharinfo(0)) {
        mes .@name$;
        mes "Are you sure that is your character name?";
        close;
    }
    mes .@name$;
    mes "Congratulations You Have Won!";
    Announce "Congratulations to " + .@charname$ + "! He / She has won " + $@SatanRewardItems + " " + getitemname($@SatanReward) + "(s)!",bc_all;
    getitem $@SatanReward,$@SatanRewardItems;
    set SATAN,0;
    atcommand "@go 0";
    hideonnpc "Rewarder";
    end;
    
OnEnable:
    set .@aname$,"[Rewarder]";
    
    mapannounce "2008rwc_08","" + .@aname$ + ": I will be summoning 100 different kinds of Satan Morroc.",16;
    sleep 5000;
    mapannounce "2008rwc_08","" + .@aname$ + ": Only one of these Satan Morrocs are the real one.",16;
    sleep 5000;
    mapannounce "2008rwc_08","" + .@aname$ + ": The correct one will be called 'Satan Morroc'.",16;
    sleep 5000;
    mapannounce "2008rwc_08","" + .@aname$ + ": Kill the wrong one, you're out. Kill the right one, you win.",16;
    sleep 5000;
    mapannounce "2008rwc_08","" + .@aname$ + ": Now let's play!",16;
    goto L_Start;
    end;

L_Start:
    set .@aname$,"[Rewarder]";

    mapannounce "2008rwc_08","" + .@aname$ + ": 5!",16;
    sleep 1000;
    mapannounce "2008rwc_08","" + .@aname$ + ": 4!",16;
    sleep 1000;
    mapannounce "2008rwc_08","" + .@aname$ + ": 3!",16;
    sleep 1000;
    mapannounce "2008rwc_08","" + .@aname$ + ": 2!",16;
    sleep 1000;
    mapannounce "2008rwc_08","" + .@aname$ + ": 1!",16;
    sleep 1000;
    mapannounce "2008rwc_08","" + .@aname$ + ": GO!",16;
    sleep 1000;
    areamonster "2008rwc_08",39,63,63,45,"Satan Morroc",4200,1,"satanwin::OnMobKilled";
    areamonster "2008rwc_08",63,63,37,46,"Satanic Morroc",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",39,63,63,45,"Satan Moroc",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",63,63,37,46,"Satan Morocc",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",39,63,63,45,"Satin Mrroc",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",63,63,37,46,"I am Satan Morroc",4200,5,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",39,63,63,45,"Corrom Natas",4200,1,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",63,63,37,46,"SaTaN MoRrOc",4200,1,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",39,63,63,45,"Sattan Morroc",4200,1,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",63,63,37,46,"Say Ten More Rocks",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",39,63,63,45,"Satan of the Morroc",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",63,63,37,46,"Morroc's Satan",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",39,63,63,45,"S4t4n M0rr0c",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",63,63,37,46,"Saten Morroc",4200,10,"satanlose::OnMobKilled";
    areamonster "2008rwc_08",39,63,63,45,"Stan Morrc",4200,1,"satanlose::OnMobKilled";
    end;
}

//========Killed the right one
-    script    satanwin    -1,{

    set .@aname$,"[Rewarder]";

OnMobKilled:
    dispbottom "Satan Morroc: ASDFGHJKL; You found me.";
    set .@SATAN,1;
    atcommand "@doommap";
    killmonster "2008rwc_08","All";
    mapannounce "2008rwc_08","" + .@aname$ + " Come to me and tell me your name.",16;
    hideoffnpc "Rewarder";
    end;
}

//========Killed the wrong one
-    script    satanlose    -1,{

OnMobKilled:
    dispbottom "Satan Morroc: ASDFGHJKL; You haven't found my twin!";
    atcommand "@go 0";
    end;
}

// -- Mapflags (If Wanted)
2008rwc_08    mapflag    nowarp
2008rwc_08    mapflag    nowarpto
2008rwc_08    mapflag    noteleport
2008rwc_08    mapflag    nosave
2008rwc_08    mapflag    nomemo
2008rwc_08    mapflag    nobranch
2008rwc_08    mapflag    noloot
2008rwc_08    mapflag    noskill
2008rwc_08    mapflag    nopenalty
 
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

                    Announce "Satan Catcher Event is being held!",bc_all;
                    sleep 5000;
                    Announce "The warp portal has appeared in izlude infront of me!",bc_all;
                    enablenpc "satanevent";
                    initnpctimer;
                    end;

Right above that, so it will look like this:

case 2: next;
                    mes .@name$;
                    mes "Starting Event...";
                    close2;
                    OnClockXXXX: //Placing this here, will have it start the NPC event.
                    Announce "Satan Catcher Event is being held!",bc_all;
                    sleep 5000;
                    Announce "The warp portal has appeared in izlude infront of me!",bc_all;
                    enablenpc "satanevent";
                    initnpctimer;
                    end;

*Note - While this WILL make it auto-start. It will also error out the script, because the rewards aren't set. To fix this, simply change the $@Variables   into    $Variables.  This is because $@ is a Temp-Global var, and well, with an event like this that will continue to run and be on the server, you might as well use perm-global vars. 2 or 3 of these isn't gonna hurt your servers performancec at all.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  142
  • Reputation:   10
  • Joined:  01/21/12
  • Last Seen:  

                    Announce "Satan Catcher Event is being held!",bc_all;
                    sleep 5000;
                    Announce "The warp portal has appeared in izlude infront of me!",bc_all;
                    enablenpc "satanevent";
                    initnpctimer;
                    end;

Right above that, so it will look like this:

case 2: next;
                    mes .@name$;
                    mes "Starting Event...";
                    close2;
                    OnClockXXXX: //Placing this here, will have it start the NPC event.
                    Announce "Satan Catcher Event is being held!",bc_all;
                    sleep 5000;
                    Announce "The warp portal has appeared in izlude infront of me!",bc_all;
                    enablenpc "satanevent";
                    initnpctimer;
                    end;

*Note - While this WILL make it auto-start. It will also error out the script, because the rewards aren't set. To fix this, simply change the $@Variables   into    $Variables.  This is because $@ is a Temp-Global var, and well, with an event like this that will continue to run and be on the server, you might as well use perm-global vars. 2 or 3 of these isn't gonna hurt your servers performancec at all.

 

when i find (ctrl+f) in script..i dont find any $@Variables ..

this is my script after editing OnClock

//Made by Karul
//==========Start/Announcer NPC
izlude,142,184,3	script	Satan Catcher Event	793,{

set .@name$,"^9932CC[Satan Catcher] ^000000";

if(getgmlevel() < 80) { 
	mes .@name$;
	mes "Sorry you are no Level 80 GM";
	close;
	} else {
	L_Main:
	mes .@name$;
	mes "What do you want to do?";
	switch(select("Item [" + getitemname($@SatanReward)  + "]:Start Event")) {
			case 1: next;
					mes .@name$;
					mes "What item do you want as the reward?";
					input $@SatanReward;
					next;
					mes .@name$;
					mes "How many of that item(s) do you want to give?";
					input $@SatanRewardItems;
					next;
					mes .@name$;
					mes "This is your amount:";
					mes ""+$@SatanRewardItems+"";
					next;
					goto L_Main;
			case 2: next;
					mes .@name$;
                    mes "Starting Event...";
                    close2;
                    OnClock0000: //Placing this here, will have it start the NPC event.
					OnClock0200:
					OnClock0400:
					OnClock0600:
					OnClock0800:
					OnClock1000:
					OnClock1200:
					OnClock1400:
					OnClock1600:
					OnClock1800:
					OnClock2000:
					OnClock2200:
                    Announce "Satan Catcher Event is being held!",bc_all;
                    sleep 5000;
                    Announce "The warp portal has appeared in izlude infront of me!",bc_all;
                    enablenpc "satanevent";
                    initnpctimer;
                    end;
					
					OnTimer30000:
							Announce "Thirty Seconds Have Passed By!",bc_all;
							sleep 5000;
							Announce "Hurry to infront of me if you want to join!",bc_all;
							end;
							
					OnTimer40000:
							Announce "Twenty seconds left!",bc_all;
							end;
							
					OnTimer50000:
							Announce "Ten seconds left!",bc_all;
							end;
							
					OnTimer55000:
							Announce "5!",bc_all;
							sleep 1000;
							Announce "4!",bc_all;
							sleep 1000;
							Announce "3!",bc_all;
							sleep 1000;
							Announce "2!",bc_all;
							sleep 1000;
							Announce "1!",bc_all;
							sleep 1000;
							Announce "0!",bc_all;
							sleep 1000;
							disablenpc "satanevent";
							donpcevent "Rewarder::OnEnable";
							stopnpctimer;
							end;
		}
	}
OnInit:
        disablenpc "satanevent";
        hideonnpc "Rewarder";
}

//=================Warp NPC
izlude,140,182,0	warp	satanevent	1,1,2008rwc_08,50,51

//=================Reward NPC
2008rwc_08,50,51,5	script	Rewarder	793,{

set .@sname$,"[Rewarder]";

	mes .@sname$;
	if(.@SATAN == 1) goto L_SATAN;
	mes "Please tell me your name.";
	next;
	input .@charname$;
	if(.@charname$ != strcharinfo(0)) {
		mes .@name$;
		mes "Are you sure that is your character name?";
		close;
	}
	mes .@name$;
	mes "Congratulations You Have Won!";
	Announce "Congratulations to " + .@charname$ + "! He / She has won " + $@SatanRewardItems + " " + getitemname($@SatanReward)  + "(s)!",bc_all;
	getitem $@SatanReward,$@SatanRewardItems;
	atcommand "@go 0";
	hideonnpc "Rewarder";
	end;
	
L_SATAN:
	mes .@sname$;
	mes "Please tell me your name";
	next;
	input .@charname$;
	if(.@charname$ != strcharinfo(0)) {
		mes .@name$;
		mes "Are you sure that is your character name?";
		close;
	}
	mes .@name$;
	mes "Congratulations You Have Won!";
	Announce "Congratulations to " + .@charname$ + "! He / She has won " + $@SatanRewardItems + " " + getitemname($@SatanReward)  + "(s)!",bc_all;
	getitem $@SatanReward,$@SatanRewardItems;
	set SATAN,0;
	atcommand "@go 0";
	hideonnpc "Rewarder";
	end;
	
OnEnable:
	set .@aname$,"[Rewarder]";
	
	mapannounce "2008rwc_08","" + .@aname$ + ": I will be summoning 100 different kinds of Satan Morroc.",16;
	sleep 5000;
	mapannounce "2008rwc_08","" + .@aname$ + ": Only one of these Satan Morrocs are the real one.",16;
	sleep 5000;
	mapannounce "2008rwc_08","" + .@aname$ + ": The correct one will be called 'Satan Morroc'.",16;
	sleep 5000;
	mapannounce "2008rwc_08","" + .@aname$ + ": Kill the wrong one, you're out. Kill the right one, you win.",16;
	sleep 5000;
	mapannounce "2008rwc_08","" + .@aname$ + ": Now let's play!",16;
	goto L_Start;
	end;

L_Start:
	set .@aname$,"[Rewarder]";

	mapannounce "2008rwc_08","" + .@aname$ + ": 5!",16;
	sleep 1000;
	mapannounce "2008rwc_08","" + .@aname$ + ": 4!",16;
	sleep 1000;
	mapannounce "2008rwc_08","" + .@aname$ + ": 3!",16;
	sleep 1000;
	mapannounce "2008rwc_08","" + .@aname$ + ": 2!",16;
	sleep 1000;
	mapannounce "2008rwc_08","" + .@aname$ + ": 1!",16;
	sleep 1000;
	mapannounce "2008rwc_08","" + .@aname$ + ": GO!",16;
	sleep 1000;
	areamonster "2008rwc_08",39,63,63,45,"Satan Morroc",4200,1,"satanwin::OnMobKilled";
	areamonster "2008rwc_08",63,63,37,46,"Satanic Morroc",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",39,63,63,45,"Satan Moroc",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",63,63,37,46,"Satan Morocc",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",39,63,63,45,"Satin Mrroc",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",63,63,37,46,"I am Satan Morroc",4200,5,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",39,63,63,45,"Corrom Natas",4200,1,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",63,63,37,46,"SaTaN MoRrOc",4200,1,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",39,63,63,45,"Sattan Morroc",4200,1,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",63,63,37,46,"Say Ten More Rocks",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",39,63,63,45,"Satan of the Morroc",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",63,63,37,46,"Morroc's Satan",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",39,63,63,45,"S4t4n M0rr0c",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",63,63,37,46,"Saten Morroc",4200,10,"satanlose::OnMobKilled";
	areamonster "2008rwc_08",39,63,63,45,"Stan Morrc",4200,1,"satanlose::OnMobKilled";
	end;
}

//========Killed the right one
-	script	satanwin	-1,{

	set .@aname$,"[Rewarder]";

OnMobKilled:
	dispbottom "Satan Morroc: ASDFGHJKL; You found me.";
	set .@SATAN,1;
	atcommand "@doommap";
	killmonster "2008rwc_08","All";
	mapannounce "2008rwc_08","" + .@aname$ + " Come to me and tell me your name.",16;
	hideoffnpc "Rewarder";
	end;
}

//========Killed the wrong one
-	script	satanlose	-1,{

OnMobKilled:
	dispbottom "Satan Morroc: ASDFGHJKL; You haven't found my twin!";
	atcommand "@go 0";
	end;
}

// -- Mapflags (If Wanted)
2008rwc_08	mapflag	nowarp
2008rwc_08	mapflag	nowarpto
2008rwc_08	mapflag	noteleport
2008rwc_08	mapflag	nosave
2008rwc_08	mapflag	nomemo
2008rwc_08	mapflag	nobranch
2008rwc_08	mapflag	noloot
2008rwc_08	mapflag	noskill
2008rwc_08	mapflag	nopenalty

BUMP

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

Starting from line 15, there's the $@Variables..

 

    switch(select("Item [" + getitemname($@SatanReward)  + "]:Start Event")) {
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  142
  • Reputation:   10
  • Joined:  01/21/12
  • Last Seen:  

Starting from line 15, there's the $@Variables..

 

    switch(select("Item [" + getitemname($@SatanReward)  + "]:Start Event")) {

 

thats mean $@SatanReward change to $SatanReward ?

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