Jump to content
  • 0

Dice Event x<


Question

Posted

Hi,

I've got a problem with this script:

It won't start >.< and my console says the problem is at line 25 (OnInit)

Btw. how I can enable the console without serverrestarting? I heared there should be a command for PuTTy? :>

//##########################################################################
// #
//By: ____       _  __   ___           ____    _____  #
//   | \   ___ __ __ _ | |  \ \   / /_  _   _  / ___\  / ____| #
//   | ||  | / _ \\ \  / /| || |   \ \ / /| || \ | || | ___ | (___   #
//   | ||  ||  __/ \ \/ / | || |__  \ \/\/ / | ||  \| || |___|\ \___ \  #
// __|____/__\___|__\__/__|_||____|_____\_/\_/__|_||_|\__|_\_____/_____) | #
//|_____________________________________________________________________/  #
//  #
//##########################################################################
//  #
//== Dice Event #
//  #
//##########################################################################
//  #
//== Automatically starts a dice event every 30 minutes of every hour   #
//  #
//== Prize- Change 13723 to any item ID you want the winner to recieved #
//  # 
//##########################################################################

- script Dice#announcer -1,{

OnInit:
disablenpc "prtevent";
hideonnpc "Dice#evnt1";
end;

OnMinute1:
announce "Dice: Das Dice Event beginnt..",0;
sleep2 10000;
announce "Dice: Wer daran teilnehmen möchte soll in das Portal in der Mitte von Prontera Village eintreten.",0;
sleep2 10000;
announce "Dice: In 1 Minute wird das Portal geschlossen.",0;
sleep2 10000;
announce "Dice: Wer am Dice Event teilnehmen möchte soll in das Portal in der Mitte der Maintown eintreten.",0;
enablenpc "prtevent";
initnpctimer;
end;

OnTimer30000:
announce "Dice: Noch 30 Sekunden.",0;
sleep2 5000;
announce "Dice: Tretet ein in das Warp Portal in der Maintown ein um am Dice Event teilzunehmen.",0;
end;

OnTimer50000:
announce "Dice: Noch 10 Sekunden.",0;
end;

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

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

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

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

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

OnTimer60000:
announce "Dice: Zeit vorbei.",0;
end;

OnTimer61000:
disablenpc "prtevent";
donpcevent "Dice#evnt1::OnEnable";
stopnpctimer;
end;

OnTimer62000:
announce "Dice: Das nächste Dice Event beginnt in 30 Minuten.",0;
end;
}

//--------------------------------------------------

prt_vilg01,99,86,0 warp prtevent 2,2,quiz_01,204,90

//--------------------------------------------------

quiz_01,204,93,6 script Dice#evnt1 715,{

//--------------------------------------------------

mes "[Dice]";
mes "Bitte sag mir deinen Namen";
next;
input .@name$;
if(.@name$ != strcharinfo(0)) {
mes "[Dice]";
mes "Bist du dir sicher, dass dies dein Characktername ist?";
close;
}
mes "[Dice]";
mes "Glückwunsch, du hast gewonnen.";
close2;
announce "Dice: Wir haben einen Gewinner, "+.@name$+".",0;
getitem 7539,3;
warp "prt_vilg01",99,75;
disablenpc "Dice#evnt1";
end;

OnEnable:
mapannounce "quiz_01","Dice: Das Dice Event wird gleich beginnen.",0;
sleep2 10000;
mapannounce "quiz_01","Dice: Aber bevor wir das Event starten wird euch beschrieben wie das Spiel funktioniert. . .",0;
sleep2 10000;
mapannounce "quiz_01","Dice: Ich sage es nur einmal also passt gut auf.",0;
sleep2 10000;
mapannounce "quiz_01","Dice: Ich würfle eine Zahl von 1 bis 4. Danach zähle ich von 5 runter auf 0.",0;
sleep2 10000;
mapannounce "quiz_01","Dice: Alles was du tun musst ist es in eine der nummerierten Boxen zu gehen.",0;
sleep2 10000;
mapannounce "quiz_01","Dice: Beispiel, Wenn ich die Zahl 4 ziehe werden die Spieler von Feld 1 bis 3 zurück in die Stadt gewarpt.",0;
sleep2 10000;
mapannounce "quiz_01","Dice: Dies wird so oft wiederholt bis es einen Gewinner gibt.",0;
sleep2 10000;
mapannounce "quiz_01","Dice: Bevor ich es vergesse .. ihr müüst IN DIE BOX hinein you MUST GO INSIDE THE BOX, denn wer außerhalb der Box steht wird automatisch disqualifiziert.",0;
sleep2 10000;
mapannounce "quiz_01","Dice: Das wars .. lasst uns beginnen!",0;
sleep2 10000;
goto L_Start;
end;

