-
Posts
1,238 -
Joined
-
Last visited
-
Days Won
28
Community Answers
-
Skorm's post in Get Map Player List was marked as the answer
prontera,150,150,5 script Give Item 100,{ set(.player,getcharid(3)); deletearray(.players[0],128); addrid(1); set(.players[getarraysize(.players)],getcharid(3)); detachrid; attachrid(.player); getitem(512,1,set([email protected],.players[rand(getarraysize(.players))])); npctalk rid2name([email protected])+" got a Apple!"; end; }
This is untested by me O_O and might not work because it will all happen at once.
Tested working perfectly.
-
Skorm's post in Requesting this Kind of GM Utility Script was marked as the answer
prontera,150,150,0 script Storage 100,{ set [email protected]$, "Storage"; if ( !getgmlevel() ) end; mes [email protected]$; mes "Input the name of the character"; next; input [email protected]$; query_sql("SELECT DISTINCT `account_id`,`char_id`,`online` FROM `char` WHERE `name` = '" +escape_sql([email protected]$)+ "'",[email protected],[email protected],[email protected]); if ( [email protected] && [email protected] ) { mes [email protected]$; mes "The character is currently offline."; mes "Re-routing storage..."; query_sql "INSERT INTO `storage` (`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`card0`,`card1`,`card2`,`card3`,`expire_time`) "+ "SELECT `nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`card0`,`card1`,`card2`,`card3`,`expire_time` "+ "FROM `inventory` "+ "WHERE `char_id` = "[email protected]; query_sql "UPDATE `storage` "+ "SET `account_id` = "[email protected]+" "+ "WHERE `account_id` = 0"; query_sql "UPDATE `char` "+ "SET `weapon` = DEFAULT, "+ "`shield` = DEFAULT, "+ "`head_top` = DEFAULT, "+ "`head_mid` = DEFAULT, "+ "`head_bottom` = DEFAULT, "+ "`robe` = DEFAULT "+ "WHERE `char_id` = "[email protected]; query_sql "DELETE FROM `inventory` "+ "WHERE `char_id` = "[email protected]; mes "Items Stored!"; close; } else if( [email protected] ) { mes [email protected]$; mes "That character doesn't seem to exist!"; close; } charcommand "#storeall " + [email protected]$; mes [email protected]$; mes "Done!"; close; }
Alright I'm not sure what tables eAthena has and what they don't so remove the error tables that show up.
From this...
query_sql "INSERT INTO `storage` (`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`card0`,`card1`,`card2`,`card3`,`expire_time`) "+ "SELECT `nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`card0`,`card1`,`card2`,`card3`,`expire_time` "+ -
Skorm's post in Restart every X minutes the script was marked as the answer
Put
minuteX: Where x is the minute you want the script to start on every hour.
Or
OnInit: OnTimerX: initnpctimer;
Where X is the amount of milliseconds you want to wait before re-running the script.
Oninit: <script> Sleep X; goto Oninit;
Where X is the amount of time you want to wait between activations in milliseconds.
You can do more things if a player is attached.
-
Skorm's post in Who can add whisper to this 2 npc? was marked as the answer
I'm not really sure what you mean by pub, but for different maps just full a string with all the maps that you want and compare it with the users current location.
Edit: So I thought about it and if by pub do you mean in a chat room? There really isn't a foolproof way I know of to keep a constant connection with a waiting room while returning the invoked characters rid... because and again I think this was a really dumb move... The rids aren't passed when calling a waiting room event. Instead they are obtained when you warp the player out of the waiting room... I could throw some tricks in the air like I've done before where I attached an OnTouch event to a waiting room npc and then waited for the player to enter a chatting state and cross check it with the status of the existing NPCs waiting room. But again that can be fooled by creating your own chat room in close proximity to the NPC and having someone else already in the NPCs chat room. Really I think we need more specific chat room related commands.
- script SB -1,{ L_whisper: mes "[Soul Buffer]"; mes " Hello "+strcharinfo(0)+", I am the Soul Buffer npc, i can soul link or buff you at the cost of some zeny. "; next; mes "[Soul Buffer]"; mes " What can i do for you?"; next; set [email protected],select( "Buff Me = $200,000","Soul Link Me = $200,000","I Need Both = $400,000" ); set [email protected],( ( [email protected] == 3 )? 400000:200000 ); if( Zeny < [email protected] ){ mes "You dont have enough "[email protected]+" zeny."; }else{ set Zeny,Zeny - [email protected]; if( [email protected] & 1 ){ percentheal 100,100; skilleffect 34,0; sc_start SC_BLESSING,360000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10; } if( [email protected] & 2 ){ switch ( basejob ) { case Job_Alchemist: set [email protected], 445; break; case Job_Monk: set [email protected], 447; break; case Job_Star_Gladiator: set [email protected], 448; break; case Job_Sage: set [email protected], 449; break; case Job_Crusader: set [email protected], 450; break; case Job_SuperNovice: set [email protected], 451; break; case Job_Knight: set [email protected], 452; break; case Job_Wizard: set [email protected], 453; break; case Job_Priest: set [email protected], 454; break; case Job_Bard: case Job_Dancer: set [email protected], 455; break; case Job_Rogue: set [email protected], 456; break; case Job_Assassin: set [email protected], 457; break; case Job_Blacksmith: set [email protected], 458; break; case Job_Hunter: set [email protected], 460; break; case Job_Soul_Linker: set [email protected], 461; break; default: if ( upper == 1 && baselevel < 70 ) set [email protected], 494; } if ( [email protected] ) { sc_start4 sc_spirit, 360000, 5, [email protected],0,0; skilleffect [email protected], 5; } } mes "Done, Come back to me if you need my services again."; } close; OnWhisperGlobal: if( strnpcinfo(2) != "" || !compare(.maps$,strcharinfo(3)) && !checkchatting()) end; goto L_whisper; OnInit: set .maps$, "prontera|pay_fild01|geffen|izlude"; } prontera,180,191,2 duplicate(SB) Soul Buffer#1 936 morocc,167,53,3 duplicate(SB) Soul Buffer#2 936 gonryun,148,174,6 duplicate(SB) Soul Buffer#3 936 lighthalzen,177,114,5 duplicate(SB) Soul Buffer#4 936 payon,164,213,2 duplicate(SB) Soul Buffer#5 936 -
Skorm's post in Attach timer to player was marked as the answer
prontera.gat,151,184,5 script Awesome Guy 100,{
if(#ticker<gettimetick(2)) {
mes "I think you're really awesome.";
next;
mes "Now you have to wait a week before you can hear that again.";
set #ticker, gettimetick(2)+60*60*24*7;
} else {
mes "Come back next week for your complement.";
}
close;
}
-
Skorm's post in Any npc like this? was marked as the answer
/* Run this query before installing this script... CREATE TABLE IF NOT EXISTS `news` ( `id` bigint(20) unsigned NOT NULL auto_increment, `post_name` varchar(30) NOT NULL default '', `post_id` int(11) unsigned NOT NULL default '0', `title` varchar(45) NOT NULL default '', `message` varchar(255) NOT NULL default '', `time` date NOT NULL default '0000-00-00', `status` tinyint(2) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM; */ //Version 1 prontera.gat,151,184,5 script Server News 857,{ query_sql("SELECT * FROM `news` ORDER BY `id` DESC",[email protected],[email protected]_name$,[email protected]_id,[email protected]$,[email protected]$,[email protected]$,[email protected]); set [email protected], getarraysize([email protected]_id); copyarray [email protected]_stat[0],[email protected],128; set @menu, -1; if(getgmlevel()>10) { mes .npc$; mes "Would you like to view the normal player menu?"; next; if(select("No:Yes")&2) goto L_Menu; L_GM_Menu: mes .npc$; mes "Hello, "+strcharinfo(0)+", what would you like to do?"; next; switch(select("(^11772dAdd^000000)"+(([email protected])?":(^FF0000Remove^000000)^0000FFFeature^000000):[^8700c9Submit^000000]":""))) { case 1: mes .npc$; mes "#Title# (45 Character Limit)"; input([email protected]$[[email protected]]); mes "#Message# ("+.in_len+" Character Limit)"; input([email protected]$[[email protected]]); next; while(getstrlen([email protected]$[[email protected]])<.in_len) { set([email protected], .in_len-getstrlen([email protected]$[[email protected]])); mes .npc$; mes "Would you like to add more to the message?"; mes "^656565("[email protected]+" Characters Left)^000000"; next; if(select("Yes:No")&2) break; input([email protected]$); set [email protected]$[[email protected]],[email protected]$[[email protected]][email protected]$; } set [email protected]_name$[[email protected]], strcharinfo(0); set [email protected]_id[[email protected]], getcharid(0); if(.rathena) set [email protected]$[[email protected]], gettimestr("%Y-%m-%d",21); else { query_sql("SELECT CURDATE()",[email protected]$); set [email protected]$[[email protected]],[email protected]$; } set [email protected][[email protected]], 2; set [email protected]_stat[[email protected]], 2; set [email protected], getarraysize([email protected]_id); set [email protected][[email protected]], [email protected]; mes .npc$; mes "Added!"; next; goto L_GM_Menu; case 2: mes .npc$; mes "Select a notice to remove or restore it."; next; Rm_Menu: set [email protected]$, ""; set [email protected], -1; while(set([email protected],[email protected]+1)<[email protected]) if([email protected][[email protected]]==1) set [email protected]$,[email protected]$+ [email protected]_name$[[email protected]]+ " [^0000FF"[email protected]$[[email protected]]+ "^000000] ~ ("[email protected]$[[email protected]]+"):"; else if ([email protected][[email protected]]) set [email protected]$,[email protected]$+ "^C0C0C0//"[email protected]_name$[[email protected]]+ " ["[email protected]$[[email protected]]+ "] ~ ("[email protected]$[[email protected]]+")^000000:"; else if ([email protected][[email protected]]==2) set [email protected]$,[email protected]$+ "^11772d+"[email protected]_name$[[email protected]]+ " ["[email protected]$[[email protected]]+ "] ~ ("[email protected]$[[email protected]]+")^000000:"; else if ([email protected][[email protected]]==-1) set [email protected]$,[email protected]$+ "^FF0000-"[email protected]_name$[[email protected]]+ " ["[email protected]$[[email protected]]+ "] ~ ("[email protected]$[[email protected]]+")^000000:"; set [email protected]$,[email protected]$+"[^8700c9Back^000000]"; select([email protected]$); if(@menu-1>[email protected]) goto L_GM_Menu; set [email protected][@menu-1], (([email protected][@menu-1]==-1)? [email protected]_stat[@menu-1]:-1); goto Rm_Menu; case 3: mes .npc$; mes "Select a notice to enable or disable it."; next; Ft_Menu: set [email protected]$, ""; set [email protected], -1; while(set([email protected],[email protected]+1)<[email protected]) if([email protected][[email protected]]==1) set [email protected]$,[email protected]$+ [email protected]_name$[[email protected]]+ " [^0000FF"[email protected]$[[email protected]]+ "^000000] ~ ("[email protected]$[[email protected]]+"):"; else if ([email protected][[email protected]]) set [email protected]$,[email protected]$+ "^C0C0C0//"[email protected]_name$[[email protected]]+ " ["[email protected]$[[email protected]]+ "] ~ ("[email protected]$[[email protected]]+")^000000:"; else if ([email protected][[email protected]]==2) set [email protected]$,[email protected]$+ "^11772d+"[email protected]_name$[[email protected]]+ " ["[email protected]$[[email protected]]+ "] ~ ("[email protected]$[[email protected]]+")^000000:"; else if ([email protected][[email protected]]==-1) set [email protected]$,[email protected]$+ "^FF0000-"[email protected]_name$[[email protected]]+ " ["[email protected]$[[email protected]]+ "] ~ ("[email protected]$[[email protected]]+")^000000:"; set [email protected]$,[email protected]$+"[^8700c9Back^000000]"; select([email protected]$); if(@menu>[email protected]) goto L_GM_Menu; set [email protected][@menu-1], (([email protected][@menu-1])? 0:(([email protected]_stat[@menu-1])[email protected]_stat[@menu-1]:1)); goto Ft_Menu; case 4: set [email protected], -1; set [email protected], 0; while(set([email protected],[email protected]+1)<[email protected]) { if([email protected]_stat[[email protected]]==2&&[email protected][[email protected]]==-1) set [email protected], [email protected]+1; if([email protected]_stat[[email protected]]==2&&[email protected][[email protected]]!=-1) query_sql("INSERT INTO `news` (`post_name`,`post_id`,`title`,`message`,`time`,`status`) "+ "VALUES ('"[email protected]_name$[[email protected]]+ "',"[email protected]_id[[email protected]]+ ",'"+escape_sql([email protected]$[[email protected]])+ "','"+escape_sql([email protected]$[[email protected]])+"',"+ "CURDATE(),"+(([email protected][[email protected]]>=1)?1:0)+")"); if([email protected][[email protected]][email protected]_stat[[email protected]]&&[email protected][[email protected]]!=-1) query_sql("UPDATE `news`"+ "SET `status`="+(([email protected][[email protected]]>=1)?1:0)+" "+ "WHERE `id`="+([email protected][[email protected]][email protected]+";"); if([email protected][[email protected]]<0&&[email protected]_stat[[email protected]]!=2) query_sql("DELETE FROM `news`"+ "WHERE `id`="+([email protected][[email protected]][email protected]+";"); } mes .npc$; mes "Server News Updated!"; close; } } L_Menu: set [email protected], -1; while(set([email protected],[email protected]+1)<[email protected]) if([email protected][[email protected]]) { set @menu, [email protected]; break; } L_PC_Menu: set [email protected], -1; set [email protected]$, ""; set [email protected], 0; while(set([email protected],[email protected]+1)<[email protected]) { if([email protected][[email protected]]) { set [email protected]$,[email protected]$+ [email protected]_name$[[email protected]]+ " [^0000FF"[email protected]$[[email protected]]+ "^000000] ~ ("[email protected]$[[email protected]]+"):"; setarray [email protected][[email protected]], [email protected]; } else set([email protected],[email protected]+1); } if([email protected]||[email protected]$=="") { mes .npc$; mes "I'm sorry no news has been posted."; close; } mes "[^0000FF"[email protected]$[@menu]+"^000000]"; if(compare([email protected]$[@menu],.line$)) { if(.rathena) explode(@explode$,[email protected]$[@menu],.line$); else callfunc("str_explode","@explode$[0]",[email protected]$[@menu],"/"); set [email protected], -1; set [email protected]_len, getarraysize(@explode$); while(set([email protected],[email protected]+1)<[email protected]_len) { if(.case&&!.rathena) { callfunc "str_toarray", @explode$[[email protected]], "@tmp$[0]"; set @tmp$[0],callfunc("str_changecase", @tmp$[0], 1); set @explode$[[email protected]],""; set [email protected],0; while(getstrlen(@explode$[[email protected]])<getarraysize(@tmp$)) { set @explode$[[email protected]],@explode$[[email protected]][email protected]$[[email protected]]; set [email protected],[email protected]+1; } } mes @explode$[[email protected]]; } } else { mes [email protected]$[@menu]; } mes "By: "[email protected]_name$[@menu]+"."; mes "^656565(@ "[email protected]$[@menu]+")^000000"; next; set [email protected]$,[email protected]$+"Cancel"; select([email protected]$); if(@menu>([email protected]@f)) close; set @menu, ((@menu-1)[email protected][(@menu-1)]); goto L_PC_Menu; end; OnInit: set .npc$, "[^0000FFServer News^000000]"; waitingroom "Server News!",0; set .rathena, 1; // If you're running rAthena or not. 0=off/1=on set .case, 1; // For non-rAthena only restores upper-case strings. set .in_len, 210; // Max input length. set .line$, "/"; // Line break used to seperate lines. /* Changing the linebreak for non-rAthena clients doesn't work You have to find callfunc("str_explode","@explode$[0]",[email protected]$[@menu],"/"); and change "/" to what ever you want. (Example "|").*/ } function script str_explode { if ( getarg(2,"") == "" ) return callfunc("str_toarray", getarg(1), getarg(0) ); sleep2 1; setarray [email protected]$, getarg(2), " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "e", "i", "a", "s", "r", "n", "t", "o", "u", "l", "c", "p", "m", "d", "v", "h", "g", "f", "b", "y", "q", "k", "z", "x", "j", "w", "_", "-", "|", "/", ".", "'", "[", "]", "(", ")", "=", "*", "&", "#", "@", "!", "+", "`", "~", "%", "<", ">", "?", ",", "^", ":"; set [email protected], getarraysize([email protected]$); set [email protected]$, "|~key~|"; set [email protected]$, [email protected]$ + getarg(1) ; set [email protected], getstrlen(getarg(1)); set [email protected]_len, getstrlen(getarg(2)); while( [email protected] > [email protected] ) { set [email protected], 0 ; while( [email protected] < [email protected] ) { if ( ! ( set([email protected],[email protected]+1) % 600) ) sleep2 1; if ( compare( [email protected]$ , [email protected]$ + [email protected]$[[email protected]] ) ) { set [email protected]$, [email protected]$ + [email protected]$[[email protected]]; if ( [email protected] ) set [email protected]$[[email protected]], [email protected]$[[email protected]] + [email protected]$[[email protected]]; else { set [email protected], [email protected] + 1; set [email protected], [email protected] + [email protected]_len-1 ; } break; } set [email protected], [email protected]+1 ; } if ( [email protected] == [email protected] ) return 0; else set [email protected], [email protected]+1 ; } deletearray getd(getarg(0)); copyarray getd(getarg(0)), [email protected]$, [email protected]+1; return [email protected]+1; } function script str_changecase { sleep2 1; if ( getarg(1) ) { setarray [email protected]$[ 0 ], " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "E", "I", "A", "S", "R", "N", "T", "O", "U", "L", "C", "P", "M", "D", "V", "H", "G", "F", "B", "Y", "Q", "K", "Z", "X", "J", "W", "_", "-", "(", ")", ";", ",", ":", ".", "*", "!", "?", "'"; } else { setarray [email protected]$[ 0 ], " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "e", "i", "a", "s", "r", "n", "t", "o", "u", "l", "c", "p", "m", "d", "v", "h", "g", "f", "b", "y", "q", "k", "z", "x", "j", "w", "_", "-", "(", ")", ";", ",", ":", ".", "*", "!", "?", "'"; } set [email protected], getarraysize([email protected]$); set [email protected]$, "|~key~|" + getarg(0) ; set [email protected], getstrlen(getarg(0)); while( [email protected]>[email protected] ) { set [email protected],0; while( [email protected]<[email protected] ) { if ( ! ( set([email protected],[email protected]+1) % 650) ) sleep2 1; if ( compare( [email protected]$ , "|~key~|" + [email protected]$ + [email protected]$[[email protected]] ) ) { set [email protected]$, [email protected]$ + [email protected]$[[email protected]]; break; } set [email protected], [email protected]+1; } if ( [email protected] == [email protected] ) return ""; else set [email protected], [email protected]+1; } return [email protected]$; } function script str_toarray { sleep2 1; if ( getstrlen( getarg(0) ) > 128 ) return 0; setarray [email protected]$[ 0 ], " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "e", "i", "a", "s", "r", "n", "t", "o", "u", "l", "c", "p", "m", "d", "v", "h", "g", "f", "b", "y", "q", "k", "z", "x", "j", "w", "_", "-", "(", ")", ";", ",", ":", ".", "*", "!", "?", "'"; set [email protected], getarraysize([email protected]$); set [email protected]$, "|~key~|"; set [email protected]$, [email protected]$ + getarg(0) ; set [email protected], getstrlen(getarg(0)); while( [email protected]>[email protected] ) { set [email protected],0; while( [email protected]<[email protected] ) { if ( ! ( set([email protected],[email protected]+1) % 650) ) sleep2 1; if ( compare( [email protected]$ , [email protected]$ + [email protected]$[[email protected]] ) ) { set [email protected]$, [email protected]$ + [email protected]$[[email protected]]; set [email protected]$[[email protected]], [email protected]$[[email protected]]; break; } set [email protected], [email protected]+1; } if ( [email protected] == [email protected] ) return 0; else set [email protected], [email protected]+1; } deletearray getd(getarg(1)); copyarray getd(getarg(1)), [email protected]$, [email protected]; return [email protected]; } -
Skorm's post in activate pvp when X players are in a map. was marked as the answer
- script pvpon -1,{ OnPCLoadMapEvent: set [email protected]_map$, strcharinfo(3); getpartymember [email protected],1; getpartymember [email protected],2; set .team1, [email protected]; copyarray .party_name_desu[0], [email protected][0],128; while(set([email protected],[email protected]+1)<=.team1) { if(getmapxy([email protected]$,[email protected],[email protected],0,rid2name(.party_name_desu[[email protected]]))!=0) set .team1,.team1-1; if([email protected][email protected]_map$) set([email protected],[email protected]+1); } getpartymember [email protected],1; getpartymember [email protected],2; set .team2, [email protected]; copyarray .party_name_desu2[0], [email protected][0],128; while(set([email protected],[email protected]+1)<=.team2) { if(getmapxy([email protected]$,[email protected],[email protected],0,rid2name(.party_name_desu2[[email protected]]))!=0) set .team2,.team2-1; if([email protected][email protected]_map$) { set([email protected],[email protected]+1); } } if([email protected] >= 4 && .team1 >= 2 && .team2 >= 2) pvpon "guild_vs2"; end; OnPCDieEvent: if(strcharinfo(3)=="guild_vs2"&&getmapflag("guild_vs2",mf_pvp)) if(getcharid(1)[email protected]) if(!(set(.team1,.team1-1))) { dispbottom "Party 2 Wins"; pvpoff "guild_vs2"; while(set([email protected],[email protected]+1)<=getarraysize(.party_name_desu2)) getitem 501,1,.party_name_desu2[[email protected]]; deletearray .party_name_desu[0],128; deletearray .party_name_desu2[0],128; } else if(getcharid(1)[email protected]) if(!(set(.team2,.team2-1))) { dispbottom "Party 1 Wins"; pvpoff "guild_vs2"; while(set([email protected],[email protected]+1)<=getarraysize(.party_name_desu)) getitem 501,1,.party_name_desu[[email protected]]; deletearray .party_name_desu[0],128; deletearray .party_name_desu2[0],128; } } guild_vs2 mapflag loadevent
Sorry forgot about ghost party members.
-
Skorm's post in Respawn map after death was marked as the answer
- script blah -1,{ OnPCDieEvent: sleep2 1000; while(.maps$[[email protected]++]!="") if(.maps$[[email protected]]==strcharinfo(3)) { recovery 0; warp .spaw$[[email protected]],.map_x[[email protected]],.map_y[[email protected]]; sleep2 3000; atcommand "@pvpoff"; } end; OnPCLoginEvent: warp "SavePoint",0,0; end; OnInit: setmapflag "prontera",mf_nosave; setarray .maps$[1], "prontera", "geffen", "izlude", "prt_fild01"; setarray .spaw$[1], "geffen", "prontera", "izlude", "prt_fild02"; setarray .map_x[1], 10, 15, 88, 13; setarray .map_y[1], 20, 16, 55, 12; } Alright last attempt lol. Otherwise you might have to search for the event where pvp is activated.
-
Skorm's post in Help How to .. was marked as the answer
- script killmark -1,{ OnPcKillEvent: set [email protected]$, strcharinfo(3); set [email protected] , getmapflag([email protected]$,mf_pvp)+ getmapflag([email protected]$,mf_gvg); if([email protected] getitem 7420,1; }
If you wanted the script to be a little more dynamic and work on all pvp/gvg maps you could do that... You might also have to add same other map flags like mf_gvg_castle but I'm not sure how often they get used. You can find a whole list in your server db/const.txt.
-
Skorm's post in Enchanter that can enchant 1st to 4th slot was marked as the answer
prontera,194,188,4 script Enchant Expert 712,{ mes .npc$; mes "Hello there!"; mes "I can enchant your items,"; mes "for a small fee of "+.pric+"z."; emotion e_no1,0; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; } mes .npc$; mes "Which item would you like to enchant?"; next; while(set([email protected],[email protected]+1)<=.e_len) { if(getequipid([email protected])>-1) set [email protected]$, [email protected]$+.eqp$[[email protected]]+"- [^0000FF"+getitemname(getequipid([email protected]))+"^000000]:"; else set [email protected]$, [email protected]$+"^adb4be"+.eqp$[[email protected]]+"- [Empty]^000000:"; } select([email protected]$); set [email protected]_loc, @menu; set [email protected]_itm, getequipid([email protected]_loc); if([email protected]_itm<0) { mes .npc$; mes "Hmm, I don't think you have anything equipped there."; close; } set [email protected]$, ""; set [email protected], .en_orb[0]; while((set([email protected],[email protected]+1)-1)<=.en_orb[1]) if(getiteminfo([email protected],2)>-1) if(set([email protected],countitem([email protected]))) { set [email protected]$, [email protected]$+getitemname([email protected])+" x"[email protected]+":"; set [email protected],[email protected]+1; set [email protected][[email protected]], [email protected]; } if([email protected]$=="") { mes .npc$; mes "Hmm, you don't seem to have any enchantment orbs."; close; } mes .npc$; mes "Please, select an enchantment from the menu."; next; select([email protected]$); set [email protected], [email protected][@menu]; set [email protected]$, ""; set [email protected], 0; while((set([email protected],[email protected]+1)-1)<4) { setd("[email protected]"[email protected], getequipcardid([email protected]_loc,[email protected])); if(getequipcardid([email protected]_loc,[email protected])) set [email protected]$, [email protected][email protected]+.crd_c$[[email protected]]+" Slot- [^a92435"+getitemname(getequipcardid([email protected]_loc,[email protected]))+"^000000]:"; else set [email protected]$, [email protected][email protected]+.crd_c$[[email protected]]+" Slot- [^30ad25Empty^000000]:"; } mes .npc$; mes "Select a slot."; next; select([email protected]$); set [email protected], getequiprefinerycnt([email protected]_loc); if(getequipcardid([email protected]_loc,@menu-1)) { mes .npc$; mes "Would you like me to remove this card?"; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } getitem getequipcardid([email protected]_loc,@menu-1),1; delitem2 [email protected]_itm, 1, 1, [email protected], 0, [email protected], [email protected], [email protected], [email protected]; setd("[email protected]"[email protected], 0); getitem2 [email protected]_itm, 1, 1, [email protected], 0, [email protected], [email protected], [email protected], [email protected]; } if(rand(100)>.perc) { mes .npc$; mes "I'm sorry but I've failed you!"; misceffect 155; emotion e_sob,0; set Zeny,Zeny-.pric; close; } set Zeny,Zeny-.pric; delitem [email protected],1; delitem2 [email protected]_itm, 1, 1, [email protected], 0, [email protected], [email protected], [email protected], [email protected]; setd("[email protected]"[email protected], [email protected]); getitem2 [email protected]_itm, 1, 1, [email protected], 0, [email protected], [email protected], [email protected], [email protected]; misceffect .efet; emotion e_no1,0; mes .npc$; mes "All done!"; equip [email protected]_itm; close; //NPC Constants OnInit: //=-=-=-=-=-=-=Configuration=-=-=-=-=-=-= set .npc$ , "[^0000FFEnchant Expert^000000]"; // NPC Name set .pric , 1000000; // Price set .efet , 154; // Effect Number set .perc , rand(50,80); // Percent setarray .crd_c$, "st", "nd", "rd", "th"; // Count setarray .en_orb, 4700, 4862; // Range of IDs selected for enchanting. setarray .eqp$ , "Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment", "Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear"; set .e_len , getarraysize(.eqp$); //=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-= } -
Skorm's post in Help OnPcDieEvent was marked as the answer
prontera,99,120,4 script death 78,{ end; OnPCDieEvent: if(strcharinfo(3)=="payon"){ warp "SavePoint",0,0; } warp "prontera",0,0; sleep2 1000; announce "Hey "+strcharinfo(0)+", It seems you have died! Don't worry, you will be resurected in 3 Seconds!",bc_blue|bc_self; announce "3",bc_blue|bc_self; sleep2 1000; announce "2",bc_blue|bc_self; sleep2 1000; announce "1",bc_blue|bc_self; sleep2 1000; announce "Respawning..",bc_blue|bc_self; atcommand "@alive "+strcharinfo(0); sleep2 1000; atcommand "@load "+strcharinfo(0); } -
Skorm's post in Is this possible to make? Chat/waitroom with warp was marked as the answer
prontera,100,100,5 script NPCNPC 100,{ end; OnWarp: if(countitem(.itemid)<.itmamt) { atcommand "@refresh"; mes "I'm sorry but you don't have enough "+getitemname(.itemid)+" to enter this chat."; close; } delitem .itemid,.itmamt; if(getwaitingroomstate(32)) warpwaitingpc "prontera",100,100,getwaitingroomstate(0); end; OnInit: set .itemid, 7539; set .itmamt, 1 ; set .amtppl, 10 ; waitingroom "ChatWarp",(.amtppl+1),"NPCNPC:OnWarp",1; }
Untested because my Harddrives dying and half my files are fragmented but yeah hope it work. Because I think the rid might not be passed through a waiting room event...
You can also try this script, but it needs to be located away from other npcs and might also get activated by player based chat rooms. Still untested.
prontera,100,100,5 script NPCNPC 100,24,24,{ end; OnTouch: while([email protected]$==""||sqrt(pow([email protected],2)+pow([email protected],2))<24) { getmapxy([email protected]$,[email protected],[email protected],0); if(checkchatting(strcharinfo(0))) { set [email protected], countitem(.itemid); if([email protected]<.itmamt) { atcommand "@refresh"; mes "I'm sorry but you don't have enough "+getitemname(.itemid)+" to enter this chat."; mes "You need "+([email protected])+" more."; close; } delitem .itemid,.itmamt; dispbottom "Item deleted: You can continue waiting for the event."; break; } } end; OnWarp: if(getwaitingroomstate(32)) warpwaitingpc "prontera",100,100,getwaitingroomstate(0); end; OnInit: set .itemid, 7539; set .itmamt, 1 ; set .amtppl, 10 ; getmapxy(.map$,.x,.y,1); waitingroom "ChatWarp",(.amtppl+1),"NPCNPC:OnWarp",1; } -
Skorm's post in How to disable this delay was marked as the answer
I imagine there are better ways of doing this but whatever works right.
void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp) { unsigned int tick = gettick(); int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want struct map_session_data *md = (struct map_session_data *)src; if (sp) clif_updatestatus(sd,SP_SP); if (hp) clif_updatestatus(sd,SP_HP); else return; if( !src || src == &sd->bl ) return; if(src->type == BL_PC) { sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer md->warpgodelay_tick = tick+warpgodelaycd; //This is the timer } if( pc_issit(sd) ) { pc_setstand(sd); skill_sit(sd,0); } if( sd->progressbar.npc_id ) clif_progressbar_abort(sd); if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support ) pet_target_check(sd,src,1); if( sd->status.ele_id > 0 ) elemental_set_target(sd,src); sd->canlog_tick = gettick(); } -
Skorm's post in How to delete account using SQL if they are not active? was marked as the answer
Stydianx's post reminded me that you have to delete characters to... but there is also a bunch of other information to delete.
CREATE TEMPORARY TABLE TmpTable AS (SELECT `account_id`,`char_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `lastlogin` < (CURRENT_TIMESTAMP - interval '5' month))); #Add tables to delete from here. DELETE FROM `guild` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `skill` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `quest` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `mercenary_owner` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `auction` WHERE `seller_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `mercenary` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `memo` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `inventory` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `hotkey` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `cart_inventory` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `homunculus` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `friends` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `global_reg_value` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `elemental` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `pet` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `party` WHERE `leader_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `guild_member` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `sc_data` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `storage` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `login` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `login` WHERE `lastlogin` < (CURRENT_TIMESTAMP - interval '5' month); DROP TABLE TmpTable; Will delete all accounts that haven't logged in for less than 5 months.
-
Skorm's post in Leveling room was marked as the answer
I'll probably be updating it a little... but this is a Dynamic Leveling based system thingy... No need to hard code mob spawns...The script is a little heavy on the server side because -.- and this is the really lame part... Killedrid isn't set with monster spawned events... IKR WTF.
Also if you run into one of the rooms and do @killmonster they won't spawn back untill you reloadscripts just saying right now don't do it... I had a whole system worked out for getting the correct information but yeah... I need a way to single out the event and get the mobid... That can't happen with OnNPCKillEvent. Anyways here it is... Only works with rAthena SQL Based servers that have there mod_dbs SQL side.
prontera,160,158,2 script Training Room 100,{ select(.menu$); warp getd(".room"+(@menu-1)+"$[1]"),0,0; end; OnNPCKillEvent: //OnMobDeath: for(set [email protected],0;getarraysize(getd(".room"[email protected]+"$"));set([email protected],[email protected]+1)) if( playerattached() ) { if( getd(".room"[email protected]+"$[1]") == strcharinfo(3) ) { monster strcharinfo(3),0,0,"--ja--",killedrid,1/*,"Training Room::OnMobDeath"*/; break; } } end; Oninit: //Configuration // # Room Name , Map , MobLvlRngLow , MobLvlRngHigh, #SpawnMobs, Mobs Limit(MAX 128), Optional Search String ; setarray .room0$, "Novice Room %s~%s (<mob>,<mob>...)" , "06guild_01", "0" , "10" , "20" , "128" , "`iName` LIKE '%Por%'" ; // Would make a novice poring room. setarray .room1$, "Beginner Room %s~%s (<mob>,<mob>...)" , "06guild_02", "11" , "20" , "5" , "128" , "" ; setarray .room2$, "Adept Room %s~%s (<mob>,<mob>...)" , "06guild_03", "21" , "30" , "5" , "128" , "" ; setarray .room3$, "Advanced Room %s~%s (<mob>,<mob>...)" , "06guild_04", "31" , "40" , "5" , "128" , "" ; setarray .room4$, "Experts Room %s~%s (<mob>,<mob>...)" , "06guild_05", "41" , "50" , "5" , "128" , "" ; setarray .room5$, "Veterans Room %s~%s (<mob>,<mob>...)" , "06guild_06", "51" , "60" , "6" , "128" , "" ; setarray .room6$, "MVP Room %s~%s (<mob>,<mob>...)" , "06guild_07", "61" , "70" , "7" , "128" , "" ; setarray .room7$, "Like a Boss Room %s~%s (<mob>,<mob>...)", "06guild_08", "71" , "80" , "8" , "128" , "" ; set .srch$, "<mob>"; //String searched and replaced with mob name in the Room Name Feild. set .mvps, 0; //Mvps Summoned or not? 0=Off 1=On //End for(set([email protected],0);getarraysize(getd(".room"[email protected]+"$"));set([email protected],[email protected]+1)) { set .rmn$, ".room"[email protected]+"$"; set .nam$, ".name"[email protected]+"$"; set .mid$, ".id"[email protected]; set .rrm$, getd(.rmn$+"[0]"); set .map$, getd(.rmn$+"[1]"); set .lrl$, getd(.rmn$+"[2]"); set .lrh$, getd(.rmn$+"[3]"); set .nsms, atoi(getd(.rmn$+"[4]")); set .mlim, atoi(getd(.rmn$+"[5]")); set .ops$, getd(.rmn$+"[6]"); set .length, countstr(getd(.rmn$+"[0]"), .srch$); set .lengt, countstr(getd(.rmn$+"[0]"), "%s"); if(.lengt>1) set .mes$[[email protected]], sprintf(.rrm$,.lrl$,.lrh$); set .len, query_sql("SELECT `ID`,`iName` FROM `mob_db` WHERE `LV` > "+.lrl$+" AND `LV` < "+.lrh$+" "+((.ops$!="")?"AND "+.ops$+" ":"")+((!.mvps)?"AND `MEXP` <= 0 ":"")+"ORDER BY RAND() LIMIT "+((.mlim>128)?128:.mlim )+";",.id,.name$); set .lens, getarraysize(.name$); copyarray getd(.nam$+"[0]"), .name$, .lens; copyarray getd(.mid$+"[0]"), .id, .lens; deletearray .name$; deletearray .id; while([email protected]++<=.length ) if([email protected]<=.lens) set .mes$[[email protected]], replacestr(.mes$[[email protected]], .srch$, getd(.nam$+"["+([email protected])+"]"), 1, 1); set [email protected],0; for(set([email protected],0);[email protected]<.lens;set([email protected],[email protected]+1)) { monster .map$,0,0,"--ja--",getd(.mid$+"["[email protected]+"]"),.nsms/*,"Training Room::OnMobDeath"*/; } } set .menu$, implode(.mes$,":"); }If you have any questions feel free to ask. BTW this will spawn any monster in your mob_db if they are the right level... so if you have errored mobs that you don't want to spawn I suggest you add a condition in the search for it... Other then that this thing saves loads of time. -
Skorm's post in any sign npc like this? was marked as the answer
prontera,136,182,7 script Kyojin RO Mall 837,{ end;
OnInit:
waitingroom "Kyojin RO Mall!",0;
}
-
Skorm's post in Dual Client kick at same map was marked as the answer
Old version
Old Version 2
Old Version 3
Universal v4:
- script dualclientkicker -1,{ OnPCLoadMapEvent: set [email protected]$, strcharinfo(3); if(!compare(.tmp$,[email protected]$)) end; //set [email protected], query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `last_ip` = (SELECT `last_ip` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",[email protected]); set [email protected], query_sql("select account_id from `char` right join login on login.account_id = `char`.account_id where `char`.online = 1 and login.last_ip = '"+ getcharip() +"'",[email protected] ); //Annieruru Addition. if([email protected]) { for(set([email protected],0);[email protected]<[email protected];set([email protected],[email protected]+1)) { getmapxy([email protected]$,[email protected],[email protected],0,rid2name([email protected][[email protected]])); if([email protected][email protected]$&&rid2name([email protected][[email protected]])!=strcharinfo(0)) { dispbottom "Duel accounts not allowed in WOE."; warp "geffen",0,0; } } } end; OnInit: setarray .maps$ , "aldeg_cas01", "gefg_cas01", "payg_cas01", "prtg_cas01"; set .lens , getarraysize(.maps$) ; for(set(.a,0);.a<.lens;set(.a,.a+1)) { setmapflag .maps$[.a], mf_loadevent ; set .tmp$ ,.tmp$+.maps$[.a]+","; } } -
Skorm's post in N>help! was marked as the answer
Alright now I've got a headacheDoes it work or not????
This version is working for me as far as I can tell without the maps....
prontera,162,173,4 script SafeZoneEvent 100,{ if(.event==2)end; if(!.event&&getgmlevel()<10) { mes "Sorry but the event isn't active right now."; mes "Please come back at a later time."; close; } else if (!.event&&getgmlevel()>10) { mes "Would you like to start the event?"; next; if(select("Yes:No")&2) { mes "Alright, maybe later then."; emotion e_sigh,0; close; } set .event,1; initnpctimer; announce "["+strcharinfo(0)+"] Started the safe zone event in Prontera!",bc_all|bc_yellow; close; } select("[Join]"); warp "ggpro",19,19; close; OnTimer5000: mapannounce "ggpro","[System]:Game Start",bc_map; sleep 3000; for(set [email protected],1;[email protected]<=10;set [email protected],[email protected]+1) callsub Start; mapannounce "ggpro","[System]:Game Over",bc_map; sleep 3000; callsub WarpNoSafe; end; Start: set .event,2; set .e_x,rand(1,35); set .e_y,rand(1,35); set .e_t,5; callsub WarpShow,.e_x,.e_y; while(1) { sleep 1000; if(set(.e_t,.e_t-1) < 0) break; else callsub ShowEffect; } callsub WarpNoSafe,.e_x,.e_y; sleep 1000; return; OnInit: callsub WarpNoSafe; end; WarpNoSafe: if(!getarg(0,0)&&!getarg(1,0)) { mapwarp "ggpro","kurag",155,166; set .event,0; set .e_x,0; set .e_y,0; set .e_t,0; return; } areawarp "ggpro",0,0,40,getarg(1)-1,"prontera",150,180; areawarp "ggpro",0,getarg(1)+3,40,40,"prontera",150,180; areawarp "ggpro",0,getarg(1),getarg(0)-1,getarg(1)+2,"prontera",150,180; areawarp "ggpro",getarg(0)+3,getarg(1),40,getarg(1)+2,"prontera",150,180; return; ShowEffect: for(set [email protected],1; [email protected]<=8; set [email protected],[email protected]+1) initnpctimer "SafeZoneEvent#Effect"[email protected]; return; WarpShow: movenpc "SafeZoneEvent#Effect1",getarg(0),getarg(1); movenpc "SafeZoneEvent#Effect2",getarg(0)+1,getarg(1); movenpc "SafeZoneEvent#Effect3",getarg(0)+2,getarg(1); movenpc "SafeZoneEvent#Effect4",getarg(0),getarg(1)+1; movenpc "SafeZoneEvent#Effect5",getarg(0),getarg(1)+2; movenpc "SafeZoneEvent#Effect6",getarg(0)+1,getarg(1)+2; movenpc "SafeZoneEvent#Effect7",getarg(0)+2,getarg(1)+2; movenpc "SafeZoneEvent#Effect8",getarg(0)+2,getarg(1)+1; return; OnMinute00: if(!.event ) { announce "SafeZoneEvent started in Prontera!",bc_all|bc_yellow; set .event,1; initnpctimer; } end; } ggpro,1,1,0 script SafeZoneEvent#Effect1 139,{ OnTimer1: specialeffect 59; end; } ggpro,1,1,0 duplicate(SafeZoneEvent#Effect1) SafeZoneEvent#Effect2 139 ggpro,1,1,0 duplicate(SafeZoneEvent#Effect1) SafeZoneEvent#Effect3 139 ggpro,1,1,0 duplicate(SafeZoneEvent#Effect1) SafeZoneEvent#Effect4 139 ggpro,1,1,0 duplicate(SafeZoneEvent#Effect1) SafeZoneEvent#Effect5 139 ggpro,1,1,0 duplicate(SafeZoneEvent#Effect1) SafeZoneEvent#Effect6 139 ggpro,1,1,0 duplicate(SafeZoneEvent#Effect1) SafeZoneEvent#Effect7 139 ggpro,1,1,0 duplicate(SafeZoneEvent#Effect1) SafeZoneEvent#Effect8 139 -
Skorm's post in MVP Card Drop 50% was marked as the answer
Yes in your conf/battle/drops.conf:
1000000 = 100% 100000 = 10%
10000 = 1%
1000 = 0.1%
100 = 0.01%
Exampleitem_rate_card: 1000000 item_rate_card_boss: 500000 -
Skorm's post in Spesific Item Broadcast was marked as the answer
617,Old_Violet_Box,Old Purple Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ set [email protected], groupranditem(IG_VioletBox); getitem [email protected],1; setarray [email protected][0], 678; for(set [email protected],0;[email protected]<getarraysize([email protected]);set [email protected],[email protected]+1) if([email protected] == [email protected][[email protected]]) announce "["+strcharinfo(0)+"] got "+getitemname([email protected])+" from Old Purple Box !",bc_all|bc_yellow;},{},{}Fill the array [email protected] with ids you'd like announced. Example:
setarray [email protected][0], 678, 501;Would announce Posion Bottle and Red Potion. -
Skorm's post in reset stat scrirpt was marked as the answer
- script resetstat -1,{ OnPCLoginEvent:
if(!statreset) {
resetstatus;
set statreset,1;
}
end;
}
-
Skorm's post in Moving NPC was marked as the answer
Alright I did some testing and I got it working really well... but your cords are still a little bit messedup when he trys to move past the wall.
Just add some more when he goes through the gate... I've included my test cords if you'd like to see.
prontera,37,207,3 script MovingNPC 1004,{ if( .b ){ npctalk "Go away I'm busy!"; end; } set .b, 1; for(set .a,0;.a<getarraysize(.x);set .a,.a+1) { npcwalkto .x[.a],.y[.a]; //Other commands go here... while( 1 ){ getmapxy(.map$,.x3,.y3,1); sleep 100; getmapxy(.map$,.x2,.y2,1); if(.x3==.x2&&.y3==.y2) if( .x2==.x[.a]&&.y2==.y[.a] ) break; } if(!.a) { monster strnpcinfo(4),.x[.a],.y[.a],"Poring",1002,1; //enablenpc strnpcinfo(0); } } npcstop; disablenpc strnpcinfo(0); set .b, 0; end; OnInit: npcspeed 200; setarray .x[0],50,59,70,82,99,99,100,102,115,127,142,161,175,191,211,216,212,212; setarray .y[0],203,201,200,193,185,172,155,139,138,149,163,166,156,151,158,171,186,196; //setarray .x[0], 47, 56, 65, 76, 86, 97, 103, 113, 126, 134, 138/*, 161, 175, 191, 211, 216, 212, 212*/; //setarray .y[0], 208, 207, 205, 204, 204, 204, 204, 204, 204, 204, 204/*, 166, 156, 151, 158, 171, 186, 196*/; }Keep in mind if the npc can't get to the cords you've put then it will loop forever and the ending bits won't be run. -
Skorm's post in clone script (item) was marked as the answer
PC = "Player Character" will only effect when players are killed.
- script Mirage -1,{ OnNPCKillEvent: if(rand(1,.npcpercent)-1||[email protected]_Eq) end; getmapxy( [email protected]$,[email protected],[email protected],0,strcharinfo(0) ); clone [email protected]$,[email protected],[email protected],"Mirage::OnCloneDeath",getcharid(0),getcharid(0),14261,0,30; end; OnPCKillEvent: if(rand(1,.pcpercent)-1||[email protected]_Eq) end; getmapxy( [email protected]$,[email protected],[email protected],0,strcharinfo(0) ); clone [email protected]$,[email protected],[email protected],"Mirage::OnCloneDeath",getcharid(0),getcharid(0),14261,0,30; end; OnCloneDeath: charcommand "#heal "+strcharinfo(0)+" -9999"; end; OnInit: set .pcpercent,50; // Player Percent 1=1% 100=100% set .npcpercent,20; // Non-player Character 1=1% 100=100% end; } -
Skorm's post in it this command not triggering pvp was marked as the answer
I'm not sure what you mean OnNPCKillEvent is triggered when a "monster" is killed. Killerrid and Killedrid are set.
If you want something that's triggered when a player is killed use.
OnPCKillEvent: