Nash Posted December 29, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 174 Reputation: 0 Joined: 02/17/12 Last Seen: May 8, 2014 Share Posted December 29, 2013 Hi guys,i am using Euphy's Mvp Ladder Script Well script it awesome but dunno why the npc goes in hiding and doesnt come out backso is it possible To fix itPlease Help GuysRegards,Nash Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 29, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 29, 2013 for some reason euphy purposely made that script unreadable lol hideonnpc strnpcinfo(0);remove this part at line 68 Quote Link to comment Share on other sites More sharing options...
Euphy Posted December 29, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted December 29, 2013 It's a joke, I suggest you don't use it. xD 1 Quote Link to comment Share on other sites More sharing options...
Nash Posted December 30, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 174 Reputation: 0 Joined: 02/17/12 Last Seen: May 8, 2014 Author Share Posted December 30, 2013 lol ahhahaha it also nukes players WTF Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 31, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 31, 2013 LOL !! yeah I tried to rewrite this, feels like wasting time though /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * ~~~~~~~~ Euphy's MVP Ladder v1.3 ~~~~~~~~ * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ prontera,148,170,6 script MVP Ladder 891,{ function f00000; function f00001; function f00002; function f00003; function f00004; function f00005; function f00006; function f00007; function f00008; function f00009; f00008(0); function f00000 { if ( getmonsterinfo(killedrid,22) ) { f00009 ( strcharinfo(0)+" has slain"+" the ferocious "+strmobinfo(1,killedrid)+"!",16); setd .a00005$[8],getd(.a00005$[8])+1; if (getd(.a00005$[8])==1) query_sql("INSERT "+"INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account"+"_id`) VALUES ("+ getcharid(0) +",'" + .a00005$[8] + "','1',3,0)"); else query_sql( "UPDATE `global_reg_value` SET `value` = '" + getd(.a00005$[8])+"' WHERE char_id = " + getcharid(0) + " AND `str` ='"+.a00005$[8]+"'"); dispbottom "~ You've killed " +getd(.a00005$[8])+" MVPs. ~"; specialeffect2 313; } end; } function f00001 { for( set .@a00000,2; .@a00000<getargcount(); set .@a00000,.@a00000+1 ) setd "." +getarg(0)+ "["+(.@a00000+getarg(1,0)-2)+"]", getarg(.@a00000); return; } function f00002 { if (.a00005$[8]!= "") deletearray getd("."+getarg(0)+"[0]"),getarg(1,128); else f00001("a00005$",8,"WhyA"+"reYouReadingThis"); return; } function f00003 { if (.a00005$[0]!="") { if (@a00007) return "^777777"+getarg(0)+ "^000000"; set .@a00001, rand(1,7); set .@a00000$,.a00005$[.@a00001]; for (f00001("a00006",0,0,.@a00001); .a00006<getstrlen(getarg(0)); set .a00006,.a00006+1) { set .@a00000$, .@a00000$ + charat( getarg(0), .a00006 ) + .a00005$[.a00006[1]]; set .a00006[1],(.a00006[1]==7)?1:.a00006[1]+1; } f00002("a00006"); return .@a00000$ + .a00005$[0]; } else f00001("a00005$", 0, "^000000", "^FF0000", "^FF7F00", "^FFFF00","^00FF00","^0000FF", "^6600FF", "^8B00FF"); return; } function f00004 { if ( compare( getarg(0), "|" ) ) f00001("a00003$", 0, f00005(atoi(substr(getarg(0),1,getstrlen(getarg(0)) - 1)))); else f00001("a00003$", 0, getarg(0)); mes f00003(.a00003$); f00002("a00003$"); if ( getarg(1,0)==2) next; else if (getarg(1,0)==1) close; else if (getarg(1,0)) sleep2(getarg(1,0)); return; } function f00005 { if (.a00004$[0]!="") return .a00004$[getarg(0,0)]; else f00001("a00004$",0,"[MVP Ladde"+"r]", "Hello!", "What are you doing here?", " ~ Check rankings."," ~ My stats.", " ~ This hurts my eyes...", " ~ Turn the rainbows"+" back on!", " ~ Oh, just passing by. ;3", "See ya!" ); return; } function f00006 { set .@a00000, select(f00003( .a00004$[3]) + ":" +f00003(.a00004$[4])+ ":"+((@a00007)?":"+f00003(.a00004$[6]):f00003(.a00004$[5]) + ":") + ":" +f00003(.a00004$[7])); f00004("|0"); if (.@a00000==1) f00007(); else if (.@a00000 == 2) f00004("You have "+"killed "+getd(.a00005$[1<<3])+" MVPs.",1); else if (.@a00000==3) { if (rand(2)) { set @a00007,1; f00004("k.",1); } else { misceffect 183; percentheal -100,-100; close; } }else if (.@a00000==4){ set @a00007,0; specialeffect 410,25; f00004("Just a moment...",1);} else return; } function f00007 { query_sql("SELECT char_id,CAST(`value` AS SIGNE"+ "D) FROM `global_reg_value` WHERE `str` = '"+.a00005$[8]+"' ORDER"+ " BY CAST(`value` AS SIGNED) DESC LIMIT 20", .@a00001, .@a00002 ); for(set .@a00000, 0; .@a00000<getarraysize(.@a00001); set .@a00000, .@a00000+1) { query_sql("SELECT `name` FROM `char` WHERE char_id="+ .@a00001[.@a00000] + ";", .@a00003$); set .@a00004$[.@a00000], .@a00003$; } for(set .@a00000,0; .@a00000 < getarraysize(.@a00001); set .@a00000, .@a00000 + 1) f00004( "[" + ( .@a00000 + 1 ) + "] " + .@a00004$[.@a00000] + " ~ "+.@a00002[.@a00000] +" kills"); close; } OnInit: f00008(1); function f00008 { if ( getarg(0) ) { if ( .a00005$[8] == "") { f00002(); f00003(); f00005(); f00009(); } else { getmapxy(.@a00000$,.@a00001,.@a00002,0); monster .@a00000$, .@a00001,.@a00002," ",2194,2,strnpcinfo(0)+"::OnInit";end;}} else { f00004("|0"); f00004("|1", 400); f00004("|2", 2); f00006(); f00004( "|8", 1); } } OnNPCKillEvent: f00000(); end; function f00009 { if ( getarg( 0, "" ) == "") while(1) { sleep(5000); if ( !rand(100) ) { getmapxy( .@a00000$, .@a00001, .@a00002, 1 ); set .@a00003, 2194; setnpcdisplay( strnpcinfo(0), .@a00003 ); for( set .@a00004, 0; .@a00004 < 10; set .@a00004, .@a00004 + 1 ) { misceffect 901; monster .@a00000$, .@a00001, .@a00002, " ", .@a00003, 10, strnpcinfo(0) + "::OnInit"; sleep(2500); } hideonnpc strnpcinfo(0); end; } } else { announce getarg(0), getarg(1); return; } } }I'm able to rearrange until this partelse if (.@a00000==3) { // <-- means if you choose the menu option no.3 you have 50% chance to change the menu color into black or 50% chance to get yourself killed ... usually you shouldn't kill a player unless it is an event script because if do something like this in utility script, and you forgot to put nopenalty mapflag players will get their experience deducted in town and I remember I told euphy in PM last year how to write a script can be understood by the communitybecause if somebody else able to replicate your script and do better, you just make yourself looks plain stupidespecially in this community board lol well, euphy made his fireworks script having very high script readability, so I think he already understand by now perhaps this is 1 of his older script Quote Link to comment Share on other sites More sharing options...
Euphy Posted December 31, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted December 31, 2013 Eh... that was entirely a joke, I would never put such effort into a real script. ;D In case you need one, here's the actual version of that script (as you can see, it's pretty bare): prontera,148,170,6 script MVP Ladder 891,{ mes "[MVP Ladder]"; mes "Hello!"; mes "What are you doing here?"; next; switch(select("Check rankings.:My stats.:Nothing...")) { case 1: mes "[MVP Ladder]"; query_sql("SELECT char_id,CAST(`value` AS SIGNED) FROM `global_reg_value` WHERE `str` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value); for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) { query_sql("SELECT `name` FROM `char` WHERE char_id = "+.@cid[.@i]+";",.@j$); set .@name$[.@i], .@j$; } if (!getarraysize(.@cid)) mes "The rankings are empty."; else for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) mes "["+(.@i+1)+"] "+.@name$[.@i]+" ~ "+.@value[.@i]+" kills"; close; case 2: mes "[MVP Ladder]"; mes "You have killed "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s."); close; case 3: close; } OnNPCKillEvent: if (getmonsterinfo(killedrid,22)) { set MVP_Rank, MVP_Rank+1; if (MVP_Rank == 1) query_sql("INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ("+getcharid(0)+",'MVP_Rank','1',3,0)"); else query_sql("UPDATE `global_reg_value` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `str` ='MVP_Rank'"); dispbottom "~ You've killed "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~"; specialeffect2 313; } end; } 2 Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 31, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 31, 2013 (edited) LOL, then you should've put this script into your script release xD haha, make me laugh until my stomachache ! I had fun *cracking* your unreadable script lol though of course I know how to produce from scratch too EDIT: query_sql("SELECT char_id,CAST(`value` AS SIGNED) FROM `global_reg_value` WHERE `str` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value);now this is interesting ...I just recheck sql-files\main.sql CREATE TABLE IF NOT EXISTS `global_reg_value` ( `char_id` int(11) unsigned NOT NULL default '0', `str` varchar(255) NOT NULL default '', `value` varchar(255) NOT NULL default '0', `type` tinyint(1) NOT NULL default '3', `account_id` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`,`str`,`account_id`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM;the `value` and `str` isn't indexmeans, your script probably will run through the whole table to sort the value ... its very unoptimized way to write this perhaps, it might be better to do this via altering the `char` table... Edited December 31, 2013 by AnnieRuru 1 Quote Link to comment Share on other sites More sharing options...
Question
Nash
Hi guys,
i am using Euphy's Mvp Ladder Script
Well script it awesome but dunno why the npc goes in hiding and doesnt come out back
so is it possible To fix it
Please Help Guys
Regards,
Nash
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.