-
Posts
2,407 -
Joined
-
Last visited
-
Days Won
49
Community Answers
-
Capuche's post in Disable Item Consumtion for Particular Class in Particular Map was marked as the answer
678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class==Job_Assassin_Cross) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else if ( strcharinfo(3) != "bat_b01" && strcharinfo(3) != "prt_pvp" ) percentheal -100,-100; },{},{} your should working, I'm just maniac
-
Capuche's post in job changer with no trans and no 3rd job was marked as the answer
prontera,150,183,5 script test 56,{ if ( Class > 20 ) end; mes "do you want to become..?"; next; if ( Class == Job_Novice ) { for ( [email protected] = 1; [email protected] <= 6; [email protected]++ ) [email protected]$ = [email protected]$ + jobname([email protected]) +":"; jobchange select( [email protected]$ ); else { [email protected] = eaclass(); setarray [email protected][1], roclass( [email protected]|EAJL_2_1 ), roclass( [email protected]|EAJL_2_2 ); [email protected] = select( jobname( [email protected][1] ), jobname( [email protected][2] ) ); jobchange [email protected][[email protected]]; } mes "you are now "+ jobname( Class ); close; } another way should be to write a high value in the option of the jobmaster in the repo
setarray .Rebirth[0],9999999999,50; // Minimum base level, job level to rebirth OR change to third class -
Capuche's post in Breeder NPC was marked as the answer
It seems this script already give a peco to knight and crus class
else setriding; -
Capuche's post in Monster Hunting Event was marked as the answer
prontera,150,180,5 script Hunter monster 87,{
end;
OnEvent:
waitingroom "Mob to hunt: "+ getmonsterinfo( getvariableofnpc( .monster_hunt_id,"atcmd_monsterhunt" ),0 ) + " (ID: " + getvariableofnpc( .monster_hunt_id,"atcmd_monsterhunt" ) + ")",0;
}
- script atcmd_monsterhunt -1,{
OnInit:
bindatcmd "monsterhunt",strnpcinfo(3)+"::OnCmd";
end;
OnCmd:
if ( .monster_hunt_id == 0 && ( [email protected]_numparameters == 0 || [email protected]_parameters$[0] == "on" || [email protected]_parameters$[0] == "off" ) )
dispbottom "there is none monster to hunt";
else if ( [email protected]_numparameters == 0 )
dispbottom "the new monster to hunt is " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ")";
else if ( [email protected]_parameters$[0] == "on" ) {
if ( @display_message == 0 )
dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") already display a message";
else {
dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") will display a message";
@display_message = 0;
}
}
else if ( [email protected]_parameters$[0] == "off" ) {
if ( @display_message == 1 )
dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") already don't display a message";
else {
dispbottom "killing a " + getmonsterinfo( .monster_hunt_id,0 ) + " (ID: " + .monster_hunt_id + ") won't display a message";
@display_message = 1;
}
}
else if ( getgmlevel() >= 25 ) {
if ( [email protected]_parameters$[0] == "0" ) {
dispbottom "you stop the hunt";
.monster_hunt_id = 0;
delwaitingroom "Hunter monster";
}
else {
[email protected]_name$ = getmonsterinfo( atoi([email protected]_parameters$[0]),0 );
if ( [email protected]_name$ == "null" )
dispbottom "wrong mob id";
else {
.monster_hunt_id = atoi([email protected]_parameters$[0]);
dispbottom "the new monster to hunt is "+ [email protected]_name$ + " (ID: " + .monster_hunt_id + ")";
donpcevent "Hunter monster::OnEvent";
}
}
}
else
dispbottom "@" + [email protected]_command$ + " failed. @" + [email protected]_command$ + " to display the mob to hunt. @" + [email protected]_command$ + " on/off to display a message killing the mob";
end;
OnNPCKillEvent:
if ( .monster_hunt_id == 0 || killedrid != .monster_hunt_id ) end;
if ( hunter_points >= 1000 && @display_message == 0 )
message strcharinfo(0), "you can exceed 1000 hunters points (you have " + hunter_points + " hunters points)";
else if ( hunter_points < 1000 ) {
hunter_points++;
if ( @display_message == 0 )
message strcharinfo(0), "you have now " + hunter_points + " hunters points for killing a " + getmonsterinfo( .monster_hunt_id,0 );
}
end;
}
-
Capuche's post in woe points counter was marked as the answer
nothing happen when the ladder is empty
indeed I made a mistake. For eathena it should be a close instead of end
query_sql "update guild set woe_points = 0"; end; this script use the variable of euphy's woe controller..
-
Capuche's post in multiple castles was marked as the answer
- script Sample -1,{
OnPCLoadMapEvent:
[email protected]$ = strcharinfo(3);
if ( [email protected]$ == "guild_vs1" || [email protected]$ == "guild_vs2" || [email protected]$ == "guild_vs3" ) {
query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '" +getcharid(2)+ "'",[email protected];
if ( [email protected] > 30 ) {
message strcharinfo(0),"Your guild members are over the limit";
sleep2 2000;
warp "prontera",150,150;
}
}
end;
}
guild_vs1 mapflag loadevent
guild_vs2 mapflag loadevent
guild_vs3 mapflag loadevent
-
Capuche's post in Run this script on multiple maps and allows max. 2 clients/IPs? was marked as the answer
- script WoE_IP_Kick -1,{
OnInit:
setmapflag "prtg_cas01", mf_loadevent;
setmapflag "prtg_cas02", mf_loadevent;
setmapflag "prtg_cas03", mf_loadevent;
set .map_list$, "prtg_cas01 | prtg_cas02 | prtg_cas03";
set .whitelist$, "127.0.0.1 | xx.xx.xx.xx";
end;
// Trigger when a player enters a map with "loadevent" mapflag.
OnPCLoadMapEvent:
// Only run for map in the list.
if ( compare( .map_list$,strcharinfo(3) ) == 0 ) end;
set [email protected]_ip$, getcharip();
if ( compare( .whitelist$,[email protected]_ip$ ) )
[email protected] = 2;
else
[email protected] = 1;
// Get list of name online with attached character's IP address.
set [email protected], query_sql("SELECT `char`.`name` FROM `login` join `char` on `char`.account_id = login.account_id WHERE online = 1 and `last_ip` = '"+ [email protected]_ip$ +"' and `char`.`account_id` != "+ getcharid(3), [email protected]$ );
// Passed check if only the attached player is returned.
if ( [email protected] < [email protected] ) end;
setd "[email protected]_"+ strcharinfo(3), 1;
// Check all online characters using the IP address if they are on a Battlegrounds map.
for( ; [email protected]<[email protected]; set [email protected],[email protected]+1) {
getmapxy [email protected]$, [email protected], [email protected], 0, [email protected]$[[email protected]];
if ( compare( .map_list$,[email protected]$ ) ) {
setd "[email protected]_"+ [email protected]$, getd( "[email protected]_"+ [email protected]$ ) +1;
setd "[email protected]_"+ [email protected]$ +"$", getd( "[email protected]_"+ [email protected]$ +"$" ) + [email protected]$[[email protected]] + ( ( getd( "[email protected]_"+ [email protected]$ +"$" ) == "" && [email protected] == 2 ) ? "," : "" );
if ( getd( "[email protected]_"+ [email protected]$ ) == [email protected] +1 ) {
message strcharinfo(0),"Characters "+ getd( "[email protected]_"+ [email protected]$ +"$" ) +" already present in a map with your IP. Kicking....";
sleep2 2000;
atcommand "@kick "+ strcharinfo(0);
end;
}
}
}
// Passed check.
end;
}
-
Capuche's post in Mail Request ! was marked as the answer
- script atcmd_mail -1,{
OnInit:
bindatcmd "mailall",strnpcinfo(3)+"::OnMailall",99,99;
bindatcmd "guildmail",strnpcinfo(3)+"::OnGuildmail",99,99;
end;
OnMailall:
.name$ = strcharinfo(0);
if ( getiteminfo( atoi( [email protected]_parameters$[0] ),0 ) == -1 ) {
message .name$, "invalid item id";
end;
}
if ( atoi( [email protected]_parameters$[1] ) < 1 )
[email protected]_parameters$[1] = "1";
query_sql( "INSERT INTO `mail` (send_name,dest_id,title,message,nameid,amount,identify,zeny,time) select "+
"'no-reply',"+
"`char_id`"+
",'GM reward',"+
"'You got a mail from "+ .name$ +"',"+
[email protected]_parameters$[0] +","+ [email protected]_parameters$[1] +",0,0,UNIX_TIMESTAMP(NOW()) from `char` where online = 1 and char_id != "+ getcharid(0) );
addrid 0;
if ( strcharinfo(0) != .name$ )
message strcharinfo(0), "You got a mail from "+ .name$;
end;
OnGuildmail:
.name$ = strcharinfo(0);
if ( getiteminfo( atoi( [email protected]_parameters$[0] ),0 ) == -1 ) {
message .name$, "invalid item id";
end;
}
if ( atoi( [email protected]_parameters$[1] ) < 1 )
[email protected]_parameters$[1] = "1";
query_sql "select guild_id from guild where name = '"+ escape_sql( [email protected]_parameters$[2] ) +"'", [email protected]_id;
if ( [email protected]_id == 0 ) {
message .name$, "wrong guild name";
end;
}
query_sql( "INSERT INTO `mail` (send_name,dest_id,title,message,nameid,amount,identify,zeny,time) select "+
"'no-reply',"+
"`char`.`char_id`"+
",'GM reward',"+
"'You got a mail from "+ .name$ +"',"+
[email protected]_parameters$[0] +","+ [email protected]_parameters$[1] +",0,0,UNIX_TIMESTAMP(NOW()) from `char` "+
"where guild_id = "+ [email protected]_id +" and online = 1 and char_id != "+ getcharid(0) );
addrid 3,0, [email protected]_id;
if ( strcharinfo(0) != .name$ )
message strcharinfo(0), "You got a mail from "+ .name$;
end;
}
-
Capuche's post in Daily reward giver check for ip was marked as the answer
//==================== Informacion ==========================
//==== Recompensa Diaria==========================
//*************************************************************************
//=========================== Conf ==================================================================================
//********************************************************************************************************************
prontera,150,206,4 script Prize 563,{
set [email protected]$,"^0000FF[ Premio Diario ]^000000";
setarray .items[0],507,506,508,509,510; //items
[email protected] = gettimetick(2);
if([email protected] - lastTimeTalked > (60 * 60 * 24)) {
query_sql "select 1 from login join `char` on `char`.account_id = login.account_id join global_reg_value as g on g.char_id = `char`.char_id where last_ip = '"+ getcharip() +"' "+
"and g.`str` = 'lastTimeTalked' and value > ("+ [email protected] +" - 86400)", [email protected];
if ( [email protected] == 0 ) {
mes [email protected]$;
mes "Wanna get your daily reward?";
next;
switch(select("-Yush!:-No,thx!:-Cancel")) {
case 1:
set lastTimeTalked,gettimetick(2);
mes [email protected]$;
mes "Allright!";
getitem .items[ rand( getarraysize(.items) ) ], rand( 1,25 );
close;
case 2:
mes [email protected]$;
mes "Okay bye!";
close;
case 3:
close;
}
}
}
mes [email protected]$;
mes "Sry "+strcharinfo(0)+", you already got this";
mes "Wait 24 hours!!";
close;
}
-
Capuche's post in Help with my script. was marked as the answer
rand(100) throws a number between 0 and 99 and you don't give any item when it throws 0
here my view
function script randbox { getitem 32020,1; mes "Do you really want to open one(1) Lottery Box?"; mes "^FF0000NOTE: Dont press cancel(beside OK) or the box will be gone.^000000"; mes "No refund will be given if you do so."; //next; if ( select("Yes Please:No! Not yet!") == 2 ) close; // setarray [email protected], "chance", item id, amount... setarray [email protected], 5, 32008,1, 32009,1, 32010,1, 32011,1, 32012,1, 32013,1; setarray [email protected], 10,32025,1, 8400,2, 8403,2, 8402,6, 607,25, 8400,10, 8402,20, 8403,8, 32025,3; setarray [email protected], 20,32007,1, 32006,1, 32005,1, 32004,1, 32003,1, 32002,1; // etc.. delitem 32020,1; set [email protected], rand(100); while( [email protected] >= getd( "[email protected]"+ [email protected] ) ) [email protected]++; [email protected]_index = rand( ( getarraysize( getd( "[email protected]"+ [email protected] ) ) -1 )/2 ) *2 -1; getitem getd( "[email protected]"+ [email protected] +"["+ [email protected]_index +"]" ), getd( "[email protected]"+ [email protected] +"["+ ([email protected]_index +1) +"]" ); emotion e_grat,1; close; } -
Capuche's post in Guild Pack NPC Giver (Help please) was marked as the answer
Thinking about it now, I should set an account variable to prevent the player using an ip dynamic
/* CREATE TABLE IF NOT EXISTS `guildpack` ( `id` int(11) NOT NULL auto_increment, `account_id` int(11) NOT NULL default '0', `name` varchar(23) NOT NULL default '', `last_ip` varchar(100) NOT NULL default '', PRIMARY KEY (`account_id`), KEY (`id`) ) ENGINE=MyISAM; */ //====================================================================================================== prontera,130,172,5 script Guild Pack Info 468,{ if ( getcharid(2) == 0 ) { mes "You have no guild!"; close; } if ( #gpack || callsub( L_check ) ) { #gpack = 1; mes "^616D7EYou already given a Guild Package"; close; } mes "[Guild Pack NPC]"; mes "Hello there, it seems you are claiming for a Guild Pack."; next; mes "[Guild Pack NPC]"; mes "Let me gift you a guild pack for joining and"; mes "playing in Lunar RO, we hope you enjoy them."; next; mes "These guild pack is not duplicable and not dropable."; next; switch(select("Yes:No")) { case 1: [email protected]$ = getcharip(); if ( callsub( L_check ) ) { mes "^616D7EIt seems you have same IP Address among Guild Mates: ^ff0000" + [email protected]$ + "^000000. Sorry, but its not allowed."; close; } query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + [email protected]$ + "')"); //THIS PART WERE all items they will get getitem 29828,1; getitem 29851,1; getitem 29868,1; getitem 29834,1; getitem 29804,1; getitem 29835,1; getitem2 5170,1,1,7,0,0,0,0,0; getitem2 2319,1,1,7,0,4141,0,0,0; getitem2 2114,1,1,7,0,4058,0,0,0; getitem2 2528,1,1,7,0,4133,0,0,0; getitem2 2424,1,1,7,0,4097,0,0,0; getitem 2607,2; getitem 4035,5; getitem 4064,2; getitem 4079,2; getitem 14175,1; getitem 671,1; getitem 607,300; getitem 12045,100; getitem 12060,100; getitem 12050,100; getitem 12055,100; getitem 12065,100; getitem 12070,100; set #gpack, 1; warp "prontera",156,172; close; case 2: mes "^616D7ENevermind~, You can come back again later!"; close; } end; L_check: return query_sql("SELECT 1 FROM `guildpack` join login on login.`last_ip` = `guildpack`.`last_ip` where login.account_id = "+ getcharid(3), [email protected] ); OnInit: waitingroom "Guild Package",0; end; } -
Capuche's post in [R] PvP Nightmare Mode Drop Items was marked as the answer
Mapflag#pvp_nightmaredrop ?
-
Capuche's post in Change Birthday Script? was marked as the answer
prontera,150,150,5 script sdfghjhgfd 56,{
query_sql "select birthdate from login where account_id = "+ getcharid(3), [email protected]$;
mes "you know what? i'm a mind reader";
mes "I know you are a "+ ( Sex ? " handsome man" : " beautiful lady" ) +" born in ^ff0000"+ [email protected]$ +"^000000.";
mes "Your underwear color is.. what? ok i stop it";
next;
if ( select( "Change my birthdate", "Bye" ) == 2 ) close;
mes "Really? well tell me your new birthdate - format 0000-00-00 thanks";
input [email protected]$;
next;
explode( [email protected]$, [email protected]$, "-" );
if( getarraysize( [email protected]$ ) != 3 ||
getstrlen([email protected]$[0]) != 4 || atoi([email protected]$[0]) < 1 ||
getstrlen([email protected]$[1]) != 2 || atoi([email protected]$[1]) < 1 ||
getstrlen([email protected]$[2]) != 2 || atoi([email protected]$[2]) < 1 ) {
mes "wrong format bye";
close;
}
query_sql "update login set birthdate = '"+ escape_sql( [email protected]$ ) +"' where account_id = "+ getcharid(3);
mes "done";
close;
}
-
Capuche's post in Job Changer with no Rebirth was marked as the answer
A quick mod
[paste=4zf2yxj5yh7q]
You didn't specify the base level to change Lord Knight or Rune Knight (non trans) > Rune Knight (trans) so it's still 99
-
Capuche's post in Mvp Summoner Bugs was marked as the answer
Like in the bug tracker it seems you're stuck because you miss the F_InsertPlural function (line https://github.com/rathena/rathena/blob/master/npc/custom/events/mvp_ladder.txt#L26 )
I suggest to delete your current npc\other\Global_Functions.txt file then download a new one
https://github.com/rathena/rathena/blob/master/npc/other/Global_Functions.txt
-
Capuche's post in was marked as the answer
* 92 : while(getarraysize(getd("[email protected]"[email protected])) > @w) { set [email protected]$,[email protected] <------------ // issue here ; the console say parse_line: need ';'
-
Capuche's post in What's the right query_sql for this?... was marked as the answer
query_sql( "SELECT `Count` FROM `E-MVPRank` where `name`= '" + escape_sql( strcharinfo(0) ) + "'", [email protected] ); nb
cancel: mes .ahmel$; mes "Okay, goodluck hunting MVPs!"; end; close; you will be stuck by the mes window because of the end, you just need close
-
Capuche's post in Need Help to modification this script was marked as the answer
- script login_reward -1,{
OnPCLoginEvent:
addtimer 3600, strnpcinfo(3) + "::Onijnuionion";
end;
Onijnuionion:
[email protected] = 1 << 10;
-
Capuche's post in npc script shows errors after updating to rev 17692 was marked as the answer
"Transform my "+getitemname(.1stWingID)+" to "+getitemname(.2ndWingID)+"",transform','"Nothing sir!",notnow; transform command is now implemented. Use another word for your label.
if (petstat '('PET_CLASS)) { petstat doesn't exist anymore. Use getpetinfo
-
Capuche's post in Help with OnTimer was marked as the answer
Use donpcevent "<NPC object name>::<event label>"; to invoke an event label. Disabled/enabled npc only disable/enable the npc (read the docs in script_commands) so the timer never start.
-
Capuche's post in need help on this event script was marked as the answer
mes "^FF0000Sorry, "+ rid2name( .reg_aid[[email protected]] ) +" which is same ip with you has joinned this event.^000000"; assuming the script delete the var when the player log out