-
Posts
10018 -
Joined
-
Days Won
408
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Emistry
-
your calculation parts are wrong. prt_in,44,100,3 script CP Converter 532,{ .@item = 7227; // Item ID .@amount = 6; // Amount .@countitem = (countitem(.@item) / .@amount); // Countitem if( .@countitem < 1 ) { mes "[ Cash Converter ]"; mes "You required at least "+.@amount+" ^0000FF"+ getitemname(.@item) +"^000000 in your Inventory to be exchanged for Cash Points."; mes "Please come back to me if you have it already."; close; } mes "[ Cash Converter ]"; mes rand(2) ? ""+callfunc("F_Hi")+" I'm Cash Converter, of Prontera Rune-Midgard City." : ""+callfunc("F_Hi")+" I can able to exchange your ^0000FF"+ getitemname(.@item) +"^000000 to Cash Points."; mes " "; mes "What would you like to do?"; next; mes "[ Cash Converter ]"; mes "^FF0000Information:^000000"; mes "^777777 -------------------- ^000000"; mes "Exchange Rate: "+ .@countitem +" x "+ getitemname( .@item ) +" to "+ ( .@countitem * .@amount ) +" Cash Point"+ (.@countitem * .@amount > 1 ? "s" : "") +""; next; if( select("- Convert","- Cancel") == 1 ) { progressbar "0x11CC99",1; specialeffect2 EF_REMOVETRAP; delitem .@item,(.@countitem * .@amount); #CASHPOINTS = #CASHPOINTS + .@countitem; message strcharinfo(0),"You have recieved "+ .@countitem * .@amount +" Cash Point"+ (#CASHPOINTS > 1 ? "s" : "") +" and a of Total: "+ #CASHPOINTS +" Cash Point"+ (#CASHPOINTS > 1 ? "s" : "") +""; mes "[ Cash Converter ]"; mes "You have successfully exchanged."; } close; }
-
you're not even downloading the script from rAthena files and using a herc version from the pastebin link. I believe I dont need to spoonfeed you how to use the download button from forum download section.
-
all script uploaded in the forum are compatible with rA ... stop making false accusation.
-
come on, you're on rA forum, you're using rAthena, why would you go download the herc version which clearly labelled there?
-
prontera,155,181,4 script Sample 4_F_KAFRA1,{ .@i = select(.menu$) - 1; if (countitem(.required_item[.@i]) < .required_amount[.@i]) { mes "Exchange - Failed"; mes "You dont have enough "+.required_amount[.@i]+"x "+getitemname(.required_item[.@i])+" to exchange into "+.reward_amount[.@i]+"x "+getitemname(.reward_item[.@i]); } else { delitem .required_item[.@i], .required_amount[.@i]; getitem .reward_item[.@i], .reward_amount[.@i]; mes "Exchange - Success"; mes "Exchanged "+.required_amount[.@i]+"x "+getitemname(.required_item[.@i])+" to exchange into "+.reward_amount[.@i]+"x "+getitemname(.reward_item[.@i]); } close; function func_Exchange { .required_item[.size] = getarg(0, 0); .required_amount[.size] = getarg(1, 0); .reward_item[.size] = getarg(2, 0); .reward_amount[.size] = getarg(3, 0); .menu$ = .menu$ + "> "+.required_amount[.size]+"x "+getitemname(.required_item[.size])+" to "+.reward_amount[.size]+"x "+getitemname(.reward_item[.size]) + ":"; .size++; return; } OnInit: // func_Exchange(<required_item>, <required_amount>, <reward_item>, <reward_amount>); func_Exchange(501, 1, 601, 1); func_Exchange(502, 1, 602, 2); func_Exchange(503, 1, 603, 3); end; } you can try this. or this (with refine requirements) prontera,155,181,4 script Sample 4_F_KAFRA1,{ .@i = select(.menu$) - 1; if (countitem2(.required_item[.@i], 1, .required_refine[.@i], 0, 0, 0, 0,0) < .required_amount[.@i]) { mes "Exchange - Failed"; mes "You dont have enough "+.required_amount[.@i]+"x "+(.required_refine[.@i]?"+"+.required_refine[.@i]:"")+" "+getitemname(.required_item[.@i])+" to exchange into "+.reward_amount[.@i]+"x "+getitemname(.reward_item[.@i]); } else { delitem2(.required_item[.@i], .required_amount[.@i], 1, .required_refine[.@i], 0, 0, 0, 0, 0); getitem .reward_item[.@i], .reward_amount[.@i]; mes "Exchange - Success"; mes "Exchanged "+.required_amount[.@i]+"x "+getitemname(.required_item[.@i])+" to exchange into "+.reward_amount[.@i]+"x "+getitemname(.reward_item[.@i]); } close; function func_Exchange { .required_refine[.size] = getarg(0, 0); .required_item[.size] = getarg(1, 0); .required_amount[.size] = getarg(2, 0); .reward_item[.size] = getarg(3, 0); .reward_amount[.size] = getarg(4, 0); .menu$ = .menu$ + "> "+.required_amount[.size]+"x "+(.required_refine[.size]?"+"+.required_refine[.size]:"")+" "+getitemname(.required_item[.size])+" to "+.reward_amount[.size]+"x "+getitemname(.reward_item[.size]) + ":"; .size++; return; } OnInit: // func_Exchange(<required_refine>, <required_item>, <required_amount>, <reward_item>, <reward_amount>); func_Exchange(1, 5001, 1, 601, 1); func_Exchange(2, 5001, 1, 602, 2); func_Exchange(3, 5001, 1, 603, 3); end; } this aren't suitable, using npc-scope variable in such fashion will just end up possible hack-attempts.
-
if you just want to duplicate a new item without changing any item description / name, then you can use this db/item_avail.txt it will create a new item based on an existing item, so you dont need to edit any clientside files. only item_db and item_avail 2 files.
-
https://github.com/rathena/rathena/blob/master/conf/battle/player.conf#L33-L35
-
autobonus "{ atcommand \"@slaveclone \"+strcharinfo(0); }",1000,60000; this should work i think ...
-
try https://pastebin.com/raw/Kf2YGwWJ OnInit: .success_rate = 100; // 100% success
-
its a function, not a NPC lol just load the function above to overwrite the existing function or add these NPC // Weapon/Armor Refiners //============================================================ prt_in,63,60,0 script Hollgrehenn 85,{ callfunc "refinemain","Hollgrehenn",0; end; } morocc_in,73,38,6 script Aragham 99,{ callfunc "refinemain","Aragham",0; end; } payon,144,173,5 script Antonio 88,{ callfunc "refinemain","Antonio",0; end; } alberta_in,28,58,0 script Fredrik 85,{ callfunc "refinemain","Fredrik",0; end; } yuno_in01,171,21,4 script Lambert 88,{ callfunc "refinemain","Lambert",0; end; } ein_in01,24,87,5 script Manthasman 826,{ callfunc "refinemain","Manthasman Pruhag",0; end; } lhz_in02,282,20,7 script Fulerr 869,{ callfunc "refinemain","Fulerr",0; end; }
-
https://pastebin.com/raw/h8K0isi2
-
you can try this. https://pastebin.com/raw/h0HQ5Axa .@failsafe_itemid = 7539; .@failsafe_rate = 40; if (.@failsafe_itemid) { if (getequippercentrefinery(.@part) <= .@failsafe_rate) { mes "[Item Protection]"; mes "Do you have "+getitemname(.@failsafe_itemid)+" item ? It will protect your armor/weapon from broken."; next; if (select((countitem(.@failsafe_itemid)? "Yes":""), "No") == 1) { .@failsafe = 1; } } } find all these part and edit.
-
OnKill: if (playerattached()) { getmapxy(.@map$, .@x, .@y, BL_PC); for (.@i = 0; .@i < 10; .@i++) makeitem 7539, 1, .@map$, .@x + rand(-3,3), .@y + rand(-3,3); } end;
-
I want to create a private server and then make it public
Emistry replied to fhmagno's question in Installation Support
https://github.com/rathena/rathena/wiki/installations -
[SQL]: DB error - Table 'rathena.charlog' doesn't exist
Emistry replied to jommain's question in Installation Support
[SQL]: DB error - Table 'rathena.charlog' doesn't exist the error is pretty much self explained. you didnt load this SQL script into your log database or you unable or didnt connect to the correct log database. -
you didnt configure the database access correctly. make sure you use a valid SQL user account to allow the emulator to connect to the database.
-
Killedrid detectable when killing areamonster
Emistry replied to Strand's question in Scripting Support
On1stFloor: set monster,1; dispbottom "Congratulations! You have killed the monster."; end; there are no need to check for killedrid since the event label are only triggered when you killed the target monster. and what's the point to check for monster id during spawning process? -
something like this ? OnPCDieEvent: .@map$ = strcharinfo(3); if (strcharinfo(3) == instance_mapname(("1@gf")) { if (getmapusers(strcharinfo(3)) <= 1) instance_destroy; } end; well, actually you can just set the instance idle timeout to shorter to it would auto destroy once the player warp out from instance, and also make it nobody can reenter if they left.
-
- script chicken -1,{ OnKill: if (playerattached()) { if ( rand( 156 ) <= 158 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } } sleep 1 * 60 * 1000; OnInit: monster "prontera",156,157,"Poring",1002,1,strnpcinfo(1)+"::OnKill"; end; } or you can also try a better approach prontera,156,157,0,0 monster Poring 1002,1,60000,0,"poring_event::OnKill"; - script poring_event -1,{ OnKill: if (playerattached()) { if ( rand(156) <= 158 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } } end; } the rate checking seem useless tho, no idea what you are planning to do with that.
-
Reward_BG(<rate1>, <rate2>); amount = (rate / 3) + (total_bg_member/2); rate1 = reward rate for team 1 rate2 = reward rate for team 2 do the calculation yourself and edit the value.
-
if you have flux cp installed, you can just view the atcommand log there.. browsing such huge amount of records through NPC are bad idea. worst if you even installed the log db to your main db
-
Item display message when not used on defined map
Emistry replied to BFPkiller's question in Database Support
change to item type 11 or 18 if not mistaken, then use delitem to delete it upon used in darkmall. -
download any web crawler software ... or just save the webpage to your drive... or just copy the url from the website and use at your fluxcp anyway why not just grab it from your own data grf
-
use bindatcmd ....
-
prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (!quest_random) { quest_random = rand(1, 3); mes "You have been assigned with a new quest."; next; } switch(quest_random) { case 1: setarray .@reward, 4001, 1; setarray .@item, 512; setarray .@amount, 100; break; case 2: setarray .@reward, 4002, 1; setarray .@item, 501, 502, 503; setarray .@amount, 3, 1, 2; break; case 3: setarray .@reward, 4003, 1; setarray .@item, 512, 503; setarray .@amount, 300, 100; break; default: mes "invalid quest."; close; } mes "Quest Requirement(s):"; .@size = getarraysize(.@item); for (.@i = 0; .@i < .@size; .@i++) { mes " > "+.@amount[.@i]+"x "+getitemname(.@item[.@i]); if (countitem(.@item[.@i]) < .@amount[.@i]) .@fail++; } if (!.@fail) { next; if (select("Submit Quest", "Cancel") == 1) { for (.@i = 0; .@i < .@size; .@i++) delitem .@item[.@i], .@amount[.@i]; getitem .@reward[0], .@reward[1]; quest_random = 0; } } close; } try