Jump to content
  • 0

help me fixed my script please


darking123

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

i scripted my own automated event...

i want that when no one joined the event the event will be canceled

i want that when you have been killed,you will be automatically teleported to your savepoint

i want that when juggernaut is killed we will have 30 seconds to stay in the map before we are all teleported to our save points

- script juggernaut -1,{
OnInit:
hideonnpc  "Prize Giver";
disablenpc "Juggernaut warper";
end;
Onshfnbsnba:
OnClock0000:
OnClock0400:
OnClock0900:
OnClock1400:
OnClock2400:
goto startjugger;
startjugger:
announce "Juggernaut event has Started.",0;
sleep2 20000;
announce "Please Regiter Now On The South of merullian.",0;
enablenpc "Juggernaut warper";
   initnpctimer;
end;
OnTimer70000:
announce "Last 1 Minute.",0;
sleep2 5000;
announce "If you want to join Please Regiter Now In The Lower merullian.",0;
end;

OnTimer50000:
announce "Last 10 seconds.",0;
end;

OnTimer55000:
announce "5.",0;
end;

OnTimer56000:
announce "4.",0;
end;

OnTimer57000:
announce "3.",0;
end;

OnTimer58000:
announce "2.",0;
end;

OnTimer59000:
announce "1.",0;
end;

OnTimer60000:
announce "Registration is Now Over.",0;
end;

OnTimer61000:
disablenpc "Juggernaut warper";
donpcevent "Prize Giver::OnEnablea";
stopnpctimer;
end;
}

merullian,105,53,6 script Juggernaut warper 106,{
mes "[Juggernaut]";
mes "Hello What can I do for you?";
next;
menu "Register",-,"Information",what,"Leave",leave;
next;
mes "[Juggernaut]";
mes "Thankyou for registering Mr. " + strcharinfo(0) + ", Have fun!";
warp "Coliseum",102,123;
end;
what:
mes "[Juggernaut]";
mes "Juggernaut Is All About Killing Jaggernaut.";
next;
mes "[Juggernaut]";
mes "Juggernaut Drops a Rare Item Which is Bowser That You Can Equip.";
mes "The Effect of the [1]bowser is Give 3% attack power and damage to demi human.";
next;
mes "[Juggernaut]";
mes "That's all";
close;
leave:
mes "[Juggernaut]";
mes "I hope you will register next time";
close;

}
//--------------------------
Coliseum,103,102,115 script Prize Giver 56,{

mes "[Prize Giver]";
mes "Congrats. You've won.";
next;
announce "Juggernaut: We have a winner! well done "+strcharinfo(0)+".",0;
getitem 12103, 5; // Change This item id to what ever you want . item id,amount
warp "merullian",105,58;
hideonnpc "Prize Giver";
end;
OnEnablea:
mapannounce "Coliseum","Kill Me Im The Juggernaut And Receive A Great Prize.",0;
monster "Coliseum",0,0,"Juggernaut",2152,1,"Prize Giver::OnSpecialMobDeada";
goto L_Starta;
end;
L_Starta:
if(getmapusers("Coliseum") == 0) goto L_Nonea;
if(getmapusers("Coliseum") > 1) {
goto timer;
end;
}
timer:
initnpctimer;
end;
OnTimer100:
end;

OnTimer500:
if(getmapusers("Coliseum") > 2) goto timer;
if(getmapusers("Coliseum") == 0) goto L_Nonea;
stopnpctimer;
end;
L_None:
hideonnpc "Prize Giver";
killmonster "Coliseum","All";
warp "merullian",105,58;
end;

OnSpecialMobDeada:
announce "We've got a winner: " + strcharinfo(0) + " Killed The Juggernaut!",0;
getitem 12103,5;
sleep 2000;
warp "merullian",105,58;
end;
}
//----- Die = warp prt -----
- script Killa_warpa -1,{
OnPCDieEvent:
getmapxy(.@map$,.@x,.@y,0);
if(.@map$=="Coliseum")
{
 dispbottom "You are killed.";
 warp "merullian",105,58;
 end;
}
}
splendide,186,198,6 script Jugger 106,{
if(!getgmlevel())end;
menu "[start]",StartStart;
StartStart:
donpcevent "juggernaut::Onshfnbsnba";
close;
}

Coliseum mapflag nowarp
Coliseum mapflag nowarpto
Coliseum mapflag noteleport
Coliseum mapflag nosave
Coliseum mapflag nomemo
Coliseum mapflag nobranch

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   1
  • Joined:  10/09/18
  • Last Seen:  

UP

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

On 5/16/2012 at 12:36 PM, glemor123 said:

i scripted my own automated event...

i want that when no one joined the event the event will be canceled

i want that when you have been killed,you will be automatically teleported to your savepoint

