-
Posts
10015 -
Joined
-
Days Won
400
Community Answers
-
Emistry's post in group cash was marked as the answer
try this
31002,Bônus_Eletrônico,Bônus Eletrônico,2,10000,,2500,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("F_PartyEarnCash"); },{},{} load this npc script
function script F_PartyEarnCash { .@amount = rand(1, 100); #CASHPOINTS += .@amount; dispbottom "PowkRO: Você Ganhou "+F_InsertComma(.@amount)+" Rops."; .@party_id = getcharid(1); if (.@party_id) { .@owner_aid = getcharid(3); .@owner_cid = getcharid(0); getpartymember .@party_id, 2; .@partymembercount = $@partymembercount; for (.@i = 0; .@i < .@partymembercount; .@i++) { if ($@partymemberaid[.@i] == .@owner_aid) continue; if (attachrid($@partymemberaid[.@i])) { .@amount = rand(1, 50); #CASHPOINTS += .@amount; dispbottom "PowkRO: Você Ganhou "+F_InsertComma(.@amount)+" Rops."; dispbottom "PowkRO: '"+strcharinfo(0)+"' gained "+F_InsertComma(.@amount)+" Rops.", 0x00FF00, .@owner_cid; detachrid; } } } return; }
-
Emistry's post in [Warning]: script:query_sql: Too many columns, discarding last 3 columns. was marked as the answer
if (query_sql(.@selectIfKillExistQuery$) > 0) { // Exist a kill of that MVP so +1 to kill count change to
if (query_sql(.@selectIfKillExistQuery$, .@charid, .@kills, .@name$) > 0) { // Exist a kill of that MVP so +1 to kill count
-
Emistry's post in How to add GM Function / Start event manually was marked as the answer
prontera,114,154,5 script Poring Race 568,{ if (getgmlevel() >= 99) { mes "Would you like to "++" the event?"; if (select("continue", (.access_Prace) ? "Stop Event" : "Start Event") == 2) { if (.access_Prace) { donpcevent strnpcinfo(3)+"::OnPraceEnd"; mes "event stopped."; } else { donpcevent strnpcinfo(3)+"::OnPraceStart"; mes "event started."; } close; } } if( .access_Prace == 0 ) { mes "[Event Employee: Poring Race]"; mes "Poring Race has ended."; close; } mes "[Event Employee: Poring Race]"; mes "Do you want to participate on Poring Race?"; if( select( "Yes","No" ) -1 ) { next; mes "[Event Employee: Poring Race]"; mes "See you again next time!"; close; } if( .access_Prace == 0 ) { next; mes "[Event Employee: Poring Race]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } close2; @prace_winner$ = ""; warp "p_track01",52,41; end; // OnInit: OnClock1434: if( gettime(3)%2 ) end; OnPraceStart: set .access_Prace, 1; announce "Event Employee [Poring Race]: Poring Race is about to begin. To participate kindly approach me at Event Room or use @event",0; setnpctimer 100000,"Bidder#prace0"; startnpctimer "Bidder#prace0"; end; OnPraceEnd: set .access_Prace, 0; announce "Event Employee [Poring Race]: Poring Race is over! Thank you for participating.",0; end; } try
-
Emistry's post in Need to add portal when event start was marked as the answer
prontera,181,157,0 warp prace_warp_portal 1,1,p_track01,52,41 OnClock2100: //if( gettime(3)%2 ) end; set .access_Prace, 1; announce "Poring Race is now open!",0,0xFFAB54; setnpctimer 100000,"Bidder#prace0"; startnpctimer "Bidder#prace0"; enablenpc "prace_warp_portal"; // <--- ADD THESE sleep 60000; // <--- ADD THESE disablenpc "prace_warp_portal"; // <--- ADD THESE end; and also
OnInit: disablenpc "prace_warp_portal"; // <--- ADD THESE end;
-
Emistry's post in gettime(6) setting can any 1 guide? was marked as the answer
use gettimetick
if (#luckyspin < gettimetick(2)){ #luckyspin = gettimetick(2) + (3600 * 12);
-
Emistry's post in Message: MySQL error (SQLSTATE: 23000, ERROR: 1048): Column 'name_aegis' cannot be null was marked as the answer
probably you are loading empty data? or outdated data file?
the error are pretty much self explained, the field cant be empty when you try to import data into the database,
-
Emistry's post in Item Exchanger (Recolor item exhanger) was marked as the answer
https://rathena.org/board/topic/57218-valkyrie-assistant/#entry69687
-
Emistry's post in [Error]: buildin_announce: fatal error ! player not attached! was marked as the answer
announce "Alon Event Employee: Well done. All the monster are dead!",bc_map; change to
mapannounce "pvp_n_7-5", "Alon Event Employee: Well done. All the monster are dead!", bc_map;
-
Emistry's post in Q>Zeny & Bank Wipe out was marked as the answer
shutdown the server and run the SQL script.
UPDATE `char` SET `zeny` = 0; UPDATE `mail` SET `zeny` = 0; UPDATE `acc_reg_num` SET `value` = 0 WHERE `key` LIKE '#BANKVAULT';
-
Emistry's post in Instance Reset Time was marked as the answer
- script sample -1,{ OnInit: setarray .map$, "prontera", "izlude"; .map_size = getarraysize(.map$); end; OnHour00: for (.@i = 0; .@i < .map_size; .@i++) { .@size = instance_list(.map$[.@i]); for (.@x = 0; .@x < .@size; .@x++) { instance_announce .@instance_list[.@x], "<SYSTEM> Instance are destroyed upon reached 12AM everyday.", bc_map; instance_destroy .@instance_list[.@x]); } } end; } required the Pull: 5112 mentioned above.
-
Emistry's post in gold room exchange input how many gold was marked as the answer
if (checkweight(969,gold) == 0) goto L_OverWeight; getitem 969, gold;x set gold, 0; change to
input .@amount, 0, gold; if (!.@amount) close; if (checkweight(969,.@amount) == 0) goto L_OverWeight; gold -= .@amount; getitem 969, .@amount;
-
Emistry's post in Missing Blue Sky and Clouds was marked as the answer
may refer this topic
https://rathena.org/board/topic/101222-adding-sky-in-the-map/
-
Emistry's post in Can Anyone Guide to fix this error was marked as the answer
bg_create_team(....) you dont have this script command added to your server, or forgotten recompile if you have already added it.
-
Emistry's post in Poring Race Error was marked as the answer
the parameter for getmapxy has been changed long ago.
https://github.com/rathena/rathena/commit/26720f041a3cd0edbaa975bfc70345a30e9bf706
change it into appropriate bl_type
-
Emistry's post in Dummy Punching Bag was marked as the answer
OnInit:
setmapflag( "payon",mf_monster_noteleport );
...
...
...
-
Emistry's post in Instant Job Changer was marked as the answer
use this to setup the Job Changer in whatever way you want it.
https://rathena.org/board/topic/105789-utility-sql-job-changer/
-
Emistry's post in Need to add reset button for GM to clear room/ when all players leave room auto clear ROOM was marked as the answer
dali02,82,136,5 script Bloody Branch Room 403,{ setarray $@maps$[1], "alb2trea", "pvp_n_1-5", "pvp_n_2-5", "pvp_n_3-5", "pvp_n_4-5", "pvp_n_5-5"; for(set .@b,1; .@b < getarraysize($@maps$); set .@b,.@b + 1) { if(.@b==1){ set .@menu$, .@menu$ + "Public- "+((getmapusers($@maps$[.@b])>=30)?"^CD0000Closed^000000("+getmapusers($@maps$[.@b])+")":"^007700Open^000000("+getmapusers($@maps$[.@b])+")")+":"; } else { set .@menu$, .@menu$ + "Private["+(.@b-1)+"]- "+((getmapusers(""+$@maps$[.@b]+"")>=5)?"^CD0000Closed^000000("+getmapusers($@maps$[.@b])+")":"^007700Open^000000("+getmapusers($@maps$[.@b])+")")+":"; } } if(select(.@menu$)) { callfunc "GRfunction",$@maps$[@menu],@menu; } } function script GRfunction { if(!getmapusers(getarg(0))) killmonster getarg(0), "All"; if(getmapusers(getarg(0))<=30&&getarg(1)==1){ warp getarg(0),0,0; end; } if(!getmapusers(getarg(0))){ mes "Input a new password."; input($password$[getarg(1)]); next; warp getarg(0),0,0; end; } if(getmapusers(getarg(0))<=5&&getarg(1)!=1) { mes "This room is password protected please input the password now."; input(@name$); if(@name$==$password$[getarg(1)]){ mes "correct!"; next; warp getarg(0),0,0; end; } else { mes "Incorrect!"; close; } } else { mes "I'm sorry this room is full."; close; } } // Duplicates //============================================================ alberta,32,247,6 duplicate(Bloody Branch Room) BBroom#alb 403 comodo,188,162,6 duplicate(Bloody Branch Room) BBroom#com 403 morocc,171,102,6 duplicate(Bloody Branch Room) BBroom#moc 403 gonryun,168,116,6 duplicate(Bloody Branch Room) BBroom#gon 403 mid_camp,221,288,6 duplicate(Bloody Branch Room) BBroom#mid 403 payon,186,105,6 duplicate(Bloody Branch Room) BBroom#pay 403 dicastes01,207,189,3 duplicate(Bloody Branch Room) BBroom#dic 403 mora,43,153,6 duplicate(Bloody Branch Room) BBroom#mor 403 malangdo,152,112,3 duplicate(Bloody Branch Room) BBroom#mal 403 ayothaya,157,102,3 duplicate(Bloody Branch Room) BBroom#ayo 403 you can just wipe it right before player enter a room that has no player inside.
-
Emistry's post in Announce the Signed name on an Item was marked as the answer
- Id: 501 AegisName: Red_Potion Type: Healing Script: | callfunc("F_SignedItem", 501, IG_Taming); function script F_SignedItem { .@item_id = getarg(0, 0); .@groupranditem = getarg(1, 0); if (.@item_id && .@groupranditem) { getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) { if (@inventorylist_id[.@i] == .@item_id && @inventorylist_card3[.@i] && @inventorylist_card4[.@i]) { .@signed_cid = (@inventorylist_card3[.@i] | (@inventorylist_card4[.@i] << 0x10)); query_sql("SELECT `name` FROM `char` WHERE `char_id` = "+.@signed_cid, .@signed_name$); .@item_name$ = getitemname(.@item_id); if (.@signed_name$ != "") .@item_name$ = .@signed_name$+"'s " + .@item_name$; .@inventorylist_name$[.@i] = .@signed_name$; .@menu$ = .@menu$ + .@item_name$; } .@menu$ += ":"; } .@i = select(.@menu$) - 1; delitem2 @inventorylist_id[.@i],1,@inventorylist_identify[.@i],@inventorylist_refine[.@i],@inventorylist_attribute[.@i],@inventorylist_card1[.@i],@inventorylist_card2[.@i],@inventorylist_card3[.@i],@inventorylist_card4[.@i]; .@reward_id = groupranditem(.@groupranditem); getitem .@reward_id, 1; announce "["+strcharinfo(0)+"] has obtained "+getitemname(.@reward_id)+" from ["+.@inventorylist_name$[.@i]+"'s "+getitemname(.@item_id)+"]!!!", bc_all; } return; } you can try something like this.
-
Emistry's post in Hourly Reward Using Equip Item was marked as the answer
EquipScript: | addtimer (60 * 1000), "Sample::OnUpdate"; UnEquipScript: | deltimer "Sample::OnUpdate"; - script Sample -1,{ OnUpdate: if (checkvending()) { dispbottom "Hourly Point stopped due to vending."; } else if (checkchatting()) { dispbottom "Hourly Point stopped due to chatroom."; } else if (checkidle() >= 60) { // idled for 60 seconds dispbottom "Hourly Point stopped due to idle."; } else { #hourly_point_duration++; if (#hourly_point_duration >= 60) { #hourly_point++; dispbottom "Hourly Point +1. Total "+#hourly_point+" Points."; } addtimer (60 * 1000), strnpcinfo(3)+"::OnSample"; } end; }
-
Emistry's post in Simple bank sql base thanks a lot was marked as the answer
prontera,155,181,5 script Simple Bank 757,{ query_sql("SELECT `deposit`, `tax` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1", .@total_zeny, .@total_tax); mes "You have "+F_InsertComma(.@total_zeny)+" Zeny."; mes "You contributed "+F_InsertComma(.@total_tax)+" Zeny of Tax."; mes " "; switch(select( "Deposit Zeny", "Withdraw Zeny" )) { case 1: input .@amount, 0, Zeny; if (.@amount < 100) { mes "You cant deposit less than 100 Zeny."; } else if ((MAX_ZENY - .@total_zeny) < .@amount) { mes "Your bank can't hold that much of Zeny."; } else { mes "You have deposited "+F_InsertComma(.@amount)+" Zeny."; Zeny -= .@amount; query_sql("UPDATE `login` SET `deposit` = (`deposit` + "+.@amount+" - "+((.@amount / 100) * 2)+"), `tax` = (`tax` + "+((.@amount / 100) * 2)+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1"); } break; case 2: input .@amount, 0, min(.@total_zeny, 1000000000); if (.@amount <= 0) { mes "You cant deposit 0 Zeny."; } else if ((MAX_ZENY - Zeny) < .@amount) { mes "You can't hold that much of Zeny."; } else { mes "You have withdraw "+F_InsertComma(.@amount)+" Zeny."; Zeny += .@amount; query_sql("UPDATE `login` SET `deposit` = (`deposit` - "+.@amount+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1"); } break; } close; } since tax value doesn't have limit, you probably should create the column with bigger datatype to support more than 2.1b value.
-
Emistry's post in Simple bank sql base thanks a lot was marked as the answer
query_sql("UPDATE `login` SET `deposit` = (`deposit` + "+.@amount+" - "+((.@amount / 100) * 2)+"), `tax` = (`tax` + "+((.@amount / 100) * 2)+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1");
-
Emistry's post in Simple bank sql base thanks a lot was marked as the answer
prontera,155,181,5 script Simple Bank 757,{ query_sql("SELECT `deposit`, `tax` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1", .@total_zeny, .@total_tax); mes "You have "+F_InsertComma(.@total_zeny)+" Zeny."; mes "You contributed "+F_InsertComma(.@total_tax)+" Zeny of Tax."; mes " "; switch(select( "Deposit Zeny", "Withdraw Zeny" )) { case 1: input .@amount, 0, Zeny; if (.@amount < 100) { mes "You cant deposit less than 100 Zeny."; } else if ((MAX_ZENY - .@total_zeny) < .@amount) { mes "Your bank can't hold that much of Zeny."; } else { mes "You have deposited "+F_InsertComma(.@amount)+" Zeny."; Zeny -= .@amount; query_sql("UPDATE `login` SET `deposit` = (`deposit` + "+.@amount+" - "+((.@amount / 100) * 2)+"), `tax` = (`tax` + "+((.@amount / 100) * 2)+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1"); } break; case 2: input .@amount, 0, min(.@total_zeny, 1000000000); if (.@amount <= 0) { mes "You cant deposit 0 Zeny."; } else if ((MAX_ZENY - Zeny) < .@amount) { mes "You can't hold that much of Zeny."; } else { mes "You have withdraw "+F_InsertComma(.@amount)+" Zeny."; Zeny += .@amount; query_sql("UPDATE `login` SET `deposit` = (`deposit` - "+.@amount+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1"); } break; } close; } since tax value doesn't have limit, you probably should create the column with bigger datatype to support more than 2.1b value.
-
Emistry's post in disable bonus during woe was marked as the answer
Script: | bonus bBaseAtk,2600; if (!agitcheck() && !agitcheck2() && !agitcheck3()) bonus2 bHPDrainRate, 1000, 100; just change your item_db instead of adding another script function
-
Emistry's post in disable bonus during woe was marked as the answer
Script: | bonus bBaseAtk,2600; if (!agitcheck() && !agitcheck2() && !agitcheck3()) bonus2 bHPDrainRate, 1000, 100; just change your item_db instead of adding another script function