Jump to content

CyberDevil

Members
  • Posts

    242
  • Joined

  • Last visited

Everything posted by CyberDevil

  1. Hi @Ninja, I followed your instructions as if it were a bible and even if from the side of VM#1 I do not have any kind of problem or error, in the server side VM#2 I have an error that I can not understand and solve. Can you help me please? This is part of the log that appears in VM console # 2 after rAthena starts: (NOTE: the data in purple color are masked for privacy and security, I have used the correct data)
  2. Hi @Ninja, I have put into practice what you have written and it seems that it works... I'm still not 100% sure because I have to wait for the weekly maintenance to do other tests and to understand why when I change the settings of "localhost" from the file configuration of MySQL (my.conf) from 127.0.0.1 to the public IP, I get into the connection error of the site (Apache2) and some other connection problem between rAthena and MySQL... certainly after this setting I would have to restart the whole server and config some other files but for now I can't do it because I have users who play there and then I have to wait for the weekly maintenance to do it, but I'll update as soon as I finish, even if I'm sure everything will work. I ask only a further suggestion and advice, I would like the name of the "Test Server" appear in the window list that appears after logging in with userID and password and not before this... what is the file that I have to go to change to have it in this list? For now I have only managed to make it appear before login with the classic modification to the file "clientinfo.xml", but I would like users to select it after logging in. Thank you so much for the excellent suggestions and help
  3. Hello, I really appreciate your help and I am in no hurry ... I can wait for you to have more free time to try (also because we are in summer and free time is now necessary for more !!!). Unfortunately I can not help you because I'm not a good coder but I'll wait confidently. Thank you and good day. ?
  4. Hi guys, I would need help and advice to be able to configure 2 different servers with different IPs that are in 2 different countries, but have only one login for the accounts, in order to have a live server and a test server after normal login (ID and psw). I have already tried successfully the configuration of the file "clientinfo.xml" with these 2 servers/IPs, but the problem with this configuration is that you need to create the login data for each one of the 2 servers... the ideal configuration would be like this: 1 login -> after login the users can select: -> "SERVER 1 LIVE" -> or "SERVER 2 TEST" The problem as mentioned above is that the 2 servers are in 2 different countries and therefore have different public IPs. Can someone help me to understand how to configure the "SERVER 2 TEST" so that it takes the login data from the "SERVER 1 LIVE"? Or any other configuration for my case...
  5. I join your request of which I had already opened a topic without success to be able to set the half-hours at WoE Controller:
  6. This is the official @Euphy's WOE Controller: https://github.com/rathena/rathena/blob/master/npc/custom/woe_controller.txt It is really a good script but I wanted to ask you if someone can help me to modify it in order to setup sessions that start/end at the 30th minute of every hour, for example a session that starts at 21:30 and ends at 22:30 pm and not only 21:00~22:00 like now. Can anybody help me? ? //===== rAthena Script ======================================= //= Euphy's WOE Controller //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.5 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A controller for War of Emperium designed for //= simplicity and ease of use. //= Many concepts taken from ToastOfDoom's script, //= and "rewards" function originally by Goddameit. //===== Additional Comments: ================================= //= Be sure to disable the default agit controllers! //== npc\guild\agit_controller.txt //== npc\guild2\agit_start_se.txt //============================================================ // Information NPC //============================================================ prontera,149,193,4 script WOE Information 835,{ doevent "WOE_CONTROL::OnMenu"; end; OnAgitStart: while(agitcheck()) { specialeffect EF_BEGINSPELL6; sleep 425; } end; } // Script Core //============================================================ - script WOE_CONTROL -1,{ function Disp_Owner; function Add_Zero; OnInit: // ----------------------------------------------------------- // Configuration settings. // ----------------------------------------------------------- set .CastleWarp,0; // 1: Always enable all castle warps. | 0: Warp only to active castles. set .AutoKick,1; // Automatically kick players from inactive castles during WOE? (1:yes / 0:no) set .NoOwner,0; // Automatically kick players from unconquered castles outside of WOE? (1:yes / 0:no) set .ExitWarp,0; // Warp all players from castles when WOE ends? (1:yes / 0:no) set .GMAccess,99; // GM level required to access Session Manager. // ----------------------------------------------------------- // Reward options. // ----------------------------------------------------------- // [1] Enable rewards. // [2] Mail all rewards. // - If not set, players receive items in their inventory. // - Only ONE item can be sent via mail, plus Zeny. // - Note that offline players do NOT receive rewards. // [4] Only reward Guild Masters. // - If not set, all guild members are rewarded. // - If mailing is enabled (option 2), offline Guild Masters WILL receive rewards. // [8] Duplicate IP check. // - Members in a guild with the same IP address are not rewarded. // - If Guild Masters is enabled (option 4), this feature is not used. // ----------------------------------------------------------- // Combine values as needed (e.g. 1|8 = 1+8 = 9). set .Options, 1|8; // Rewards per castle. // -- when given directly: <itemID>,<amount>{,<itemID>,<amount>,...} // -- via mail (option 2): <itemID>,<amount>,<Zeny> setarray .Reward[0],14001,1; // ----------------------------------------------------------- // Constants (leave this section alone). // ----------------------------------------------------------- setarray .Castles$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; setarray .EndLabel$[0],"ar01","ar02","ar03","ar04","ar05","sc01","sc02","sc03","sc04","sc05"; setarray .Days$[0],"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"; setarray .Regions$[0],"Prontera","Payon","Geffen","Aldebaran","Arunafeltz","Schwaltzvalt"; setarray .Map$[0],"prt_gld","pay_gld","gef_fild13","alde_gld","aru_gld","sch_gld"; setarray .MapX[0],134,240,153,111,208,121,295,317,140,204,214,308,143,193,305,48, 95,142,239,264,158,83, 68,299,292,293,288, 97,137, 71; setarray .MapY[0], 65,128,137,240,240,233,116,293,160,266, 75,240,240,278, 87,83,249, 85,242, 90,272,47,155,345,107,100,252,196, 90,315; // ----------------------------------------------------------- set .Size, getarraysize($WOE_CONTROL); if (.AutoKick || .NoOwner) for(set .@i,0; .@i<30; set .@i,.@i+1) { setmapflag .Castles$[.@i], mf_loadevent; setd "."+.Castles$[.@i], .@i; } if (!agitcheck() && !agitcheck2()) sleep 4000; set .Init,1; OnMinute00: freeloop(1); if (agitcheck() || agitcheck2()) { for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(DT_DAYOFWEEK) == $WOE_CONTROL[.@i] && gettime(DT_HOUR) == $WOE_CONTROL[.@i+2]) { OnWOEEnd: announce "The War Of Emperium is over!",bc_all|bc_woe; AgitEnd; AgitEnd2; sleep 1000; for(set .@j,0; .@j<30; set .@j,.@j+1) { if (.Active[0]&(1<<.@j)) Disp_Owner(.Castles$[.@j],1); if (.ExitWarp) maprespawnguildid .Castles$[.@j],0,3; } if ((.Options&1) && .Active[0] && .ForceEnd != 2) callsub OnReward, .Active[0]; deletearray .Active[0],2; if (.ForceEnd) { set .ForceEnd,0; end; } break; } } if ((!agitcheck() && !agitcheck2()) || .Init) { if (!agitcheck() && !agitcheck2()) set .Init,0; for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(DT_DAYOFWEEK) == $WOE_CONTROL[.@i] && gettime(DT_HOUR) >= $WOE_CONTROL[.@i+1] && gettime(DT_HOUR) < $WOE_CONTROL[.@i+2]) { deletearray .Active[0],2; set .Active[0], $WOE_CONTROL[.@i+3]; if (.Init) { AgitEnd; AgitEnd2; } else announce "The War Of Emperium has begun!",bc_all|bc_woe; sleep 1000; AgitStart; AgitStart2; for(set .@j,0; .@j<30; set .@j,.@j+1) { if (.Active[0]&(1<<.@j)) { if (!.Init) Disp_Owner(.Castles$[.@j],0); set .Active[1], .Active[1] | (1<<((.@j/5)+1)); } else { if (.@j<20) { donpcevent "Agit#"+.Castles$[.@j]+"::OnAgitEnd"; killmonster .Castles$[.@j], "Agit#"+.Castles$[.@j]+"::OnAgitBreak"; } else { donpcevent "Manager#"+.Castles$[.@j]+"::OnAgitEnd2"; killmonster .Castles$[.@j], "Steward#"+.EndLabel$[.@j-20]+"::OnStartArena"; } } } break; } } set .Init,0; end; function Disp_Owner { set .@o, getcastledata(getarg(0),1); if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildname(.@o)+"] guild.",bc_all|bc_woe; else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe; return; } function Add_Zero { return ((getarg(0)<10)?"0":"")+getarg(0)+(getarg(1,0)?".":":")+"00"; } OnReward: set .@sql$, ((.Options&4)?"position = 0":"online = 1"); if (.Options&2) set .@str$,gettimestr("%B %d, %Y",21); freeloop(1); for(set .@i,0; .@i<30; set .@i,.@i+1) if (getarg(0)&(1<<.@i)) { set .@gid, getcastledata(.Castles$[.@i],1); if (!.@gid) continue; set .@size, query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@gid+"' AND "+.@sql$,.@aid,.@cid); for(set .@j,0; .@j<.@size; set .@j,.@j+1) { if ((.Options&8) && !(.Options&4)) { set .@ip$, replacestr(getcharip(.@aid[.@j]),".","a"); if (getd(".@ip_"+.@i+"_"+.@ip$)) continue; setd ".@ip_"+.@i+"_"+.@ip$,1; } if (.Options&2) { query_sql("INSERT INTO `mail` (send_name,dest_id,title,message,nameid,amount,identify,zeny,time) VALUES ("+ "'no-reply',"+.@cid[.@j]+",'** Siege Reward: "+getcastlename(.Castles$[.@i])+" **',"+ "'Brave one,% % Congratulations!% Your guild has successfully occupied% territory in the War of Emperium on% "+.@str$+".% % % % % [ Your reward is attached. ]',"+ .Reward[0]+","+.Reward[1]+",0,"+.Reward[2]+",UNIX_TIMESTAMP(NOW()))"); if (!getd(".@str_"+.@cid[.@j]) && isloggedin(.@aid[.@j],.@cid[.@j])) { setd ".@str_"+.@cid[.@j],1; message rid2name(.@aid[.@j]),"You've got mail! Please re-login to update your mailing list."; } } else if (isloggedin(.@aid[.@j])) { for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2) getitem .Reward[.@k], .Reward[.@k+1], .@aid[.@j]; message rid2name(.@aid[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+"."; } } } if (.Options&2) query_sql("UPDATE `mail` SET message = REPLACE(message,'%',CHAR(13)) WHERE send_name = 'no-reply'"); return; OnPCLoadMapEvent: if (!compare(strcharinfo(3),"g_cas")) end; if (((.AutoKick && .Active[0]) || (.NoOwner && !getcastledata(strcharinfo(3),1))) && !(.Active[0]&(1<<getd("."+strcharinfo(3))))) { if (getcharid(2) && getcastledata(strcharinfo(3),1) == getcharid(2)) end; sleep2 1000; message strcharinfo(0), getcastlename(strcharinfo(3))+" is currently inactive."; sleep2 5000; if (compare(strcharinfo(3),"g_cas")) warp "SavePoint",0,0; } end; OnMenu: while(1) { mes "[WOE Information]"; if (agitcheck() || agitcheck2()) { if (.Active[0]) { for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(DT_DAYOFWEEK) == $WOE_CONTROL[.@i] && gettime(DT_HOUR) >= $WOE_CONTROL[.@i+1] && gettime(DT_HOUR) < $WOE_CONTROL[.@i+2]) { set .@i, $WOE_CONTROL[.@i+2]; break; } mes "The War of Emperium is ^0055FFactive^000000 until ^FF0000"+Add_Zero(.@i)+"^000000 in the following regions:"; mes " "; for(set .@i,0; .@i<6; set .@i,.@i+1) if (.Active[1]&(1<<(.@i+1))) mes " > ^777777"+.Regions$[.@i]+"^000000"; } else mes "The War of Emperium is ^0055FFactive^000000."; } else { for(set .@i,0; .@i<.Size; set .@i,.@i+4) if ((gettime(DT_DAYOFWEEK) == $WOE_CONTROL[.@i] && gettime(DT_HOUR) <= $WOE_CONTROL[.@i+1]) || gettime(DT_DAYOFWEEK) < $WOE_CONTROL[.@i]) { setarray .@time[0],$WOE_CONTROL[.@i],$WOE_CONTROL[.@i+1]; break; } if (!getarraysize(.@time)) setarray .@time[0],$WOE_CONTROL[0],$WOE_CONTROL[1]; mes "The War of Emperium is ^777777inactive^000000."; if (.Size) { mes " "; mes "The next session will begin"; mes "on ^0055FF"+.Days$[.@time[0]]+"^000000 at "+Add_Zero(.@time[1])+"^000000."; } } next; switch(select(""+((.CastleWarp || .Active[1])?" ~ Warp to castles...":"")+": ~ Check schedule...: ~ View castle owners...:"+((getgmlevel()<.GMAccess || !getgmlevel())?"":" ~ Manage sessions...")+": ~ ^777777Cancel^000000")) { case 1: if (.CastleWarp) set .@clr$,"^0055FF"; set .@menu$,""; for(set .@i,0; .@i<6; set .@i,.@i+1) { if (.CastleWarp || .Active[1]&(1<<(.@i+1))) set .@menu$, .@menu$+" ~ "+((.Active[1]&(1<<(.@i+1)))?.@clr$:"^777777")+.Regions$[.@i]+" Castles^000000"; set .@menu$, .@menu$+":"; } set .@i, select(.@menu$)-1; set .@menu$,""; for(set .@j,.@i*5; .@j<(.@i*5)+5; set .@j,.@j+1) { if (.CastleWarp || .Active[0]&(1<<.@j)) set .@menu$, .@menu$+" ~ "+((.Active[0]&(1<<.@j))?.@clr$:"^777777")+getcastlename(.Castles$[.@j])+"^000000"; set .@menu$, .@menu$+":"; } set .@j, select(.@menu$)-1; warp .Map$[.@i],.MapX[(.@i*5)+.@j],.MapY[(.@i*5)+.@j]; close; case 2: mes "[Schedule]"; if (.Size) { freeloop(1); for(set .@i,0; .@i<.Size; set .@i,.@i+4) { mes "> ^FF0000"+.Days$[$WOE_CONTROL[.@i]]+" ("+Add_Zero($WOE_CONTROL[.@i+1])+"-"+Add_Zero($WOE_CONTROL[.@i+2])+")^000000"; for(set .@j,0; .@j<30; set .@j,.@j+1) if ($WOE_CONTROL[.@i+3]&(1<<.@j)) mes " ~ "+getcastlename(.Castles$[.@j])+" ^777777("+.Castles$[.@j]+")^000000"; if (.@i+4 < .Size) mes " "; } freeloop(0); } else mes "No times are configured."; next; break; case 3: mes "[Castle Ownership]"; for(set .@i,0; .@i<6; set .@i,.@i+1) { set .@k, .@i*5; mes "> ^FF0000"+.Regions$[.@i]+"^000000"; for(set .@j,.@k; .@j<(.@k+5); set .@j,.@j+1) { set .@t, getcastledata(.Castles$[.@j],1); mes " ~ "+getcastlename(.Castles$[.@j])+": "+((.@t)?"^0055FF"+getguildname(.@t):"^777777unoccupied")+"^000000"; } if (.@i < 5) mes " "; } next; break; case 4: while(1) { mes "[Session Manager]"; mes "There are ^0055FF"+(.Size/4)+" session(s)^000000 configured."; mes "What would you like to do?"; next; switch(select(" ~ Add a session...: ~ Delete a session...: ~ Reload settings...:"+((agitcheck() || agitcheck2())?" ~ End WOE session...":"")+": ~ ^777777Go back^000000")) { case 1: mes "[New Session]"; if (.Size > 127) { mes "You have already reached the maximum of 32 sessions."; next; break; } mes "Select a day."; next; set .@Day, select(" ~ "+implode(.Days$,": ~ "))-1; mes "[New Session]"; mes "Select a start time for ^0055FF"+.Days$[.@Day]+"^000000."; next; set .@menu$,""; for(set .@i,0; .@i<23; set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":"; set .@Start, select(.@menu$)-1; mes "[New Session]"; mes "Select an end time for ^0055FF"+.Days$[.@Day]+"^000000."; next; set .@menu$,""; for(set .@i,.@Start+1; .@i<24; set.@i,.@i+1) set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":"; set .@End, select(.@menu$)+.@Start; for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (.@Day == $WOE_CONTROL[.@i] && ((.@Start >= $WOE_CONTROL[.@i+1] && .@Start < $WOE_CONTROL[.@i+2]) || (.@End > $WOE_CONTROL[.@i+1] && .@End <= $WOE_CONTROL[.@i+2]) || (.@Start <= $WOE_CONTROL[.@i+1] && .@End >= $WOE_CONTROL[.@i+2]))) { mes "[New Session]"; mes "The chosen times overlap with an existing session."; next; set .@d,1; break; } if (.@d) { set .@d,0; break; } set .@Castle,0; while(1) { mes "[New Session]"; mes "^0055FF"+.Days$[.@Day]+" ("+Add_Zero(.@Start)+"-"+Add_Zero(.@End)+")^000000"; mes " > Castles:"; if (!.@Castle) mes " ~ ^777777(none selected)^000000"; else for(set .@i,0; .@i<30; set .@i,.@i+1) if (.@Castle&(1<<.@i)) mes " ~ "+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")"; next; set .@menu$,((.@Castle)?" ~ ^FF0000Finished...^000000":"")+":"; for(set .@i,0; .@i<30; set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+((.@Castle&(1<<.@i))?"^0055FF":"")+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")^000000:"; set .@i, select(.@menu$)-1; if (.@i) set .@Castle, .@Castle^(1<<(.@i-1)); else { mes "[New Session]"; mes "Are you sure?"; next; switch(select(" ~ ^0055FFAdd session...^000000: ~ Continue selecting castles...: ~ ^777777Cancel^000000")) { case 1: for(set .@i,0; .@i<.Size; set .@i,.@i+4) if ((.@Day == $WOE_CONTROL[.@i] && .@End <= $WOE_CONTROL[.@i+1]) || .@Day < $WOE_CONTROL[.@i]) { set .@d,1; break; } if (!.@d) { set .@d,1; set .@i,.Size; } copyarray $WOE_CONTROL[.@i+4], $WOE_CONTROL[.@i], .Size-.@i; setarray $WOE_CONTROL[.@i], .@Day, .@Start, .@End, .@Castle; set .Size, getarraysize($WOE_CONTROL); case 3: mes "[New Session]"; mes ((.@d)?"Session added.":"cancelled."); next; set .@d,1; case 2: break; } if (.@d) { set .@d,0; break; } } } break; case 2: mes "[Remove Session]"; if (!.Size) { mes "There are no sessions configured."; next; break; } mes "Select a session to remove."; next; set .@menu$,""; for(set .@i,0; .@i<.Size; set .@i,.@i+4) set .@menu$, .@menu$+" ~ "+.Days$[$WOE_CONTROL[.@i]]+" ("+Add_Zero($WOE_CONTROL[.@i+1],1)+"-"+Add_Zero($WOE_CONTROL[.@i+2],1)+"):"; set .@menu$, .@menu$+" ~ ^777777Cancel^000000"; set .@i, select(.@menu$)-1; if (.@i == (.Size/4)) break; mes "[Remove Session]"; mes "Delete ^0055FF"+.Days$[$WOE_CONTROL[.@i*4]]+"'s^000000 session?"; mes "This action cannot be undone."; next; set .@j, select(" ~ ^FF0000Delete session...^000000: ~ ^777777Cancel^000000"); mes "[Remove Session]"; if (.@j == 2) mes "cancelled."; else { deletearray $WOE_CONTROL[.@i*4],4; set .Size, getarraysize($WOE_CONTROL); mes "Session deleted."; } next; break; case 3: mes "[Reload Settings]"; mes "This will trigger all events related to new session configurations, if any."; if (agitcheck() || agitcheck2()) { mes " "; mes "Be aware that this will disrupt the current WOE session."; } next; set .@i, select(" ~ ^0055FFReload settings...^000000: ~ ^777777Cancel^000000"); mes "[Reload Settings]"; if (.@i == 2) mes "cancelled."; else { set .Init,1; donpcevent "WOE_CONTROL::OnMinute00"; mes "Variables have been re-initialized."; } next; break; case 4: mes "[Force Agit End]"; if (!agitcheck() && !agitcheck2()) { mes "WOE has already ended."; next; break; } mes "This command will safely execute all AgitEnd events."; mes " "; mes "Kill the current WOE session?"; next; set .@i, select(" ~ ^FF0000End session...^000000:"+((.Options&1)?" ~ ^FF0000End session without rewards...^000000":"")+": ~ ^777777Cancel^000000"); mes "[Force Agit End]"; if (.@i == 3) mes "cancelled."; else { set .ForceEnd, .@i; donpcevent "WOE_CONTROL::OnWOEEnd"; mes "WOE session terminated."; } next; break; case 5: set .@d,1; break; } if (.@d) { set .@d,0; break; } } break; case 5: close; } } }
  7. @Stolao thank you for answer, I have correct this on my server... for this other question can you tell me something?
  8. @wlauton thanks for sharing... can you also post the "/data/items/images/" folder with all the updated images of the client's "collection" folder?
  9. I'm looking for an addons that can create a list with the names of the characters banned or muted with any reasons and time ban/mute... exactly like this: https://www.limitro.com/banlist/ I think that the administrators of LimitRO have made it for their use because unfortunately I do not find any information in this forum. Do any of you know if there is an already ready addon? ?
  10. Tnx @Haruka Mayumi, it works perfectly... and it's much better than before, with some client-side editing it's also perfect for other scripts! ?
  11. @Cydh forgive me, I'm stupid... I was convinced that debug mode was already active because usually I leave it active! The error is this and actually I do not have the file "Item.php" in my "/lib/Flux/" directory if it is this (like original directory: https://github.com/rathena/FluxCP/tree/master/lib/Flux) So I think it's a mistake common to all those who have a recent copy of FluxCP... this file does not exist!
  12. @Haruka Mayumi I'm sorry, I did some tests but I can not do it (I'm not a good coder), any attempt I made, I miserably failed with various errors! ? Can you see if it is applicable to this script? //===== rAthena Script ======================================= //= Hunting Missions //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.4 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Random hunting missions. //= Rewards are based on quest difficulty. //= //= NOTE: Requires SQL mob database. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Small improvements and fixes. //= 1.2 Added party support and replaced blacklists with an //= SQL query, both thanks to AnnieRuru. //= 1.3 Re-added a blacklist adapted for the SQL query. //= 1.3a Added mission reset options. //= 1.3b Function updates. //= 1.4 Check for deleted characters, thanks to AnnieRuru. //= Syntax updates and style cleaning. //============================================================ prontera,155,192,3 script Hunting Missions 10192,{ cutin "162elena_01",2; function Chk; mes "[Hunting Missions]"; mes "Hello, " + strcharinfo(0) + "!"; if (!#Mission_Delay) { next; mes "[Hunting Missions]"; mes "I can't find any records..."; mes "You must be new here!"; emotion ET_HUK; next; callsub Mission_Info; emotion ET_GO; #Mission_Delay = 1; close2; cutin "162elena_01",255; end; } mes rand(2) ? "Working hard, as always..." : "Not slacking, I hope..."; mes "Is there anything I can help"; mes "you with?"; mes " "; mes "^777777~ You've completed " + callfunc("F_InsertPlural",Mission_Total,"mission",0,"^0055FF%d^777777 %s") + ". ~^000000"; next; switch(select( ((!Mission0) ? " ~ New Mission::" : ": ~ Mission Status: ~ Abandon Mission") + ": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000" )) { case 1: mes "[Hunting Missions]"; if (#Mission_Count) { mes "You've started a mission"; mes "on another character."; if (!@hm_char_del_check) { // check for deleted character query_sql("SELECT 1 FROM `char_reg_num` WHERE `key` = 'Mission0' AND `char_id` IN(SELECT `char_id` FROM `char` WHERE `account_id` = " + getcharid(3) + ")", .@i); if (!.@i) { next; mes "[Hunting Missions]"; mes "I can't seem to find any records"; mes "for that character, though..."; mes "One moment, please."; emotion ET_SCRATCH; #Mission_Count = 0; } @hm_char_del_check = 1; } close2; cutin "162elena_01",255; end; } if (#Mission_Delay > gettimetick(2) && .Delay) { mes "I'm afraid you'll have to wait " + callfunc("Time2Str",#Mission_Delay) + " before taking another mission."; close2; cutin "162elena_01",255; end; } mes "You must hunt:"; query_sql("SELECT ID FROM `" + .mob_db$ + "` WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 AND instr('"+.Blacklist$+"',ID) = 0 ORDER BY rand() LIMIT " + .Quests, .@mob); for (.@i = 0; .@i < .Quests; .@i++) { setd "Mission" + .@i, .@mob[.@i]; setd "Mission" + .@i +"_", 0; } #Mission_Count = rand(.Count[0], .Count[1]); callsub Mission_Status; next; mes "[Hunting Missions]"; mes "Report back when"; mes "you've finished."; mes "Good luck!"; close2; cutin "162elena_01",255; end; case 2: mes "[Hunting Missions]"; mes "Mission status:"; callsub Mission_Status; close2; cutin "162elena_01",255; end; case 3: mes "[Hunting Missions]"; mes "Do you really want to"; mes "abandon your mission?"; if (.Reset < 0 && .Delay) mes "Your delay time will not be reset."; else if (.Reset > 0) mes "It will cost " + callfunc("F_InsertComma",.Reset) + " Zeny."; next; switch(select(" ~ Abandon...: ~ ^777777Cancel^000000")) { case 1: if (.Reset > 0) { if (Zeny < .Reset) { mes "[Hunting Missions]"; mes "You don't have enough"; mes "Zeny to drop this mission."; emotion ET_SORRY; close2; cutin "162elena_01",255; end; } Zeny -= .Reset; emotion ET_MONEY; } mes "[Hunting Missions]"; mes "Alright, I've dropped"; mes "your current mission."; specialeffect2 EF_STORMKICK4; for (.@i = 0; .@i < .Quests; .@i++) { setd "Mission"+.@i, 0; setd "Mission"+.@i+"_", 0; } #Mission_Count = 0; if (.Reset < 0 && .Delay) #Mission_Delay = gettimetick(2) + (.Delay * 3600); close2; cutin "162elena_01",255; end; case 2: mes "[Hunting Missions]"; mes "I knew you were kidding!"; mes "Keep up the good work."; emotion ET_SMILE; close2; cutin "162elena_01",255; end; } case 4: callsub Mission_Info; close2; cutin "162elena_01",255; end; case 5: mes "[Hunting Missions]"; mes "You have ^0055FF" + #Mission_Points + "^000000 Mission Points."; mes "Use them well!"; callshop "mission_shop",1; npcshopattach "mission_shop"; end; case 6: mes "[Hunting Missions]"; mes "The top hunters are:"; query_sql("SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `char_reg_num` WHERE `key` = 'Mission_Total' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 5", .@id, .@name$, .@val); for (.@i = 0; .@i < 5; .@i++) mes " [Rank " + (.@i+1) + "] " + ((.@name$[.@i] == "") ? "^777777none" : "^0055FF" + .@name$[.@i]+"^000000 : ^FF0000" + .@val[.@i] + " pt.") + "^000000"; close2; cutin "162elena_01",255; end; case 7: mes "[Hunting Missions]"; mes "Nothing? Okay..."; emotion ET_SCRATCH; close2; cutin "162elena_01",255; end; } end; Mission_Status: @f = 0; deletearray .@j[0], getarraysize(.@j); for (.@i = 0; .@i < .Quests; .@i++) { .@j[.@i] = getd("Mission" + .@i); .@j[.Quests] = .@j[.Quests] + strmobinfo(3,.@j[.@i]); .@j[.Quests+1] = .@j[.Quests+1] + (strmobinfo(6,.@j[.@i]) / (getbattleflag("base_exp_rate") / 100) * .Modifier[0]); .@j[.Quests+2] = .@j[.Quests+2] + (strmobinfo(7,.@j[.@i]) / (getbattleflag("job_exp_rate") / 100) * .Modifier[1]); mes " > "+Chk(getd("Mission"+.@i+"_"),#Mission_Count) + strmobinfo(1,.@j[.@i]) + " (" + getd("Mission"+.@i+"_") + "/" + #Mission_Count + ")^000000"; } // Reward formulas: .@Mission_Points = 3 + (.@j[.Quests] / .Quests / 6); .@Base_Exp = #Mission_Count * .@j[.Quests+1] / 5; .@Job_Exp = #Mission_Count * .@j[.Quests+2] / 5; .@Zeny = #Mission_Count * .Quests * .@j[.@i] * .Modifier[2]; next; mes "[Hunting Missions]"; mes "Mission rewards:"; mes " > Mission Points: ^0055FF" + .@Mission_Points + "^000000"; mes " > Base Experience: ^0055FF" + callfunc("F_InsertComma",.@Base_Exp) + "^000000"; mes " > Job Experience: ^0055FF" + callfunc("F_InsertComma",.@Job_Exp) + "^000000"; mes " > Zeny: ^0055FF" + callfunc("F_InsertComma",.@Zeny) + "^000000"; mes " > Special Prize: ^0055FFINFINITY Coin Pouch^000000"; if (@f) { @f = 0; return; } next; mes "[Hunting Missions]"; mes "Oh, you're done!"; mes "Good work."; mes "Here's your reward."; emotion ET_BEST; specialeffect2 EF_ANGEL; specialeffect2 EF_TRUESIGHT; #Mission_Points += .@Mission_Points; BaseExp += .@Base_Exp; JobExp += .@Job_Exp; Zeny += .@Zeny; getitem 9998,1; //INFINITY Coin Pouch for (.@i = 0; .@i < .Quests; .@i++) { setd "Mission" + .@i, 0; setd "Mission" + .@i+"_", 0; } #Mission_Count = 0; if (.Delay) #Mission_Delay = gettimetick(2) + (.Delay * 3600); Mission_Total++; if (Mission_Total == 1) query_sql("INSERT INTO `char_reg_num` (`char_id`,`key`,`index`,`value`) VALUES (" + getcharid(0) + ",'Mission_Total','0',1)"); else query_sql("UPDATE `char_reg_num` SET `value` = " + Mission_Total + " WHERE `char_id` = " + getcharid(0) + " AND `key` = 'Mission_Total'"); close2; cutin "162elena_01",255; end; Mission_Info: mes "[Hunting Missions]"; mes "If you so choose, I can assign"; mes "you a random hunting quest."; mes "Some are easier than others, but"; mes "the rewards increase with difficulty."; next; mes "[Hunting Missions]"; mes "Missions points are shared"; mes "amongst all your characters."; if (.Delay) mes "Delay time is, too."; mes "You can't take missions on"; mes "multiple characters at once."; next; mes "[Hunting Missions]"; mes "You can start a quest"; mes (.Delay ? "every " + ((.Delay == 1) ? "hour." : .Delay + " hours.") : "whenever you want."); mes "That's everything~"; return; function Chk { if (getarg(0) < getarg(1)) { @f = 1; return "^FF0000"; } else return "^00FF00"; } OnBuyItem: @cost = 0; for (.@i = 0; .@i < getarraysize(@bought_nameid); .@i++) for (.@j = 0; .@j < getarraysize(.Shop); .@j += 2) if (@bought_nameid[.@i] == .Shop[.@j]) { set @cost, @cost + (.Shop[.@j+1] * @bought_quantity[.@i]); break; } mes "[Hunting Missions]"; if (@cost > #Mission_Points) mes "You don't have enough Mission Points."; else { for (.@i = 0; .@i < getarraysize(@bought_nameid); .@i++) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; dispbottom "Purchased " + @bought_quantity[.@i] + "x " + getitemname(@bought_nameid[.@i]) + "."; } #Mission_Points -= @cost; mes "Deal completed."; emotion ET_MONEY; } @cost = 0; deletearray @bought_nameid[0], getarraysize(@bought_nameid); deletearray @bought_quantity[0], getarraysize(@bought_quantity); close2; cutin "162elena_01",255; end; OnNPCKillEvent: if (!getcharid(1) || !.Party) { if (!#Mission_Count || !Mission0) end; for (.@i = 0; .@i < .Quests; .@i++) { if (strmobinfo(1,killedrid) == strmobinfo(1,getd("Mission" + .@i))) { if (getd("Mission" + .@i + "_") < #Mission_Count) { dispbottom "[Hunting Mission] Killed " + (set(getd("Mission" + .@i + "_"),getd("Mission" + .@i + "_") + 1)) + " of " + #Mission_Count + " " + strmobinfo(1,killedrid) + "."; end; } } } } else if (.Party) { .@mob = killedrid; getmapxy(.@map1$,.@x1,.@y1,UNITTYPE_PC); getpartymember getcharid(1),1; getpartymember getcharid(1),2; for (.@i = 0; .@i < $@partymembercount; .@i++) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { set .@Mission_Count, getvar(#Mission_Count, $@partymembercid[.@i]); set .@Mission0, getvar(Mission0, $@partymembercid[.@i]); set .@HP, readparam(HP, $@partymembercid[.@i]); if (.@Mission_Count && .@Mission0 && .@HP > 0) { getmapxy(.@map2$,.@x2,.@y2,UNITTYPE_PC); if ((.@map1$ == .@map2$ || .Party == 1) && (distance(.@x1,.@y1,.@x2,.@y2) <= 30 || .Party < 3)) { for (.@j = 0; .@j < .Quests; .@j++) { .@my_mob_id = getvar( getd("Mission"+.@j),$@partymembercid[.@i] ); .@my_count = getvar( getd("Mission"+.@j+"_"), $@partymembercid[.@i] ); if (strmobinfo(1,.@mob) == strmobinfo(1,.@my_mob_id)) { if (.@my_count < .@Mission_Count) { setd "Mission"+.@j+"_", (.@my_count+1), $@partymembercid[.@i]; dispbottom "[Hunting Mission] Killed " + (.@my_count+1) + " of " + .@Mission_Count + " " + strmobinfo(1,.@mob) + ".", 0x777777, $@partymembercid[.@i]; break; } } } } } } } } end; OnInit: .Delay = 6; // Quest delay, in hours (0 to disable). .Quests = 3; // Number of subquests per mission (increases rewards). .Party = 3; // Party options: 0 (exclude party kills), 1 (include party kills), 2 (same map only), 3 (screen area only) .Reset = -1; // Reset options: -1 (abandoning mission sets delay time), 0 (no delay time), [Zeny] (cost to abandon mission, no delay time) setarray .Count[0], // Min and max monsters per subquest (increases rewards). 15,30; setarray .Modifier[0], // Multipliers for Base Exp, Job Exp, and Zeny rewards. ORIGINALE è /100 /100 60 getbattleflag("base_exp_rate")/50,getbattleflag("job_exp_rate")/50,2; .mob_db$ = // Table name of SQL mob database (checkre(0))?"mob_db_re":"mob_db"; setarray .Shop[0], // Reward items: <ID>,<point cost> (about 10~20 points per hunt). 7619,40,6225,40,12208,50,616,60,7620,60,6226,60,12264,70,6241,80,12214,100,6240,120,13610,160,16259,160,13611,240,16258,240,16395,320,16393,480,12103,500,12246,2000; .Blacklist$ = // Blacklisted mob IDs. "1038,1039,1046,1059,1062,1086,1087,1088,1089,1090,1091,1092,1093,1096,1108,1112,1115,1120,1147,1150,"+ "1157,1159,1183,1186,1190,1198,1200,1203,1204,1205,1212,1220,1221,1234,1235,1244,1245,1250,1251,1252,"+ "1259,1262,1268,1272,1283,1286,1287,1288,1289,1290,1293,1294,1296,1298,1299,1300,1301,1302,1303,1304,"+ "1305,1306,1307,1308,1309,1311,1312,1313,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,"+ "1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,"+ "1356,1357,1358,1359,1360,1361,1362,1363,1373,1388,1389,1395,1396,1397,1398,1399,1418,1447,1449,1456,"+ "1485,1486,1487,1492,1502,1515,1520,1529,1530,1542,1568,1576,1582,1583,1588,1591,1592,1593,1605,1607,"+ "1609,1610,1611,1612,1618,1623,1626,1630,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,"+ "1646,1647,1648,1649,1650,1651,1658,1674,1676,1677,1678,1679,1681,1685,1688,1689,1700,1703,1704,1705,"+ "1706,1707,1708,1709,1710,1711,1712,1719,1720,1731,1733,1734,1751,1754,1755,1756,1763,1764,1765,1766,"+ "1767,1768,1779,1783,1785,1791,1795,1796,1797,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,"+ "1810,1813,1814,1817,1825,1829,1831,1832,1833,1834,1835,1839,1840,1845,1846,1847,1848,1849,1850,1852,"+ "1853,1870,1871,1872,1873,1874,1876,1877,1879,1885,1889,1891,1894,1897,1899,1902,1903,1904,1905,1906,"+ "1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1929,"+ "1930,1931,1932,1933,1934,1935,1936,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1951,1952,1953,"+ "1954,1956,1957,1958,1959,1960,1961,1962,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,"+ "1976,1977,1978,1979,1980,1981,1983,1990,1991,2001,2010,2017,2018,2019,2022,2030,2031,2039,2040,2041,"+ "2052,2057,2067,2068,2079,2080,2087,2093,2097,2102,2106,2107,2135,2138,2139,2140,2141,2142,2143,2156,"+ "2157,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2174,2175,2176,2177,2178,2179,"+ "2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2196,2198,2202,2206,2208,"+ "2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2249,2251,2253,2255,2288,2317,2318,2319,2320,2321,2322,2323,2325,2326,2327,2328,2329,2332,2333,2335,2336,2337,2341,2342,2345,2346,2347,2348,2349,2350,2351,2362,2378,2408,2409,2410,2411,2413,2415,2416,2417,2419,2420,2421,2422,2423,2424,2425,2426,2427,2441,2442,2443,2444,2445,2446,2447,2448,2449,2473,2474,2475,2476,2482,2528,2529,2530,2532,2533,2534,2535,2540,2541,2542,2562,2563,2564,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,2691,2692,2693,2694,2695,2696,2697,2698,2699,2700,2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,2751,2752,2753,2754,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,2767,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,2780,2781,2784,2785,2786,2788,2789,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,2825,2826,2827,2828,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2849,2850,2851,2852,2853,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2907,2908,2909,2910,2911,2912,2913,2920,2921,2922,2923,2942,2959,2961,2987,2988,2992,2994,2996,2998,2999,3029,3038,3039,3040,3041,3073,3074,3091,3092,3096,3097,3100,3108,3109,3122,3123,3124,3175,3176,3177,3178,3179,3180,3181,3202,3203,3254,3450,3473,3474,3475,3484,3495,3503,3504,3505,3506,3508"; npcshopdelitem "mission_shop",512; for (.@i = 0; .@i < getarraysize(.Shop); .@i += 2) npcshopadditem "mission_shop", .Shop[.@i], .Shop[.@i+1]; end; } - shop mission_shop -1,512:-1
  13. Hi @Stolao, at line 1541 (ver. 2.5A) there is sword_1-1,216,208,4 script Emp_Break -1,{ but in the same map sword_1-1 there are 3 NPCs of Sura Job Quest: Example Link There could be problems with the "Emperium Event" or can we leave everything unchanged? Other questions... I have fixed these errors: ...changing E_OMG with ET_HUK and changing E_GG with ET_KIK... all are ok but I still have 2 problems: Both maps 1@zombie and maze are installed on my server and fully functional, but I can not trace the problem of this error. And then I have another warning that I can not solve: ...and it concerns this part of the script: //================================== //-- Event Shops //================================== prontera,164,168,3 itemshop Event Headgear Shop 877,33001,5381:50,5391:50,5462:50,5463:75,5596:75,5214:100,5380:100,5210:100,5226:100,5227:100,5228:100,5229:100,5230:100,5231:100,5232:100,5233:100,5234:100,5235:100,5236:100,5237:100,5283:100,5288:100,5293:100,5313:100,5314:100,5315:100,5324:100,5372:100,5376:100,5377:100,5378:100,5503:100,5505:100,5529:100,5286:125,5263:125,5098:125,5382:125,5238:175,5239:175,5240:175,5241:175,5242:175,5374:500 prontera,164,166,3 itemshop Event Rental Shop 877,33001,36502:7,35504:10,35505:10,35503:20 prontera,164,162,3 itemshop Event Shop 877,33001,12209:1,12211:2,604:3,7621:3,12299:5,12212:5,12311:5,12221:7,608:10,607:15,12208:15,14592:15,12210:15,12214:20,7776:20,35501:25,35502:25 prontera,164,160,3 itemshop Event Food Shop 877,33001,12041:10,12042:20,12043:30,12044:40,12045:50,12046:10,12047:20,12048:30,12049:40,12050:50,12051:10,12052:20,12053:30,12054:40,12055:50,12056:10,12057:20,12058:30,12059:40,12060:50,12061:10,12062:20,12063:30,12064:40,12065:50,12066:10,12067:20,12068:30,12069:40,12070:50 Can someone suggest me how to solve them? ?
  14. I have follow this commit by @Cydh to update my FluxCP with the new feature "Feeding Logdata" but when I go to http://mysite.com/logdata/feeding/ I recive "HTTP ERROR 500". I noticed that there are 2 errors in the file "config/feedingtypes.php" and in the file "modules/logdata/feeding.php" and that is the lack of the closing tag of php "?>", but also adding them to the above mentioned files I can not to make it work. Some idea?
  15. Hi @Aries, I have this problem with refine potions (I think with all players made items):
  16. Thanks for the answer... I had already read this but unfortunately it is not applicable to my case because I would like to change the currency only in this shop!
  17. Hi, I have version 1.4 of this fantastic @Euphy script and everything works perfectly... but I wanted to find a way to replace the zeny letter Z in the hunting missions shop script (see attached "little" screenshot) with any other letter that could identify the hunting mission points, for example a letter P. I am almost certain that it is not technically possible to do it, but does anyone know a way to do it? This is my script (with best and update blacklist I do, if you need it ) //===== rAthena Script ======================================= //= Hunting Missions //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.4 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Random hunting missions. //= Rewards are based on quest difficulty. //= //= NOTE: Requires SQL mob database. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Small improvements and fixes. //= 1.2 Added party support and replaced blacklists with an //= SQL query, both thanks to AnnieRuru. //= 1.3 Re-added a blacklist adapted for the SQL query. //= 1.3a Added mission reset options. //= 1.3b Function updates. //= 1.4 Check for deleted characters, thanks to AnnieRuru. //= Syntax updates and style cleaning. //============================================================ prontera,155,192,3 script Hunting Missions 10192,{ cutin "162elena_01",2; function Chk; mes "[Hunting Missions]"; mes "Hello, " + strcharinfo(0) + "!"; if (!#Mission_Delay) { next; mes "[Hunting Missions]"; mes "I can't find any records..."; mes "You must be new here!"; emotion ET_HUK; next; callsub Mission_Info; emotion ET_GO; #Mission_Delay = 1; close2; cutin "162elena_01",255; end; } mes rand(2) ? "Working hard, as always..." : "Not slacking, I hope..."; mes "Is there anything I can help"; mes "you with?"; mes " "; mes "^777777~ You've completed " + callfunc("F_InsertPlural",Mission_Total,"mission",0,"^0055FF%d^777777 %s") + ". ~^000000"; next; switch(select( ((!Mission0) ? " ~ New Mission::" : ": ~ Mission Status: ~ Abandon Mission") + ": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000" )) { case 1: mes "[Hunting Missions]"; if (#Mission_Count) { mes "You've started a mission"; mes "on another character."; if (!@hm_char_del_check) { // check for deleted character query_sql("SELECT 1 FROM `char_reg_num` WHERE `key` = 'Mission0' AND `char_id` IN(SELECT `char_id` FROM `char` WHERE `account_id` = " + getcharid(3) + ")", .@i); if (!.@i) { next; mes "[Hunting Missions]"; mes "I can't seem to find any records"; mes "for that character, though..."; mes "One moment, please."; emotion ET_SCRATCH; #Mission_Count = 0; } @hm_char_del_check = 1; } close2; cutin "162elena_01",255; end; } if (#Mission_Delay > gettimetick(2) && .Delay) { mes "I'm afraid you'll have to wait " + callfunc("Time2Str",#Mission_Delay) + " before taking another mission."; close2; cutin "162elena_01",255; end; } mes "You must hunt:"; query_sql("SELECT ID FROM `" + .mob_db$ + "` WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 AND instr('"+.Blacklist$+"',ID) = 0 ORDER BY rand() LIMIT " + .Quests, .@mob); for (.@i = 0; .@i < .Quests; .@i++) { setd "Mission" + .@i, .@mob[.@i]; setd "Mission" + .@i +"_", 0; } #Mission_Count = rand(.Count[0], .Count[1]); callsub Mission_Status; next; mes "[Hunting Missions]"; mes "Report back when"; mes "you've finished."; mes "Good luck!"; close2; cutin "162elena_01",255; end; case 2: mes "[Hunting Missions]"; mes "Mission status:"; callsub Mission_Status; close2; cutin "162elena_01",255; end; case 3: mes "[Hunting Missions]"; mes "Do you really want to"; mes "abandon your mission?"; if (.Reset < 0 && .Delay) mes "Your delay time will not be reset."; else if (.Reset > 0) mes "It will cost " + callfunc("F_InsertComma",.Reset) + " Zeny."; next; switch(select(" ~ Abandon...: ~ ^777777Cancel^000000")) { case 1: if (.Reset > 0) { if (Zeny < .Reset) { mes "[Hunting Missions]"; mes "You don't have enough"; mes "Zeny to drop this mission."; emotion ET_SORRY; close2; cutin "162elena_01",255; end; } Zeny -= .Reset; emotion ET_MONEY; } mes "[Hunting Missions]"; mes "Alright, I've dropped"; mes "your current mission."; specialeffect2 EF_STORMKICK4; for (.@i = 0; .@i < .Quests; .@i++) { setd "Mission"+.@i, 0; setd "Mission"+.@i+"_", 0; } #Mission_Count = 0; if (.Reset < 0 && .Delay) #Mission_Delay = gettimetick(2) + (.Delay * 3600); close2; cutin "162elena_01",255; end; case 2: mes "[Hunting Missions]"; mes "I knew you were kidding!"; mes "Keep up the good work."; emotion ET_SMILE; close2; cutin "162elena_01",255; end; } case 4: callsub Mission_Info; close2; cutin "162elena_01",255; end; case 5: mes "[Hunting Missions]"; mes "You have ^0055FF" + #Mission_Points + "^000000 Mission Points."; mes "Use them well!"; callshop "mission_shop",1; npcshopattach "mission_shop"; end; case 6: mes "[Hunting Missions]"; mes "The top hunters are:"; query_sql("SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `char_reg_num` WHERE `key` = 'Mission_Total' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 5", .@id, .@name$, .@val); for (.@i = 0; .@i < 5; .@i++) mes " [Rank " + (.@i+1) + "] " + ((.@name$[.@i] == "") ? "^777777none" : "^0055FF" + .@name$[.@i]+"^000000 : ^FF0000" + .@val[.@i] + " pt.") + "^000000"; close2; cutin "162elena_01",255; end; case 7: mes "[Hunting Missions]"; mes "Nothing? Okay..."; emotion ET_SCRATCH; close2; cutin "162elena_01",255; end; } end; Mission_Status: @f = 0; deletearray .@j[0], getarraysize(.@j); for (.@i = 0; .@i < .Quests; .@i++) { .@j[.@i] = getd("Mission" + .@i); .@j[.Quests] = .@j[.Quests] + strmobinfo(3,.@j[.@i]); .@j[.Quests+1] = .@j[.Quests+1] + (strmobinfo(6,.@j[.@i]) / (getbattleflag("base_exp_rate") / 100) * .Modifier[0]); .@j[.Quests+2] = .@j[.Quests+2] + (strmobinfo(7,.@j[.@i]) / (getbattleflag("job_exp_rate") / 100) * .Modifier[1]); mes " > "+Chk(getd("Mission"+.@i+"_"),#Mission_Count) + strmobinfo(1,.@j[.@i]) + " (" + getd("Mission"+.@i+"_") + "/" + #Mission_Count + ")^000000"; } // Reward formulas: .@Mission_Points = 3 + (.@j[.Quests] / .Quests / 6); .@Base_Exp = #Mission_Count * .@j[.Quests+1] / 5; .@Job_Exp = #Mission_Count * .@j[.Quests+2] / 5; .@Zeny = #Mission_Count * .Quests * .@j[.@i] * .Modifier[2]; next; mes "[Hunting Missions]"; mes "Mission rewards:"; mes " > Mission Points: ^0055FF" + .@Mission_Points + "^000000"; mes " > Base Experience: ^0055FF" + callfunc("F_InsertComma",.@Base_Exp) + "^000000"; mes " > Job Experience: ^0055FF" + callfunc("F_InsertComma",.@Job_Exp) + "^000000"; mes " > Zeny: ^0055FF" + callfunc("F_InsertComma",.@Zeny) + "^000000"; mes " > Special Prize: ^0055FFINFINITY Coin Pouch^000000"; if (@f) { @f = 0; return; } next; mes "[Hunting Missions]"; mes "Oh, you're done!"; mes "Good work."; mes "Here's your reward."; emotion ET_BEST; specialeffect2 EF_ANGEL; specialeffect2 EF_TRUESIGHT; #Mission_Points += .@Mission_Points; BaseExp += .@Base_Exp; JobExp += .@Job_Exp; Zeny += .@Zeny; getitem 9998,1; //INFINITY Coin Pouch for (.@i = 0; .@i < .Quests; .@i++) { setd "Mission" + .@i, 0; setd "Mission" + .@i+"_", 0; } #Mission_Count = 0; if (.Delay) #Mission_Delay = gettimetick(2) + (.Delay * 3600); Mission_Total++; if (Mission_Total == 1) query_sql("INSERT INTO `char_reg_num` (`char_id`,`key`,`index`,`value`) VALUES (" + getcharid(0) + ",'Mission_Total','0',1)"); else query_sql("UPDATE `char_reg_num` SET `value` = " + Mission_Total + " WHERE `char_id` = " + getcharid(0) + " AND `key` = 'Mission_Total'"); close2; cutin "162elena_01",255; end; Mission_Info: mes "[Hunting Missions]"; mes "If you so choose, I can assign"; mes "you a random hunting quest."; mes "Some are easier than others, but"; mes "the rewards increase with difficulty."; next; mes "[Hunting Missions]"; mes "Missions points are shared"; mes "amongst all your characters."; if (.Delay) mes "Delay time is, too."; mes "You can't take missions on"; mes "multiple characters at once."; next; mes "[Hunting Missions]"; mes "You can start a quest"; mes (.Delay ? "every " + ((.Delay == 1) ? "hour." : .Delay + " hours.") : "whenever you want."); mes "That's everything~"; return; function Chk { if (getarg(0) < getarg(1)) { @f = 1; return "^FF0000"; } else return "^00FF00"; } OnBuyItem: @cost = 0; for (.@i = 0; .@i < getarraysize(@bought_nameid); .@i++) for (.@j = 0; .@j < getarraysize(.Shop); .@j += 2) if (@bought_nameid[.@i] == .Shop[.@j]) { set @cost, @cost + (.Shop[.@j+1] * @bought_quantity[.@i]); break; } mes "[Hunting Missions]"; if (@cost > #Mission_Points) mes "You don't have enough Mission Points."; else { for (.@i = 0; .@i < getarraysize(@bought_nameid); .@i++) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; dispbottom "Purchased " + @bought_quantity[.@i] + "x " + getitemname(@bought_nameid[.@i]) + "."; } #Mission_Points -= @cost; mes "Deal completed."; emotion ET_MONEY; } @cost = 0; deletearray @bought_nameid[0], getarraysize(@bought_nameid); deletearray @bought_quantity[0], getarraysize(@bought_quantity); close2; cutin "162elena_01",255; end; OnNPCKillEvent: if (!getcharid(1) || !.Party) { if (!#Mission_Count || !Mission0) end; for (.@i = 0; .@i < .Quests; .@i++) { if (strmobinfo(1,killedrid) == strmobinfo(1,getd("Mission" + .@i))) { if (getd("Mission" + .@i + "_") < #Mission_Count) { dispbottom "[Hunting Mission] Killed " + (set(getd("Mission" + .@i + "_"),getd("Mission" + .@i + "_") + 1)) + " of " + #Mission_Count + " " + strmobinfo(1,killedrid) + "."; end; } } } } else if (.Party) { .@mob = killedrid; getmapxy(.@map1$,.@x1,.@y1,UNITTYPE_PC); getpartymember getcharid(1),1; getpartymember getcharid(1),2; for (.@i = 0; .@i < $@partymembercount; .@i++) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { set .@Mission_Count, getvar(#Mission_Count, $@partymembercid[.@i]); set .@Mission0, getvar(Mission0, $@partymembercid[.@i]); set .@HP, readparam(HP, $@partymembercid[.@i]); if (.@Mission_Count && .@Mission0 && .@HP > 0) { getmapxy(.@map2$,.@x2,.@y2,UNITTYPE_PC); if ((.@map1$ == .@map2$ || .Party == 1) && (distance(.@x1,.@y1,.@x2,.@y2) <= 30 || .Party < 3)) { for (.@j = 0; .@j < .Quests; .@j++) { .@my_mob_id = getvar( getd("Mission"+.@j),$@partymembercid[.@i] ); .@my_count = getvar( getd("Mission"+.@j+"_"), $@partymembercid[.@i] ); if (strmobinfo(1,.@mob) == strmobinfo(1,.@my_mob_id)) { if (.@my_count < .@Mission_Count) { setd "Mission"+.@j+"_", (.@my_count+1), $@partymembercid[.@i]; dispbottom "[Hunting Mission] Killed " + (.@my_count+1) + " of " + .@Mission_Count + " " + strmobinfo(1,.@mob) + ".", 0x777777, $@partymembercid[.@i]; break; } } } } } } } } end; OnInit: .Delay = 6; // Quest delay, in hours (0 to disable). .Quests = 3; // Number of subquests per mission (increases rewards). .Party = 3; // Party options: 0 (exclude party kills), 1 (include party kills), 2 (same map only), 3 (screen area only) .Reset = -1; // Reset options: -1 (abandoning mission sets delay time), 0 (no delay time), [Zeny] (cost to abandon mission, no delay time) setarray .Count[0], // Min and max monsters per subquest (increases rewards). 15,30; setarray .Modifier[0], // Multipliers for Base Exp, Job Exp, and Zeny rewards. ORIGINALE è /100 /100 60 getbattleflag("base_exp_rate")/50,getbattleflag("job_exp_rate")/50,2; .mob_db$ = // Table name of SQL mob database (checkre(0))?"mob_db_re":"mob_db"; setarray .Shop[0], // Reward items: <ID>,<point cost> (about 10~20 points per hunt). 7619,40,6225,40,12208,50,616,60,7620,60,6226,60,12264,70,6241,80,12214,100,6240,120,13610,160,16259,160,13611,240,16258,240,16395,320,16393,480,12103,500,12246,2000; .Blacklist$ = // Blacklisted mob IDs. "1038,1039,1046,1059,1062,1086,1087,1088,1089,1090,1091,1092,1093,1096,1108,1112,1115,1120,1147,1150,"+ "1157,1159,1183,1186,1190,1198,1200,1203,1204,1205,1212,1220,1221,1234,1235,1244,1245,1250,1251,1252,"+ "1259,1262,1268,1272,1283,1286,1287,1288,1289,1290,1293,1294,1296,1298,1299,1300,1301,1302,1303,1304,"+ "1305,1306,1307,1308,1309,1311,1312,1313,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,"+ "1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,"+ "1356,1357,1358,1359,1360,1361,1362,1363,1373,1388,1389,1395,1396,1397,1398,1399,1418,1447,1449,1456,"+ "1485,1486,1487,1492,1502,1515,1520,1529,1530,1542,1568,1576,1582,1583,1588,1591,1592,1593,1605,1607,"+ "1609,1610,1611,1612,1618,1623,1626,1630,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,"+ "1646,1647,1648,1649,1650,1651,1658,1674,1676,1677,1678,1679,1681,1685,1688,1689,1700,1703,1704,1705,"+ "1706,1707,1708,1709,1710,1711,1712,1719,1720,1731,1733,1734,1751,1754,1755,1756,1763,1764,1765,1766,"+ "1767,1768,1779,1783,1785,1791,1795,1796,1797,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,"+ "1810,1813,1814,1817,1825,1829,1831,1832,1833,1834,1835,1839,1840,1845,1846,1847,1848,1849,1850,1852,"+ "1853,1870,1871,1872,1873,1874,1876,1877,1879,1885,1889,1891,1894,1897,1899,1902,1903,1904,1905,1906,"+ "1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1929,"+ "1930,1931,1932,1933,1934,1935,1936,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1951,1952,1953,"+ "1954,1956,1957,1958,1959,1960,1961,1962,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,"+ "1976,1977,1978,1979,1980,1981,1983,1990,1991,2001,2010,2017,2018,2019,2022,2030,2031,2039,2040,2041,"+ "2052,2057,2067,2068,2079,2080,2087,2093,2097,2102,2106,2107,2135,2138,2139,2140,2141,2142,2143,2156,"+ "2157,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2174,2175,2176,2177,2178,2179,"+ "2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2196,2198,2202,2206,2208,"+ "2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2249,2251,2253,2255,2288,2317,2318,2319,2320,2321,2322,2323,2325,2326,2327,2328,2329,2332,2333,2335,2336,2337,2341,2342,2345,2346,2347,2348,2349,2350,2351,2362,2378,2408,2409,2410,2411,2413,2415,2416,2417,2419,2420,2421,2422,2423,2424,2425,2426,2427,2441,2442,2443,2444,2445,2446,2447,2448,2449,2473,2474,2475,2476,2482,2528,2529,2530,2532,2533,2534,2535,2540,2541,2542,2562,2563,2564,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,2691,2692,2693,2694,2695,2696,2697,2698,2699,2700,2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,2751,2752,2753,2754,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,2767,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,2780,2781,2784,2785,2786,2788,2789,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,2825,2826,2827,2828,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2849,2850,2851,2852,2853,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2907,2908,2909,2910,2911,2912,2913,2920,2921,2922,2923,2942,2959,2961,2987,2988,2992,2994,2996,2998,2999,3029,3038,3039,3040,3041,3073,3074,3091,3092,3096,3097,3100,3108,3109,3122,3123,3124,3175,3176,3177,3178,3179,3180,3181,3202,3203,3254,3450,3473,3474,3475,3484,3495,3503,3504,3505,3506,3508"; npcshopdelitem "mission_shop",512; for (.@i = 0; .@i < getarraysize(.Shop); .@i += 2) npcshopadditem "mission_shop", .Shop[.@i], .Shop[.@i+1]; end; } - shop mission_shop -1,512:-1
  18. I have this error (sorry I'm not a coder ^^): EDIT: I have found the problem... after the last "}" there is an invisible ascii character! XD... Mistery of "copy & paste"!!!!
  19. @Haziel Thank you for sharing your work... a small question (sorry if I ask but I do not find anything free on the forum), there is a npc script ready as a stylist for example?
  20. @Aries it's work perfectly... You have all my respect, bro!!! ?
  21. At the moment on my FluxCP I have the classic vending page with the list of shops opened by merchants and to see the items on sale you have to click one shop by one, but I wanted to know how to have a complete list of all items on sale with possible search form as in this example (congratulations to his administrator) https://ragnarok.cx/?module=vending Tnx for answer
  22. Hello gentlemen, sorry for my bad English... I wanted to ask you if there is someone expert in roBrowser who can install and configure it on a dedicated web server and connect it to another server where rAthena run, obviously this service will be paid. I have already tried but I have not succeeded because I am not a good JS coder... I have reached the point where I enter the login data (userid and password) but I can not contact to my rAthena server. In the dedicated web space I have already uploaded the GRF files of our client (also the index.html with the data related to the packetver and packetKeys) and I have all the resources necessary for your work (also if you need a straordinary upload). We would like roBrowser to be run on my web server to work only on our rAthena server (so 2 different static ips and servers). SEND ME A PM and let me know if you are interested and if your price will not be excessive (unfortunately we are a small community: https://www.infinityro.it), we agree for this job!
×
×
  • Create New...