i want that when juggernaut is killed we will have 30 seconds to stay in the map before we are all teleported to our save points

 


- script juggernaut -1,{
OnInit:
hideonnpc  "Prize Giver";
disablenpc "Juggernaut warper";
end;
Onshfnbsnba:
OnClock0000:
OnClock0400:
OnClock0900:
OnClock1400:
OnClock2400:
goto startjugger;
startjugger:
announce "Juggernaut event has Started.",0;
sleep2 20000;
announce "Please Regiter Now On The South of merullian.",0;
enablenpc "Juggernaut warper";
   initnpctimer;
end;
OnTimer70000:
announce "Last 1 Minute.",0;
sleep2 5000;
announce "If you want to join Please Regiter Now In The Lower merullian.",0;
end;

OnTimer50000:
announce "Last 10 seconds.",0;
end;

OnTimer55000:
announce "5.",0;
end;

OnTimer56000:
announce "4.",0;
end;

OnTimer57000:
announce "3.",0;
end;

OnTimer58000:
announce "2.",0;
end;

OnTimer59000:
announce "1.",0;
end;

OnTimer60000:
announce "Registration is Now Over.",0;
end;

OnTimer61000:
disablenpc "Juggernaut warper";
donpcevent "Prize Giver::OnEnablea";
stopnpctimer;
end;
}

merullian,105,53,6 script Juggernaut warper 106,{
mes "[Juggernaut]";
mes "Hello What can I do for you?";
next;
menu "Register",-,"Information",what,"Leave",leave;
next;
mes "[Juggernaut]";
mes "Thankyou for registering Mr. " + strcharinfo(0) + ", Have fun!";
warp "Coliseum",102,123;
end;
what:
mes "[Juggernaut]";
mes "Juggernaut Is All About Killing Jaggernaut.";
next;
mes "[Juggernaut]";
mes "Juggernaut Drops a Rare Item Which is Bowser That You Can Equip.";
mes "The Effect of the [1]bowser is Give 3% attack power and damage to demi human.";
next;
mes "[Juggernaut]";
mes "That's all";
close;
leave:
mes "[Juggernaut]";
mes "I hope you will register next time";
close;

}
//--------------------------
Coliseum,103,102,115 script Prize Giver 56,{

mes "[Prize Giver]";
mes "Congrats. You've won.";
next;
announce "Juggernaut: We have a winner! well done "+strcharinfo(0)+".",0;
getitem 12103, 5; // Change This item id to what ever you want . item id,amount
warp "merullian",105,58;
hideonnpc "Prize Giver";
end;
OnEnablea:
mapannounce "Coliseum","Kill Me Im The Juggernaut And Receive A Great Prize.",0;
monster "Coliseum",0,0,"Juggernaut",2152,1,"Prize Giver::OnSpecialMobDeada";
goto L_Starta;
end;
L_Starta:
if(getmapusers("Coliseum") == 0) goto L_Nonea;
if(getmapusers("Coliseum") > 1) {
goto timer;
end;
}
timer:
initnpctimer;
end;
OnTimer100:
end;

OnTimer500:
if(getmapusers("Coliseum") > 2) goto timer;
if(getmapusers("Coliseum") == 0) goto L_Nonea;
stopnpctimer;
end;
L_None:
hideonnpc "Prize Giver";
killmonster "Coliseum","All";
warp "merullian",105,58;
end;

OnSpecialMobDeada:
announce "We've got a winner: " + strcharinfo(0) + " Killed The Juggernaut!",0;
getitem 12103,5;
sleep 2000;
warp "merullian",105,58;
end;
}
//----- Die = warp prt -----
- script Killa_warpa -1,{
OnPCDieEvent:
getmapxy(.@map$,.@x,.@y,0);
if(.@map$=="Coliseum")
{
 dispbottom "You are killed.";
 warp "merullian",105,58;
 end;
}
}
splendide,186,198,6 script Jugger 106,{
if(!getgmlevel())end;
menu "[start]",StartStart;
StartStart:
donpcevent "juggernaut::Onshfnbsnba";
close;
}

Coliseum mapflag nowarp
Coliseum mapflag nowarpto
Coliseum mapflag noteleport
Coliseum mapflag nosave
Coliseum mapflag nomemo
Coliseum mapflag nobranch
 

 

1. You already got that part right, but your label is called L_None, but you try to goto L_Nonea; 

2. At your OnPCDieEvent, exchange warp "merullian",105,58; with warp "SavePoint",0,0;

3. At OnSpecialMobDeada, exchange the sleep 2000; warp... With

sleep 30000;

mapwarp "Coliseum","SavePoint",0,0;

I will have a look at it better when I'm at home and maybe optimize since using goto is ugly.

Also you got a few unneeded OnTimer100 where nothing happens.

Butt overall not bad for your first script related to events.

Regards, 

Chris

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