L_Start:
if(getmapusers("quiz_01") == 1) goto L_Champ;
if(getmapusers("quiz_01") == 0) goto L_None;
if(getmapusers("quiz_01") > 1) {
announce "Dice: . . . . .",0;
set $@number, rand(1,4);
sleep2 10000;
announce "Dice: Ich habe eine Zahl gewürfelt. Bitte gehe in eine der Boxen .... LOS!",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: Zeit vorbei.",0;
donpcevent "evnt#1::OnEnable";
announce "Dice: Gewinnerzahl "+$@number+".",0;
if(($@number != 1) && ($@number != 2) && ($@number != 3)) goto L_Lose1;
if(($@number != 1) && ($@number != 2) && ($@number != 4)) goto L_Lose2;
if(($@number != 1) && ($@number != 3) && ($@number != 4)) goto L_Lose3;
if(($@number != 2) && ($@number != 3) && ($@number != 4)) goto L_Lose4;
end;
}

L_Lose1:
areawarp "quiz_01",183,81,191,60,"prt_vilg01",99,75;
areawarp "quiz_01",195,81,203,60,"prt_vilg01",99,75;
areawarp "quiz_01",207,81,215,60,"prt_vilg01",99,75;
goto L_Start;
end;

L_Lose2:
areawarp "quiz_01",183,81,191,60,"prt_vilg01",99,75;
areawarp "quiz_01",195,81,203,60,"prt_vilg01",99,75;
areawarp "quiz_01",219,81,227,60,"prt_vilg01",99,75;
goto L_Start;
end;

L_Lose3:
areawarp "quiz_01",183,81,191,60,"prt_vilg01",99,75;
areawarp "quiz_01",207,81,215,60,"prt_vilg01",99,75;
areawarp "quiz_01",219,81,227,60,"prt_vilg01",99,75;
goto L_Start;
end;

L_Lose4:
areawarp "quiz_01",195,81,203,60,"prt_vilg01",99,75;
areawarp "quiz_01",207,81,215,60,"prt_vilg01",99,75;
areawarp "quiz_01",219,81,227,60,"prt_vilg01",99,75;
goto L_Start;
end;

L_Champ:
mapannounce "quiz_01","Dice: Komm zu mir und sag mir deinen Namen.",0;
hideoffnpc "Dice#evnt1";
end;

L_None:
disablenpc "Dice#evnt1";
end;
}

- script evnt#1 -1,{

OnEnable:
areawarp "quiz_01",182,94,228,88,"prt_vilg01",99,75;
areawarp "quiz_01",185,87,188,82,"prt_vilg01",99,75;
areawarp "quiz_01",197,87,200,82,"prt_vilg01",99,75;
areawarp "quiz_01",209,87,212,82,"prt_vilg01",99,75;
areawarp "quiz_01",221,87,224,82,"prt_vilg01",99,75;
end;
}

6 answers to this question

Recommended Posts

Posted (edited)

this script works like a charm , no error

be sure too us TAB between all NPCs

-<TAB>script<TAB>Dice#announcer<TAB>-1,{

//--------------------------------------------------

prontera,99,86,0<TAB>warp<TAB>prtevent<TAB>2,2,quiz_01,204,90

//--------------------------------------------------

quiz_01,204,93,6<TAB>script<TAB>Dice#evnt1<TAB>715,{

//--------------------------------------------------

Edited by ossi0110
Posted

OnMinute1:

announce "Dice: Das Dice Event beginnt..",0;

sleep2 10000;

announce "Dice: Wer daran teilnehmen möchte soll in das Portal in der Mitte von Prontera Village eintreten.",0;

sleep2 10000;

announce "Dice: In 1 Minute wird das Portal geschlossen.",0;

sleep2 10000;

announce "Dice: Wer am Dice Event teilnehmen möchte soll in das Portal in der Mitte der Maintown eintreten.",0;

enablenpc "prtevent";

initnpctimer;

end;

the game starts automaticly every 1st min of the hour

Posted

The Problem is .. if I load this Script there appear the Warp Portal.

But the NPC don't start the game. It just opens the Input: "Tell me you name:" and he give you a price without playing x<

Posted (edited)

are you testing the event whit more then 1 player ? because when you only are 1 char on the map you auto the winner

agree with this

if your playing by yourself in a test server you will win automatically

cause of these codes

mapannounce "quiz_01","Dice: Das wars .. lasst uns beginnen!",0;
sleep2 10000;
goto L_Start;
end;

L_Start:
if(getmapusers("quiz_01") == 1) goto L_Champ;

Edited by icabit

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...