-
Posts
1702 -
Joined
-
Last visited
-
Days Won
19
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by Patskie
-
Try this one player can only talk to npc if WOE is not activated : prontera,150,150,0 script Sample 100,{ query_sql "SELECT `guild_id` FROM `guild_castle` WHERE `castle_id` = 15",@gid; set .@chance, 30; // 30% chance setarray .@items[0],4001,4002,4003; // <item id> set .@size, getarraysize(.@items); set .@random, rand(.@size); if ( !getcharid(2) || !@gid || agitcheck() || agitcheck2() ) end; if ( (@gid == getcharid(2)) && (getguildmaster(getcharid(2)) == strcharinfo(0)) ) { if ( rand(100) < .@chance ) getitem .@items[.@random], 1; } end; }
-
2 servers in 1 IP address with different rates.
Patskie replied to pachupappy's question in Installation Support
Just remember that you must change the port of your 2nd emulator from your 1st emulator otherwise one server will not listen to the port which is being used by the other one. -
So meaning @test is just for only specific items? I cannot make it in game like: @test 607 1 @test 671 1 If you want it that way, you can try this : // @test <item id> <amount> - script trial -1,{ OnInit: bindatcmd "test",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: if ( .@atcmd_numparameters != 2 ) end; addrid(1); getitem .@atcmd_parameters$[0], .@atcmd_parameters$[1]; end; }
-
Try : prontera,150,150,0 script Sample 100,{ OnMinute00: setarray .cards[0], 4001,4002,4003,4004,4005,4006,4007; // <id> setarray .amount[0], 10,5,2,6,7,8,9; // <points> set .random, rand( getarraysize( .cards ) ); getitem .cards[ .random ], 1; set #CASHPOINTS, #CASHPOINTS + @amount[ .random ]; end; }
-
http://rathena.org/wiki/Getitem
-
Mean getting random cards every hour? : prontera,150,150,0 script Card Trader 100,{ OnMinute00: getitem rand(4001,4555),1; end; }
-
- script trial -1,{ OnInit: bindatcmd "test",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: addrid(1); getitem <id>,<amount>; end; }
-
Example : I have an array like this : setarray .items[0],7227,5,7179,5; // <itemd id>,<amount> set .size, getarraysize(.items); Iterate it ( either for loop or while loop will do ) : while ( .@i < .size ) { // Right now the index is 0 because we didn't increment the .@i variable getitem .items[.@i], .items[.@i+1]; // right now the .@i is 0 so meaning .items[0] is 7227 which is TCG and the next argument is [.@i + 1] so 0 + 1 = 1, meaning .items[1] which 5 and 5 is the amount set .@i, .@i + 2; // since you want to combine 2 pieces of data in one array which in our case is <item id>, <amount> then you should not use .@i++ or set .@i, .@i + 1 because this will iterate like .items[0], .items[1] and so on which is not the proper in our example. It should be .@i += 2 or set .@i, .@i + 2. Why? because the .@i + 1 is always the amount so the loop will disregard it and proceed to the next index } Sorry for noob explanation ha ha ha
-
Combine in one array : setarray .@items[0],15000,0,15001,100,15002,200; // <equip item>,<cast speed> .@item_size = getarraysize( .@items ); while ( .@i < .@item_size ) { mes .@items[.@i]+ " " +.@items[.@i+1]; .@i += 2; }
-
Try this one. Note that `ragnarok` is the name of the database. Change that to your database name : brasilis,203,185,4 script Freebies 112,{ delwaitingroom; waitingroom "Free Item Here!",0; // Look on the configuration! query_sql "SELECT `account_id` FROM `ragnarok`.`char` WHERE `char_id` = '" + getcharid(0) + "'", .@id; if( !Freebies && ( .@id > 2000735 ) ){ set Freebies,1; mes "Welcome...this is your gift..."; getitem2 2320,1,1,7,0,0,0,0,0; // +7 formal suit[1] getitem2 2504,1,1,7,0,0,0,0,0; // +7 muffler[1] getitem2 2104,1,1,7,0,0,0,0,0; // +7 buckler[1] getitem2 2102,1,1,7,0,0,0,0,0; // +7 Guard[1] getitem2 2404,1,1,7,0,0,0,0,0; // +7 Shoes[1] getitem 12210, 5; getitem 14533, 5; getitem 12622, 1; getitem 4142, 1; getitem 4147, 1; } else { mes "You have claim the Reward already."; } close; }
-
You can also iterate an array through a while loop : setarray .@items[0],15000,15001,15002,15003; .@item_size = getarraysize( .@items ); while ( .@i < .@item_size ) { if ( !countitem( .@items[.@i] ) ){ dispbottom "You dont have "+getitemname( .@items[.@i] ); end; } else if ( !isequipped( .@items[.@i] ) ){ dispbottom "You didnt equip with "+getitemname( .@items[.@i] ); end; } .@i++; }
-
Make sure those files are not merge with your GRF. Otherwise it will not save your hotkeys. Remove them from your GRF and create a data folder then paste those files to it.
-
I misunderstood this one lol. Edited my previous post
-
Agree with you brother
-
Try this one : - script Sample -1,{ OnNPCKillEvent: if ( strcharinfo(3) == "prontera" ) { if ( killedrid == 1002 ) #CASHPOINTS += 5; dispbottom "You now have " +#CASHPOINTS+ " cash points"; } end; } If you want to add map and mob then the script looks like this : - script Sample -1,{ OnNPCKillEvent: // Add " || strcharinfo(3) == <another map name> " if ( strcharinfo(3) == "prontera" || strcharinfo(3) == "payon" ) { // Add " || killedrid == <mob id> " if ( killedrid == 1002 || killedrid == 1113 ) #CASHPOINTS += 5; dispbottom "You now have " +#CASHPOINTS+ " cash points"; } end; } Note that this script add 5 cash points on the player account each time the player kill a certain mob
-
- How to make a script to work from the start of the server? Answer : Put your script on trunk/npc/ folder and and specify the path of your script on your trunk/npc/scripts_custom.conf - How to make an image appear over a player (like emblem in WoE)? Answer : Source - How to equip the item only if it the player has a skill ? (eg with Sword -> Sword Mastery) Answer : if ( !getskilllv("SM_SWORD") ) // unequip the item - And how to put multiple scripts in a single weapon? (eg A script when it is equipped and B script when unequipped) Answer : trunk/db/re/item_db.txt // Structure of Database: // ID,AegisName,Name,Type,Buy,Sell,Weight,ATK,DEF,Range,Slots,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{ Script },{ OnEquip_Script },{ OnUnequip_Script }
-
Try these one : prontera,150,150,0 script Storage 100,{ set .@npc$, strnpcinfo(1); if ( !getgmlevel() ) end; mes .@npc$; mes "Input the name of the character"; next; input .@name$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" +escape_sql(.@name$)+ "'",.@aid; if ( .@aid == 0 ) { mes .@npc$; mes "The character do not exist."; close; } charcommand "#storeall " + .@name$; mes .@npc$; mes "Done!"; close; }
-
Where should we expect? data/wav folder
-
Did you set your trunk/conf/battle/client.conf? // Valid range of dyes and styles on the client. min_hair_style: 0 max_hair_style: 27 min_hair_color: 0 max_hair_color: 8 min_cloth_color: 0 max_cloth_color: 4
-
How item bonus not work to certain class?
Patskie replied to Lil Troll's question in Database Support
Try this : { if ( BaseClass != Job_Thief ) { bonus bAgi,-5; bonus bAgi,-5; } },{},{} There is no operator !== and besides you can only disregard brackets if you will use only one command : if ( BaseClass == Job_Thief ) bonus bAgi,5; if ( BaseClass == Job_Thief ) { bonus bAgi,5; bonus bStr,5; } -
Can someone make an hourly cashpoint script and npc cashpoints
Patskie replied to iamrence's question in Script Requests
For npc cashpoints. You can use multi-currency shop. For hourly cashpoints. You can revise @Emistry script : http://pastebin.com/raw.php?i=M7GabDkV Change : getitem 7227,1; to : set #CASHPOINTS, #CASHPOINTS + <desired amount>; -
Try : 4359,B_Eremes_Card,Assassin Cross Card,6,20,,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,"ASC_EDP",1,1; },{},{} Reference : trunk/doc/item_bonus.txt bonus3 bAutoSpell,n,x,y; Auto Spell casting on attack of spell n at level x with y/10% chance. (supports skill names) Skill is casted on target unless it is a self or support (inf = 4/16) skill.
-
Use @points in-game to check cash points of a certain character. - script Cashpoints -1,{ OnInit: bindatcmd "points",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: dispbottom "You currently have " +#CASHPOINTS+ " cash points"; end; }
-
R>Daily Quest For ZENY ( Account BOUNDED per QUEST )
Patskie replied to mikemike's question in Script Requests
Try : prontera,150,150,0 script Quest 100,{ if ( gettimetick(2) < #timer ) { mes .npc$; mes "You can do the quest once a day"; close; } mes .npc$; mes "Here are my requirements : "; while ( .@i < .size ) { mes .requirements[.@i + 1] + "x " + getitemname(.requirements[.@i]); set .@i, .@i + 2; } next; while ( .@i < .size ) { if ( countitem(.requirements[.@i]) < .requirements[.@i + 1] ) close; set .@i, .@i + 2; } mes .npc$; mes "Nice nice nice ~ "; set Zeny, Zeny + .prize; set #timer, gettimetick(2) + 86400; close; OnInit: set .npc$, strnpcinfo(1); setarray .requirements[0],7227,5,7179,5; // <item id>,<amount> this is for requirements set .prize, 1000000; // Zeny prize set .size, getarraysize(.requirements); end; } -
You cannot leave your sql.db_password as an empty string. Try creating a user on your database with full privileges, add a password then put that password on your sql.db_password