-
Posts
1,702 -
Joined
-
Last visited
-
Days Won
14
Community Answers
-
Patskie's post in how to make this via Script help was marked as the answer
- script Sample -1,{
OnPCLoadMapEvent:
getmapxy([email protected]$,[email protected],[email protected],0);
if ( [email protected]$ == .map$ && getcastledata( .castle$, 1 ) == getcharid( 2 ) ) end;
warp "SavePoint",0,0;
end;
OnInit:
.map$ = "prontera";
.castle$ = "prtg_cas01";
setmapflag .map$, mf_loadevent;
end;
}
-
Patskie's post in Help for modify was marked as the answer
OnNPCKillEvent:
if( killedrid && ( getmonsterinfo( killedrid, 21 ) & 0x0020 ) && ( killedrid <= 3000 ) ) {
if ( getmonsterinfo( killedrid, 22 ) ) {
if ( rand( 100 ) < 25 ) {
#CASHPOINTS += rand( 100, 500 );
dispbottom "You now have " +#CASHPOINTS+ " cash points.";
}
} else {
if ( rand( 100 ) < 50 )
#CASHPOINTS += rand( 50, 150 );
}
}
end;
-
Patskie's post in Request Script Vip System Please urgent was marked as the answer
Why not use the official vip system of rAthena?
-
Patskie's post in Delete all account that didn't login for 1 week was marked as the answer
Let's try this :
DELETE FROM `login` WHERE DATEDIFF(NOW(), `lastlogin`) > 6; I don't have responsibilities if something went wrong. Please do a backup before you do something
-
Patskie's post in addtimer on instance was marked as the answer
addrid command or attachrid or attachnpctimer command, please refer to doc/script_commands.txt
-
Patskie's post in Map Restriction using BaseLevel was marked as the answer
- script ClassRestrictionLVL -1,{
OnPCLoadMapEvent:
getmapxy( [email protected]$, [email protected], [email protected], 0 );
if ( [email protected]$ == "pay_gld" && ( BaseLevel < 99 ) )
warp "prontera",155,181;
end;
}
pay_gld mapflag loadevent
-
Patskie's post in Anti Hack Script Request was marked as the answer
- script Sample -1,{ OnPCLoginEvent: if ( !#enabled || #pw$ == "" ) end; sc_start SC_BERSERK, 1000000000, 1; mes .npc$; mes "Input your account password"; next; input @pass$; if ( @pass$ == #pw$ ) { sc_end SC_BERSERK; percentheal 100, 100; end; } sc_end SC_BERSERK; atcommand "@kick " +strcharinfo(0); end; OnSecurity: mes .npc$; mes "Hello " +strcharinfo(0)+ ", What can i do for you?"; next; switch (select("Password Protection ( "+(#enabled?"^009933Enabled":"^FF0000Disabled")+"^000000 ):Setup a password:Delete my password:Nothing")) { case 1: if ( #pw$ == "" ) { mes .npc$; mes "You cannot enable the password protection if you don't have a password."; close; } if ( #enabled ) #enabled = 0; else #enabled = 1; message strcharinfo(0),"You have " +(#enabled?"enabled":"disabled")+ " the security system on your account"; break; case 2: if ( #pw$ != "" ) { mes .npc$; mes "You already have a password for your account."; close; } mes .npc$; mes "Input your account password"; next; input @pw$; if ( @pw$ == "" ) end; #pw$ = @pw$; message strcharinfo(0),"You have set your account password (" +#pw$+ ")"; break; case 3: if ( #pw$ == "" ) { mes .npc$; mes "You don't have a password to delete."; close; } #pw$ = ""; if ( #enabled ) #enabled = 0; message strcharinfo(0),"You have deleted your account password"; break; case 4: break; default: break; } end; OnInit: .npc$ = "[ ^FF0000" +strnpcinfo(1)+ "^000000 ]"; bindatcmd "security",strnpcinfo(3)+"::OnSecurity"; end; } [paste=2y02lq1oag4m]
@security to make it work.
@Edit :
You can use the following commands to prevent them using @warp even they save that command from their ALT + M. I didn't include these two commands on my code above as my test server is outdated and doesn't have the said commands.
*enable_command; *disable_command; These commands toggle the ability to use atcommand while interacting with an NPC. The default setting, 'atcommand_enable_npc', is defined in 'conf/battle/gm.conf'. -
Patskie's post in Event Request was marked as the answer
prontera,150,150,0 script Sample 100,{
if ( countitem( .item ) < .amount ) {
mes "You don't have my requirements";
close;
}
delitem .item, .amount;
getitem .p, .a;
announce "Yayks! " + strcharinfo( 0 ) + " won the event",0;
hideonnpc strnpcinfo(1);
end;
OnMinute30:
set [email protected], rand( getarraysize( .BringMeItems ) );
set .item, .BringMeItems[ [email protected] ];
set .amount, rand( 10, 30 );
announce "Bring me " + .amount + "x " + getitemname( .item ),0;
hideoffnpc strnpcinfo(1);
end;
OnInit:
setarray .BringMeItems[0],501,7227,4001,7005,909,512,714;
set .p, 7227;
set .a, 5;
hideonnpc strnpcinfo(1);
end;
}
-
Patskie's post in need script identifier and repair 1 click was marked as the answer
[paste=1krpxfllqxrr]
-
Patskie's post in what does set @ do? was marked as the answer
"@" - A temporary variable attached to the character.
SVN versions before 2094 revision and RC5 version will also treat
'l' as a temporary variable prefix, so beware of having variable
names starting with 'l' if you want full backward compatibility.
-
Patskie's post in About Custom box using function was marked as the answer
function script PrizeBox {
setarray .BoxItems[0],501,502,503,504;
if ( rand( 100 ) < 5 )
getitem .BoxItems[ rand( getarraysize( .BoxItems ) ) ], 1;
return;
}
-
Patskie's post in cash points help? was marked as the answer
668,Handsei,Red Envelope,2,0,,20,,,,,0xFFFFFFFF,63,2,,,,,,{ set #CASHPOINTS,#CASHPOINTS+rand(1000,10000); dispbottom "You now have " +#CASHPOINTS+ " cash points"; },{},{}
-
Patskie's post in R> Script Server Time NPC was marked as the answer
prontera,150,150,0 script Timer 100,{
OnInit:
while (1) {
delwaitingroom;
waitingroom ""+gettimestr("%H:%M:%S", 10)+"",0;
sleep 1000;
}
end;
}
-
Patskie's post in R>auto kick was marked as the answer
Try this one : [paste=6d2yag18te7k]
@nanakiwurtz your script will be triggered even the woe is not initiated.
-
Patskie's post in Add Specific Item Drop for Normal Monster and MVP's was marked as the answer
- script Sample -1,{
OnNPCKillEvent:
if ( getmonsterinfo( killedrid, 22 ) ) {
if ( rand( 100 ) < 25 )
getitem 7227, 5;
} else {
if ( rand( 100 ) < 5 )
getitem 7227, 1;
}
end;
}
-
Patskie's post in Guild limit script was marked as the answer
- query_sql "SELECT `connect_member` FROM `guild` WHERE `guild_id` = '" +getcharid(2)+ "'",[email protected];
+ query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '" +getcharid(2)+ "'",[email protected];
- if ( [email protected] > 30 ) {
+ if ( [email protected] > 11 ) {
-
Patskie's post in R>Quick Refiner was marked as the answer
Try : http://pastebin.com/raw.php?i=E9yCc32J
-
Patskie's post in Healer + Soul Link was marked as the answer
Please use search engine next time . Assuming you are using rAthena : http://pastebin.com/raw.php?i=QCzWUE1r
PS : I just copy @Emistry code and integrate it in your code. Didn't test that.
-
Patskie's post in Rental Item That Will Expire In The End OF Month was marked as the answer
Assuming you will allow the npc who will use the renitem command in December
rentitem, (31*24*60*60 - gettime(5)*24*60*60); PS : This will not do the full work. It only consider the day difference from now up to 12-31-2013. And convert it to seconds. If you want to go into detailed portion of your request. And want an accurate calculation of seconds from now to 12-31-2013. then you need to do a dirty math. I have no time right now as i am doing many things. This is the least i could help
-
Patskie's post in Using 'Aegis_Name' as a constant was marked as the answer
As you have written it. It will not work.