Jump to content

GM-Murphy

Members
  • Posts

    5
  • Joined

  • Last visited

About GM-Murphy

  • Birthday 04/11/1995

Profile Information

  • Gender
    Male
  • Server
    VanroLegacy

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

GM-Murphy's Achievements

Santa Poring

Santa Poring (3/15)

  • First Post Rare
  • Conversation Starter Rare
  • One Month Later Rare
  • Dedicated Rare
  • Week One Done Rare

Recent Badges

0

Reputation

  1. //===== Script =============================================== //= Code Breaker [v1.1] //===== By: ================================================== //= Xantara //===== Additional Comments: ================================= //= 1.0 Initial Release //= 1.1 Took out unused [email protected] variable // Implemented KeyWorld's createCode optimization //============================================================ prontera,147,172,5 script Code Breaker 106,{ function gmPanel; function validGuess; function createCode; function getCode; function evaluateGuess; function winGame; while(1) { if( getgmlevel() >= .minGMlvl ) gmPanel(); mes .NPC$; mes "Hello. Want to play Code Breaker?"; next; switch(select("- Lets play!:- No thanks.:- Information")){ case 1: mes .NPC$; mes "What level of difficulty do you want to play Code Breaker in?"; next; set [email protected], select("- Easy:- Medium:- Hard"); createCode(); mes .NPC$; while( [email protected] != .CB_Guess[[email protected]] ) { mes "Guess a 3 digit number:"; mes "# of Tries: ^FF0000"+ [email protected] +"^000000 / ^3355FF"+ .CB_Guess[[email protected]] +"^000000"; next; input [email protected]; if(validGuess([email protected])) { if([email protected] == getCode()) winGame([email protected]); else evaluateGuess([email protected]); set [email protected], [email protected] + 1; } } next; mes .NPC$; mes "I'm sorry! You did not win the game. The number was ^FF0000"+ getCode() +"^000000 Try again."; close; case 2: mes .NPC$; mes "See ya around!"; close; case 3: mes .NPC$; mes "Objective of the game is to guess a 3 digit number where none of the digits repeat."; next; mes .NPC$; mes "There are 3 difficulty settings depending on the number of guesses."; for( set [email protected],1; [email protected] < getarraysize(.CB_Guess); set [email protected],[email protected]+1 ) mes "- "+ .CB_Diff$[[email protected]] +": "+ .CB_Guess[[email protected]] +" Tries"; next; mes .NPC$; mes "I will give you a clue in regards to your previous guess. Code guide:"; mes "- ^FF0000C^000000 stands for the number of numbers that are correct and in the right position."; next; mes .NPC$; mes "I will give you a clue in regards to your previous guess. Code guide:"; mes "- ^FF0000N^000000 stands for the number of correct numbers that are in the wrong position."; next; mes .NPC$; mes "Prizes are as follows:"; for( set [email protected],1; [email protected] < getarraysize(.CB_Diff$); set [email protected],[email protected]+1 ) mes "- "+ .CB_Diff$[[email protected]] +": ^FF0000"+ $CB_Prize[[email protected]+3] +"^000000x ^FF0000"+ getitemname($CB_Prize[[email protected]])+"^000000"; break; } next; } function gmPanel { while(1) { mes .NPC$; mes "Hello GM. What can I do for you?"; next; set [email protected], select("- Edit Easy Prize:- Edit Medium Prize:- Edit Hard Prize:- Player Mode"); if([email protected] == 4) break; mes .NPC$; mes "Mode: Editing "+ .CB_Diff$[[email protected]] +" Prize"; mes "Insert new prize ^FF0000item ID^000000"; next; input [email protected]; mes .NPC$; mes "Mode: Editing "+ .CB_Diff$[[email protected]] +" Prize"; mes "Insert new prize ^FF0000amount^000000"; next; input [email protected]; next; mes .NPC$; mes "Mode: Editing "+ .CB_Diff$[[email protected]] +" Prize"; mes "Are you sure you want to change the prize to ^FF0000"+ [email protected] +"^000000x ^FF0000"+ getitemname([email protected]) +"^000000?"; next; if(select("No, it's wrong!:Yes, I'm sure.")==2){ mes .NPC$; mes "Mode: Editing "+ .CB_Diff$[[email protected]] +" Prize"; mes "Done!"; set $CB_Prize[[email protected]], [email protected]; set $CB_Prize[[email protected]+3], [email protected]; next; } } } function validGuess { set [email protected], getarg(0); if( [email protected] < 100 || [email protected] > 999 ) { mes "^FF0000Invalid Guess. Must be a 3 digit number.^000000"; mes " "; return 0; } set [email protected], [email protected] / 100; set [email protected], ([email protected] % 100) / 10; set [email protected], [email protected] % 10; if( ([email protected] == [email protected]) || ([email protected] == [email protected]) || ([email protected] == [email protected]) ) { mes "^FF0000Invalid Guess. Do not use a number more than once.^000000"; mes " "; return 0; } return 1; } function createCode { for ( setarray [email protected],1,2,3,4,5,6,7,8,9; [email protected]<3; set [email protected],[email protected]+1 ) { set [email protected], rand([email protected]); set @CB_code[[email protected]+1], [email protected][[email protected]]; deletearray [email protected][[email protected]], 1; } } function getCode { set [email protected], @CB_code[1]; set [email protected], @CB_code[2]; set [email protected], @CB_code[3]; return ( ([email protected] * 100) + ([email protected] * 10) + [email protected] ); } function evaluateGuess { set [email protected][1], getarg(0) / 100; set [email protected][2], (getarg(0) % 100) / 10; set [email protected][3], getarg(0) % 10; if( [email protected][1] == @CB_code[1] ) set [email protected],[email protected] + 1; if( [email protected][2] == @CB_code[2] ) set [email protected],[email protected] + 1; if( [email protected][3] == @CB_code[3] ) set [email protected],[email protected] + 1; if( ([email protected][1] == @CB_code[2]) || ([email protected][1] == @CB_code[3]) ) set [email protected],[email protected] + 1; if( ([email protected][2] == @CB_code[1]) || ([email protected][2] == @CB_code[3]) ) set [email protected],[email protected] + 1; if( ([email protected][3] == @CB_code[1]) || ([email protected][3] == @CB_code[2]) ) set [email protected],[email protected] + 1; mes .NPC$; mes "Last guess ^3355FF"+ getarg(0) +"^000000 had ^FF0000"+ [email protected] +"^000000 C and ^FF0000"+ [email protected] +"^000000 N"; mes " "; return; } function winGame { set [email protected], getarg(0); mes .NPC$; mes "Congratulations, you cracked the code!"; mes "Difficulty: ^3355FF"+ .CB_Diff$[[email protected]] +"^000000"; next; mes .NPC$; mes "Here is your prize. Enjoy!"; getitem $CB_Prize[[email protected]], $CB_Prize[[email protected]+3]; close; } OnInit: // ---- CONFIG ------------------------------------------------------------------------------------ // NPC Name set .NPC$, "[ Code Breaker ]"; // Minimum GM Level for GM Panel. [Default: 60] set .minGMlvl, 60; // Number of Guesses per Difficulty (Easy, Medium, Hard) [Default: 5, 3, 2] setarray .CB_Guess[1], 5, 3, 2; // ---- END OF CONFIG ----------------------------------------------------------------------------- setarray .CB_Diff$[1], "Easy", "Medium", "Hard"; if(!$CB_Prize[1]) setarray $CB_Prize[1], 909,909,909, 1,2,3; end; }
  2. prontera,114,154,5 script Poring Race 568,{ if( .access_Prace == 0 ) { mes "[Event Employee: Poring Race]"; mes "Poring Race has ended."; close; } mes "[Event Employee: Poring Race]"; mes "Do you want to participate on Poring Race?"; if( select( "Yes","No" ) -1 ) { next; mes "[Event Employee: Poring Race]"; mes "See you again next time!"; close; } if( .access_Prace == 0 ) { next; mes "[Event Employee: Poring Race]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } close2; @prace_winner$ = ""; warp "p_track01",52,41; end; // OnInit: OnClock1434: if( gettime(3)%2 ) end; set .access_Prace, 1; announce "Event Employee [Poring Race]: Poring Race is about to begin. To participate kindly approach me at Event Room or use @event",0; setnpctimer 100000,"Bidder#prace0"; startnpctimer "Bidder#prace0"; end; OnPraceEnd: set .access_Prace, 0; announce "Event Employee [Poring Race]: Poring Race is over! Thank you for participating.",0; end; } p_track01,58,41,3 script Bidder#prace0 877,{ function checkevent; if( getstrlen( @prace_winner$ ) ) { mes "[Event Employee: Poring Race Bidder]"; mes "You have choose ^00bb00"+ @prace_winner$ +"^000000"; close; } else if ( checkevent() || .start ) { mes "[Event Employee: Poring Race Bidder]"; mes "There is a race in progress..."; close; } else if( !getvariableofnpc( .access_Prace,"Poring Race" ) ) { mes "[Event Employee: Poring Race Bidder]"; mes "There is no race."; close; } mes "[Event Employee: Poring Race Bidder]"; mes "Choose the poring you want to bet:"; mes "It will cost "+ .zeny_req +" Zeny."; [email protected] = select( .menu_$ ); if( [email protected] == 7 ) { next; mes "[Event Employee: Poring Race Bidder]"; mes "Goodbye."; close; } [email protected]$ = .monst_$[ [email protected] -1 ]; if ( checkevent() ) { next; mes "[Event Employee: Poring Race Bidder]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } else if( Zeny < .zeny_req ) { next; mes "[Event Employee: Poring Race Bidder]"; mes "You don't have enough Zeny."; close; } Zeny -= .zeny_req; @prace_winner$ = [email protected]$; .prace_bidders[ .prace_bets ] = getcharid(3); .prace_bets++; next; mes "[Event Employee: Poring Race Bidder]"; mes "[Event Employee: Poring Race Bidder]: I have "+ .prace_bets +" bets."; initnpctimer; npctalk "[Event Employee: Poring Race Bidder]: I got "+ strcharinfo(0) +" bet!"; close; OnTimer60000: npctalk "[Event Employee: Poring Race Bidder]: I got "+ .prace_bets +" 's bets. Anyone else?"; end; OnTimer80000: npctalk "[Event Employee: Poring Race Bidder]: The race will start soon. Last chance."; end; OnTimer90000: stopnpctimer; .start = 1; mapannounce "p_track01","Porings, on your marks...",1,0xFFAB54; sleep 2500; for( [email protected] = 3; [email protected] > 0; [email protected] ) { mapannounce "p_track01","..."+ [email protected] +"...",1,0xFFAB54; sleep 1000; } donpcevent strnpcinfo(0) +"::OnStartRace"; sleep 1000; mapannounce "p_track01","Gooo!!!",1,0xFFAB54; end; OnTimer320000: mapwarp "p_track01","prontera",142,170; donpcevent "Poring Race::OnPraceEnd"; .prace_winner$ = ""; .start = .prace_bets = 0; donpcevent strnpcinfo(0) +"::OnReturnRace"; end; OnStartRace: callsub L_label, "OnRace"; OnStopRace: callsub L_label, "OnStop"; OnReturnRace: callsub L_label, "OnReturn"; L_label: donpcevent "Metaling#prace3::"+ getarg(0); donpcevent "Poring#prace1::"+ getarg(0); donpcevent "Poporing#prace6::"+ getarg(0); donpcevent "Angeling#prace2::"+ getarg(0); donpcevent "Santa Poring#prace5::"+ getarg(0); donpcevent "Deviling#prace4::"+ getarg(0); if( getarg(0) == "OnStop" && .prace_winner$ != "" ) callsub L_WinRace; end; L_WinRace: mapannounce "p_track01", "The winner is "+ .prace_winner$,1,0xFFAB54; donpcevent strnpcinfo(0) +"::OnChequeo"; sleep 3000; donpcevent strnpcinfo(0) +"::OnReturnRace"; sleep 10000; mapwarp "p_track01","prontera",142,170; donpcevent "Poring Race::OnPraceEnd"; .prace_winner$ = ""; .start = .prace_bets = 0; end; OnChequeo: for( [email protected] = 0 ; [email protected] < getarraysize( .prace_bidders ); [email protected]++ ) { if( attachrid( .prace_bidders[[email protected]] ) && getstrlen( @prace_winner$ ) ) { dispbottom "The winner is "+ .prace_winner$ +" and you have bet for "+ @prace_winner$ +"."; if( @prace_winner$ == .prace_winner$ ) { dispbottom "You have won!"; mapannounce "p_track01"," Congratulations! "+ strcharinfo(0) +" has won!",1,0xFFAB54; getitem .item_gained, .item_num_gain; emotion 21,1; } else { dispbottom "You have lost."; emotion 28,1; } @prace_winner$ = ""; } } deletearray .prace_bidders; end; OnInit: .zeny_req = 10000000; .item_gained = 36008; .item_num_gain = 5; setarray .monst_$,"Poring","Angeling","Metaling","Deviling","Santa Poring","Poporing","None"; .menu_$ = implode( .monst_$, ":" ); end; function checkevent { getmapxy [email protected]$, [email protected], [email protected], 1, "Poring#prace1"; getmapxy [email protected]$, [email protected], [email protected], 1, "Angeling#prace2"; getmapxy [email protected]$, [email protected], [email protected], 1, "Metaling#prace3"; getmapxy [email protected]$, [email protected], [email protected], 1, "Deviling#prace4"; getmapxy [email protected]$, [email protected], [email protected], 1, "Santa Poring#prace5"; getmapxy [email protected]$, [email protected], [email protected], 1, "Poporing#prace6"; [email protected] = ( [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] ) != 58 * 6; return [email protected]; } } //----------------------------------- // Racer NPC's //----------------------------------- - script pori_race -1,{ OnRace: initnpctimer; end; OnStop: stopnpctimer; end; OnReturn: sleep 1000; while( strnpcinfo(1) != .monst$[ [email protected] ] ) [email protected]++; movenpc strnpcinfo(3), 58, .walk_t[[email protected]]; end; OnTimer1100: getmapxy [email protected]$,[email protected],[email protected],1, strnpcinfo(3); if( rand(100) < .prace_random ) npcwalkto [email protected], [email protected]; [email protected] = rand( .prace_random2 ); if ( [email protected] -1 == 29 ) { while( strnpcinfo(1) != .monst$[ [email protected] ] ) [email protected]++; set getvariableofnpc( .prace_winner$, "Bidder#prace0" ), .monst$[ [email protected] ]; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; end; } stopnpctimer; setnpctimer [email protected]; startnpctimer; end; OnInit: deletearray .walk_t; deletearray .monst$; setarray .walk_t, 38, 36, 34, 32, 30, 28; setarray .monst$, "Poring", "Angeling", "Metaling", "Deviling", "Santa Poring", "Poporing"; .prace_random = 70; .prace_random2 = 600; end; } p_track01,58,38,2 duplicate(pori_race) Poring#prace1 1002 p_track01,58,36,2 duplicate(pori_race) Angeling#prace2 1096 p_track01,58,34,2 duplicate(pori_race) Metaling#prace3 1613 p_track01,58,32,2 duplicate(pori_race) Deviling#prace4 1582 p_track01,58,30,2 duplicate(pori_race) Santa Poring#prace5 1062 p_track01,58,28,2 duplicate(pori_race) Poporing#prace6 1031 p_track01,78,42,0 warp p_track002 1,3,prontera,156,191 p_track01 mapflag nobranch p_track01 mapflag noicewall p_track01 mapflag nomemo p_track01 mapflag noreturn p_track01 mapflag noteleport p_track01 mapflag nowarpto p_track01 mapflag nowarp p_track01 mapflag noskill p_track01 mapflag pvp off p_track01 mapflag nosave
  3. it says poring race has ended everytime i click the npc
  4. They can still use memo how to fix
  5. prontera,114,154,5 script Poring Race 561,{ if( .access_Prace == 0 ) { mes "[Event Employee: Poring Race]"; mes "Poring Race has ended."; close; } mes "[Event Employee: Poring Race]"; mes "Do you want to participate on Poring Race?"; if( select( "Yes","No" ) -1 ) { next; mes "[Event Employee: Poring Race]"; mes "See you again next time!"; close; } if( .access_Prace == 0 ) { next; mes "[Event Employee: Poring Race]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } close2; @prace_winner$ = ""; warp "p_track01",52,41; end; // OnInit: OnClock1434: if( gettime(3)%2 ) end; set .access_Prace, 1; announce "Event Employee [Poring Race]: Poring Race is about to begin. To participate kindly approach me at Event Room or use @event",0; setnpctimer 100000,"Bidder#prace0"; startnpctimer "Bidder#prace0"; end; OnPraceEnd: set .access_Prace, 0; announce "Event Employee [Poring Race]: Poring Race is over! Thank you for participating.",0; end; } p_track01,58,41,3 script Bidder#prace0 877,{ function checkevent; if( getstrlen( @prace_winner$ ) ) { mes "[Event Employee: Poring Race Bidder]"; mes "You have choose ^00bb00"+ @prace_winner$ +"^000000"; close; } else if ( checkevent() || .start ) { mes "[Event Employee: Poring Race Bidder]"; mes "There is a race in progress..."; close; } else if( !getvariableofnpc( .access_Prace,"Poring Race" ) ) { mes "[Event Employee: Poring Race Bidder]"; mes "There is no race."; close; } mes "[Event Employee: Poring Race Bidder]"; mes "Choose the poring you want to bet:"; mes "It will cost "+ .zeny_req +" Zeny."; [email protected] = select( .menu_$ ); if( [email protected] == 7 ) { next; mes "[Event Employee: Poring Race Bidder]"; mes "Goodbye."; close; } [email protected]$ = .monst_$[ [email protected] -1 ]; if ( checkevent() ) { next; mes "[Event Employee: Poring Race Bidder]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } else if( Zeny < .zeny_req ) { next; mes "[Event Employee: Poring Race Bidder]"; mes "You don't have enough Zeny."; close; } Zeny -= .zeny_req; @prace_winner$ = [email protected]$; .prace_bidders[ .prace_bets ] = getcharid(3); .prace_bets++; next; mes "[Event Employee: Poring Race Bidder]"; mes "[Event Employee: Poring Race Bidder]: I have "+ .prace_bets +" bets."; initnpctimer; npctalk "[Event Employee: Poring Race Bidder]: I got "+ strcharinfo(0) +" bet!"; close; OnTimer60000: npctalk "[Event Employee: Poring Race Bidder]: I got "+ .prace_bets +" 's bets. Anyone else?"; end; OnTimer80000: npctalk "[Event Employee: Poring Race Bidder]: The race will start soon. Last chance."; end; OnTimer90000: stopnpctimer; .start = 1; mapannounce "p_track01","Porings, on your marks...",1,0xFFAB54; sleep 2500; for( [email protected] = 3; [email protected] > 0; [email protected] ) { mapannounce "p_track01","..."+ [email protected] +"...",1,0xFFAB54; sleep 1000; } donpcevent strnpcinfo(0) +"::OnStartRace"; sleep 1000; mapannounce "p_track01","Gooo!!!",1,0xFFAB54; end; OnTimer320000: mapwarp "p_track01","prontera",142,170; donpcevent "Poring Race::OnPraceEnd"; .prace_winner$ = ""; .start = .prace_bets = 0; donpcevent strnpcinfo(0) +"::OnReturnRace"; end; OnStartRace: callsub L_label, "OnRace"; OnStopRace: callsub L_label, "OnStop"; OnReturnRace: callsub L_label, "OnReturn"; L_label: donpcevent "Metaling#prace3::"+ getarg(0); donpcevent "Poring#prace1::"+ getarg(0); donpcevent "Poporing#prace6::"+ getarg(0); donpcevent "Angeling#prace2::"+ getarg(0); donpcevent "Santa Poring#prace5::"+ getarg(0); donpcevent "Deviling#prace4::"+ getarg(0); if( getarg(0) == "OnStop" && .prace_winner$ != "" ) callsub L_WinRace; end; L_WinRace: mapannounce "p_track01", "The winner is "+ .prace_winner$,1,0xFFAB54; donpcevent strnpcinfo(0) +"::OnChequeo"; sleep 3000; donpcevent strnpcinfo(0) +"::OnReturnRace"; sleep 10000; mapwarp "p_track01","prontera",142,170; donpcevent "Poring Race::OnPraceEnd"; .prace_winner$ = ""; .start = .prace_bets = 0; end; OnChequeo: for( [email protected] = 0 ; [email protected] < getarraysize( .prace_bidders ); [email protected]++ ) { if( attachrid( .prace_bidders[[email protected]] ) && getstrlen( @prace_winner$ ) ) { dispbottom "The winner is "+ .prace_winner$ +" and you have bet for "+ @prace_winner$ +"."; if( @prace_winner$ == .prace_winner$ ) { dispbottom "You have won!"; mapannounce "p_track01"," Congratulations! "+ strcharinfo(0) +" has won!",1,0xFFAB54; getitem .item_gained, .item_num_gain; emotion 21,1; } else { dispbottom "You have lost."; emotion 28,1; } @prace_winner$ = ""; } } deletearray .prace_bidders; end; OnInit: .zeny_req = 10000000; .item_gained = 36008; .item_num_gain = 5; setarray .monst_$,"Poring","Angeling","Metaling","Deviling","Santa Poring","Poporing","None"; .menu_$ = implode( .monst_$, ":" ); end; function checkevent { getmapxy [email protected]$, [email protected], [email protected], 1, "Poring#prace1"; getmapxy [email protected]$, [email protected], [email protected], 1, "Angeling#prace2"; getmapxy [email protected]$, [email protected], [email protected], 1, "Metaling#prace3"; getmapxy [email protected]$, [email protected], [email protected], 1, "Deviling#prace4"; getmapxy [email protected]$, [email protected], [email protected], 1, "Santa Poring#prace5"; getmapxy [email protected]$, [email protected], [email protected], 1, "Poporing#prace6"; [email protected] = ( [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] ) != 58 * 6; return [email protected]; } } //----------------------------------- // Racer NPC's //----------------------------------- - script pori_race -1,{ OnRace: initnpctimer; end; OnStop: stopnpctimer; end; OnReturn: sleep 1000; while( strnpcinfo(1) != .monst$[ [email protected] ] ) [email protected]++; movenpc strnpcinfo(3), 58, .walk_t[[email protected]]; end; OnTimer1100: getmapxy [email protected]$,[email protected],[email protected],1, strnpcinfo(3); if( rand(100) < .prace_random ) npcwalkto [email protected], [email protected]; [email protected] = rand( .prace_random2 ); if ( [email protected] -1 == 29 ) { while( strnpcinfo(1) != .monst$[ [email protected] ] ) [email protected]++; set getvariableofnpc( .prace_winner$, "Bidder#prace0" ), .monst$[ [email protected] ]; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; end; } stopnpctimer; setnpctimer [email protected]; startnpctimer; end; OnInit: deletearray .walk_t; deletearray .monst$; setarray .walk_t, 38, 36, 34, 32, 30, 28; setarray .monst$, "Poring", "Angeling", "Metaling", "Deviling", "Santa Poring", "Poporing"; .prace_random = 70; .prace_random2 = 600; end; } p_track01,58,38,2 duplicate(pori_race) Poring#prace1 1002 p_track01,58,36,2 duplicate(pori_race) Angeling#prace2 1096 p_track01,58,34,2 duplicate(pori_race) Metaling#prace3 1613 p_track01,58,32,2 duplicate(pori_race) Deviling#prace4 1582 p_track01,58,30,2 duplicate(pori_race) Santa Poring#prace5 1062 p_track01,58,28,2 duplicate(pori_race) Poporing#prace6 1031 p_track01,78,42,0 warp p_track002 1,3,prontera,156,191 p_track01 mapflag nobranch p_track01 mapflag noicewall p_track01 mapflag nomemo p_track01 mapflag noreturn p_track01 mapflag noteleport p_track01 mapflag nowarpto p_track01 mapflag nowarp p_track01 mapflag noskill p_track01 mapflag pvp off p_track01 mapflag nosave
×
×
  • Create New...

Important Information

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