-
Posts
1,702 -
Joined
-
Last visited
-
Days Won
14
Community Answers
-
Patskie's post in Requesting for GM Room Script was marked as the answer
Try this :
EDIT : add a check, trigger script only on normal players
prontera,150,150,0 script Sample 100,{ if ( getgmlevel() < 99 ) end; mes "What can i do for you?"; next; if ( select("Open the house:Close the house") == 2 ) { if ( !.open ) mes "The house is already closed"; else { set .open, 0; mes "Closed"; announce strcharinfo(0)+ " closed the GM house",0; } } else { if ( .open ) mes "The house is already opened"; else { set .open, 1; mes "Opened"; announce strcharinfo(0)+ " opened the GM house",0; } } close; } - script GMHouse -1,{ set .check, getvariableofnpc(.open, "Sample"); OnPCLoadMapEvent: getmapxy([email protected]$, [email protected], [email protected], 0); if ( ( [email protected]$ == "payon" && !getgmlevel() ) && !.check ) { sleep2 100; warp "SavePoint",0,0; } end; } payon mapflag loadevent A few notes :
1. If you would change the NPC name Sample make sure you change this part of the script :
set .check, getvariableofnpc(.open, "Sample"); to :
set .check, getvariableofnpc(.open, "<new name of npc>"); 2. Change payon to your corresponding GM house map :
if ( ( [email protected]$ == "payon" && !getgmlevel() ) && !.check ) { to :
if ( ( [email protected]$ == "<GM house map>" && !getgmlevel() ) && !.check ) { and :
payon mapflag loadevent to :
<GM house map> mapflag loadevent
PS : Didn't test this script. So if you encounter an error or a bug. Post it in a detailed manner.
-
Patskie's post in Zeny to Cash was marked as the answer
Try this one :
prontera,150,150,0 script Sample 100,{ if ( Zeny < 100000000 ) end; if( select( "Exchange Zeny to Cash","Cancel" ) == 1 ) { Zeny -= 100000000; #CASHPOINTS += 1000; dispbottom "You now have " +#CASHPOINTS+ " cash points."; mes "Done"; close; } end; } -
Patskie's post in Need Help about identifier npc! was marked as the answer
Replace the identify part by this :
case 1: mes "[ ^ffa500Eternal Kafra^000000 ]"; mes "Okay, let me have a look at your inventory."; next; getinventorylist; while( [email protected] < @inventorylist_count ){ if ( [email protected]_identify[[email protected]] ){ delitem2 @inventorylist_id[[email protected]],1,0,0,0,0,0,0,0; getitem @inventorylist_id[[email protected]],1; } [email protected]++; } mes "[ ^ffa500Eternal Kafra^000000 ]"; mes "Everything has already been identified."; next; goto Kaf_End; end; -
Patskie's post in No @storage in prontera was marked as the answer
In your case :
- script Sample#1 -1,{ OnInit: bindatcmd "storage",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if( strcharinfo(3) == "prontera" ) message strcharinfo(0),"You cannot use @storage on prontera"; else openstorage; end; } -
Patskie's post in Reset my Rank PVP, keep the leader was marked as the answer
Add this on your script :
OnDay0130: OnDay0228: OnDay0330: OnDay0430: OnDay0530: OnDay0630: OnDay0730: OnDay0830: OnDay0930: OnDay1030: OnDay1130: OnDay1230: set .prize, 7227; set .amount, 5; query_sql "SELECT `name` FROM `pvp` ORDER BY `kills` DESC LIMIT 1",@name$; if (!isloggedin(getcharid(3, @name$))) { query_sql "INSERT INTO `inventory` ( `char_id`, `nameid`, `amount`, `equip`, `identify` ) VALUES ( '" +getcharid(0, @name$)+ "', '" +.prize+ "', '" +.amount+ "', 0, 1)"; } else getitem .prize, .amount, getcharid(3, @name$); query_sql "TRUNCATE TABLE `pvp`"; end; -
Patskie's post in Weapon on peco/dragon speciality. was marked as the answer
Not sure about this.
item_id,item_name,.......{ if ( checkriding() ) { bonus bAtk,30; }; },{},{} -
Patskie's post in Help in Flux was marked as the answer
https://github.com/calciumkid/fluxcp-renewal/tree/master/addons
-
Patskie's post in Scripting: On Kill Mob -> Do something was marked as the answer
1. Like this :
/* CREATE TABLE IF NOT EXISTS `sample` ( `account_id` INT(11) unsigned NOT NULL DEFAULT '0', `char_id` INT(11) unsigned NOT NULL DEFAULT '0', `mob_id` INT(11) unsigned NOT NULL DEFAULT '0' ) ENGINE=MyISAM; */ - script Sample -1,{ OnNPCKillEvent: if ( !query_sql("SELECT `mob_id` FROM `sample` WHERE `mob_id` = '" +killedrid+ "'") ) query_sql "INSERT INTO `sample` VALUES ( '" +getcharid(3)+ "', '" +getcharid(0)+ "', '" +killedrid+ "' )"; end; } 2. You cannot use PHP on rAthena scripts.
-
Patskie's post in edit bindatcmd was marked as the answer
Try :
- script storageohyeah -1,{ OnInit: bindatcmd "storage",strnpcinfo(3)+"::OnAtcommand"; setarray .Map$[0],"cell_game","aldeg_cas02","sec_pri","prtg_cast01"; end; OnAtcommand: for ( set [email protected], 0; [email protected] < getarraysize(.Map$); set [email protected], [email protected] + 1 ) { if( strcharinfo(3) == .Map$[[email protected]] ) { message strcharinfo(0),"You can't open your storage here!"; end; } } openstorage; end; } -
Patskie's post in N>help on my dice event was marked as the answer
Bug in such a way that?
Change :
set #CASHPOINTS,#CASHPOINTS+70; set class_s,class_s+3; dispbottom "Gained [70] zeRO points, you now have ["+#CASHPOINTS+"]"; warp "prontera",247,323; end; to :
getitem item_id, amount; set class_s,class_s+3; warp "prontera",247,323; end; -
Patskie's post in How to fix error Forcibly Strip was marked as the answer
Change all skill_id to skillid and skill_lv to skilllv
-
Patskie's post in Request woe cash points was marked as the answer
Try this one :
- script Sample -1,{ setarray .Map$, "pvphero", "prontera", "payon"; set [email protected], getarraysize(.Map$); OnPCKillEvent: for ( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1 ) { if(strcharinfo(3) == .Map$[[email protected]]) { if(@Delay < gettimetick(2)) { set [email protected],rand(1,2); set #CASHPOINTS,#CASHPOINTS + [email protected]; dispbottom "Gained "[email protected]+" Cash Point. Total = "+#CASHPOINTS+" Cash Points."; set @Delay,gettimetick(2) + 180; } } } end; } -
Patskie's post in NPC Script Help was marked as the answer
- script Quest -1,{ mes "Hi " + strcharinfo(0) + ", Your here for the quest."; mes "This are the listed items i need"; mes "Make sure you have the real items or ill just delete them"; next; mes "1000 TCG Card"; mes "50 Ancient Lips"; mes "50 Animal Gore"; mes "50 Ant Jaw"; mes "50 Million Zeny"; next; mes "If you dont have all the items i will not give the item for the next quest"; next; mes "It seems you have all the items for the quest. I will erase them and give you the item for the next quest."; next; if ( countitem(7227)<1000 || countitem(1054)<50 || countitem(702)<50 || countitem(1014)<50 || Zeny <50000000 ) { mes "You don't have requirements"; close; } delitem 7227,1000; delitem 1054,50; delitem 702,50; delitem 1014,50; set zeny,zeny-50000000; getitem 6156,1; close; } -
Patskie's post in warper / healer got problem was marked as the answer
This :
izlude.gat,123,141,6 script Healer 81,{ percentheal 100,100; skilleffect 34,0; sc_start SC_BLESSING,360000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10; end; } -
Patskie's post in Single Strip bypass was marked as the answer
I mean the whole content of the file
Try this :
if ( sd && tsc && sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ROGUE && rand()%100 < 15 && ( skillid == RG_STRIPWEAPON && tsc->data[SC_CP_WEAPON] || skillid == RG_STRIPSHIELD && tsc->data[SC_CP_SHIELD] || skillid == RG_STRIPARMOR && tsc->data[SC_CP_ARMOR] || skillid == RG_STRIPHELM && tsc->data[SC_CP_HELM] ) ) { int item_id = 7139; // Glistening Coat int ii; ARR_FIND( 0, MAX_INVENTORY, ii, sd->status.inventory[ii].nameid == item_id ); if ( ii < MAX_INVENTORY ) { pc_delitem( sd, ii, 1, 0, 0, LOG_TYPE_CONSUME); switch ( skillid ) { case RG_STRIPWEAPON: status_change_end( bl, SC_CP_WEAPON, INVALID_TIMER ); sc_start( bl, SC_STRIPWEAPON, 100, skilllv, d ); break; case RG_STRIPSHIELD: status_change_end( bl, SC_CP_SHIELD, INVALID_TIMER ); sc_start( bl, SC_STRIPSHIELD, 100, skilllv, d ); break; case RG_STRIPARMOR: status_change_end( bl, SC_CP_ARMOR, INVALID_TIMER ); sc_start( bl, SC_STRIPARMOR, 100, skilllv, d ); break; case RG_STRIPHELM: status_change_end( bl, SC_CP_HELM, INVALID_TIMER ); sc_start( bl, SC_STRIPHELM, 100, skilllv, d ); break; } clif_skill_nodamage( src, bl, skillid, skilllv, i ); break; } } -
Patskie's post in Max card in Headgear! was marked as the answer
function script Sample {
if( isequippedcnt( 4403 ) > 2 ){
message strcharinfo(0),"Cant Wear More than 2 Kiel Cards.";
nude;
}
return;
}
-
Patskie's post in GM password was marked as the answer
Try :
- script Sample -1,{ OnPCLoginEvent: set [email protected]$, "abcdefgh123"; // GM password set [email protected], 10; // 10 minutes if ( getgmlevel() < 2 ) end; if ( gettimetick(2) < #timer ) { mes "You cannot login"; close2; atcommand "@kick " +strcharinfo(0); end; } sc_start sc_berserk, 1000000000, 1; mes "Input your password"; next; input [email protected]$; if ( [email protected]$ != [email protected]$ ) { set #timer, gettimetick(2) + ( [email protected] * 60 ); sc_end sc_berserk; close2; atcommand "@kick " +strcharinfo(0); end; } else { sc_end sc_berserk; mes "Thanks for your cooperation"; close; } } -
Patskie's post in Guild Package was marked as the answer
http://rathena.org/wiki/Adding_a_Script or http://lmgtfy.com/?q=adding%20a%20script%20rathena
http://www.youtube.com/watch?v=Az0C1k9AU_o
-
Patskie's post in how to remove this from this jobmaster? was marked as the answer
Change :
case 0: Job_Menu(1,2,3,4,5,6,23,4046,24,25,4023); to :
case 0: Job_Menu(1,2,3,4,5,6,23,4046); -
Patskie's post in putting a chat room above was marked as the answer
Change :
OnInit: .register_limit = 10; // maximum amount of players can play in this event .ann_survive = 30000; // the rate at which announce the players that still survive in devil square, in mili-seconds bindatcmd "devilsquare", strnpcinfo(0)+"::Onatcmd", 99,100; end; to :
OnInit: waitingroom "Devil Square",0; .register_limit = 10; // maximum amount of players can play in this event .ann_survive = 30000; // the rate at which announce the players that still survive in devil square, in mili-seconds bindatcmd "devilsquare", strnpcinfo(0)+"::Onatcmd", 99,100; end; -
Patskie's post in Help with this exchanger script, please. was marked as the answer
prontera,150,150,0 script Exchanger 100,{ mes .npc$; mes "Hello " +strcharinfo(0)+ ", I am the exchanger on this server. Do you have something to exchange?"; next; if(select("Yes:No") - 1) close; mes .npc$; mes "You are charge to spend " +.req_zeny+ " zeny for using my service. Still want to use my service?"; next; if (select("Yes:No") - 1) close; if (Zeny < .req_zeny) { mes .npc$; mes "You do not have enough zeny for you to use my service"; close; } mes .npc$; mes "Good then, What item you want to exchange?"; next; getinventorylist; for ([email protected] = 0; [email protected] < @inventorylist_count; [email protected]++) { if (compare(.itemidcompare$, ":"+ @inventorylist_id[[email protected]] +":" ) ) { [email protected]$ = [email protected]$ + getitemname( @inventorylist_id[[email protected]] ) +":"; [email protected][ [email protected] ] = @inventorylist_id[[email protected]]; [email protected]++; } } if ([email protected] == 0) { mes .npc$; mes "You have no items to exchange"; close; } [email protected] = [email protected][select([email protected]$) - 1]; mes .npc$; mes "You want to exchange " +getitemname([email protected])+ " right?"; next; if (select("Yes:No") - 1) close; mes .npc$; mes "Where do you want to exchange your " +getitemname([email protected])+ "?"; next; [email protected]$ = getitemname(.itemid); for ([email protected] = 1; [email protected] < .itemidsize; [email protected]++) [email protected]$ = [email protected]$ + ":" + getitemname(.itemid[[email protected]]); [email protected] = .itemid[select( [email protected]$ ) -1]; mes .npc$; mes "Are you sure you want to spend " +.req_zeny+ " zeny for trading " +getitemname([email protected]) + " into " + getitemname([email protected])+ "?"; next; if (select("Yes:No") - 1) close; if (countitem([email protected]) == 0 || Zeny < .req_zeny) { mes .npc$; mes "You do not meet the requirements"; close; } getinventorylist; for(set [email protected],0; [email protected] < @inventorylist_count; set [email protected],[email protected]+1){ if( @inventorylist_id[[email protected]] == [email protected] ) { set [email protected]_rate, @inventorylist_refine[[email protected]]; } } delitem [email protected], 1; if ( [email protected]_rate ) getitem [email protected], 1; else getitem2 [email protected],1,1,[email protected]_rate,0,@card1,@card2,@card3,@card4; set Zeny,Zeny - .req_zeny; mes .npc$; mes "==================================="; mes "Official Receipt"; mes "==================================="; mes "From : " +getitemname([email protected]); mes "To : " +getitemname([email protected]); mes "==================================="; next; mes .npc$; mes "Thank you for using our trading system " +strcharinfo(0)+ ". Have a nice day"; close; OnInit: set .npc$,"^FF0000" +strnpcinfo(1)+ "^000000"; // NPC Name .req_zeny = 0; // Zeny to use the service. setarray .itemid, 1618, 1604; // Put all id here set .itemidsize, getarraysize( .itemid ); set .itemidcompare$, ":"+ .itemid[0]; for ( [email protected] = 1; [email protected] < .itemidsize; [email protected]++ ) .itemidcompare$ = .itemidcompare$ +":"+ .itemid[[email protected]] +":"; end; } Try this one. Didn't test though and BTW i am not @Skorm i am @Patskie
-
Patskie's post in How to make 2servers in 1 VPS or IP was marked as the answer
If you want it that way then you should take a look here http://rathena.org/wiki/Multiple_Servers
For clientinfo.xml configuration. Check this http://rathena.org/board/topic/74645-multi-server-for-file-clientinfoxml/?p=158307
-
Patskie's post in Need (Rates) Help was marked as the answer
trunk/conf/battle/drops.conf. Change your configuration this :
// The rate at which equipment is dropped. item_rate_equip: 200000 item_rate_equip_boss: 100000 item_drop_equip_min: 1 item_drop_equip_max: 10000 // The rate at which cards are dropped item_rate_card: 100000 item_rate_card_boss: 50000 item_drop_card_min: 1 item_drop_card_max: 10000 -
Patskie's post in Stalker bypass FCP was marked as the answer
trunk/src/map/skill.c :
Find :
//Special message when trying to use strip on FCP [Jobbie] if( sd && skill_id == ST_FULLSTRIP && tsc && tsc->data[SC_CP_WEAPON] && tsc->data[SC_CP_HELM] && tsc->data[SC_CP_ARMOR] && tsc->data[SC_CP_SHIELD]) { clif_gospel_info(sd, 0x28); break; } Add below :
if ( sd && tsc && sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ROGUE && rand()%100 < 15 && ( skill_id == RG_STRIPWEAPON && tsc->data[SC_CP_WEAPON] || skill_id == RG_STRIPSHIELD && tsc->data[SC_CP_SHIELD] || skill_id == RG_STRIPARMOR && tsc->data[SC_CP_ARMOR] || skill_id == RG_STRIPHELM && tsc->data[SC_CP_HELM] ) ) { int item_id = 7139; // Glistening Coat int ii; ARR_FIND( 0, MAX_INVENTORY, ii, sd->status.inventory[ii].nameid == item_id ); if ( ii < MAX_INVENTORY ) { pc_delitem( sd, ii, 1, 0, 0, LOG_TYPE_CONSUME); switch ( skill_id ) { case RG_STRIPWEAPON: status_change_end( bl, SC_CP_WEAPON, INVALID_TIMER ); sc_start( NULL, bl, SC_STRIPWEAPON, 100, skill_lv, d ); break; case RG_STRIPSHIELD: status_change_end( bl, SC_CP_SHIELD, INVALID_TIMER ); sc_start( NULL, bl, SC_STRIPSHIELD, 100, skill_lv, d ); break; case RG_STRIPARMOR: status_change_end( bl, SC_CP_ARMOR, INVALID_TIMER ); sc_start( NULL, bl, SC_STRIPARMOR, 100, skill_lv, d ); break; case RG_STRIPHELM: status_change_end( bl, SC_CP_HELM, INVALID_TIMER ); sc_start( NULL, bl, SC_STRIPHELM, 100, skill_lv, d ); break; } clif_skill_nodamage( src, bl, skill_id, skill_lv, i ); break; } } Make sure you recompile your server after you've made the changes.