Jump to content

_Okuz_

Members
  • Posts

    92
  • Joined

  • Last visited

  • Days Won

    3

Community Answers

  1. _Okuz_'s post in R>Floating EXP and Drop rate was marked as the answer   
    Why so rude?   I'm using so many variables cause I thought it was better than repeating the setbattleflag / getbattleflag for each flag he wants do edit, but you're right there's no need for that.   EDIT-- Euraka! Now I remember why I needed to use so many variables... I can't get the original rates to reset the event on monday =/   I followed your instructions but correct me if I did something wrong. // Author: Lupus // Edited: _Okuz_ - script Weekend Floating Exp -1,{ OnInit: // To force the event to run even if you have to shutdown your server for some reason... if (gettime(4) != 5 && gettime(4) != 6 && gettime(4) != 0) end; OnFri0000: // start double rates on Friday 00:00 setbattleflag "base_exp_rate", getbattleflag("base_exp_rate") * 2; setbattleflag "job_exp_rate", getbattleflag("job_exp_rate") * 2; setbattleflag "item_rate_heal", getbattleflag("item_rate_heal") * 2; setbattleflag "item_rate_use", getbattleflag("item_rate_use") * 2; setbattleflag "item_rate_equip", getbattleflag("item_rate_equip") * 2; setbattleflag "item_rate_card", getbattleflag("item_rate_card") * 2; setbattleflag "item_rate_mvp", getbattleflag("item_rate_mvp") * 2; setbattleflag "item_rate_adddrop", getbattleflag("item_rate_adddrop") * 2; setbattleflag "item_rate_treasure", getbattleflag("item_rate_treasure") * 2; atcommand "@reloadmobdb"; announce "[Event] : Double rates enabled!",bc_all,0xFF6060; end; OnMon0000: // stop double rates on Monday 00:00 setbattleflag "base_exp_rate", getbattleflag("base_exp_rate"); setbattleflag "job_exp_rate", getbattleflag("job_exp_rate"); setbattleflag "item_rate_heal", getbattleflag("item_rate_heal"); setbattleflag "item_rate_use", getbattleflag("item_rate_use"); setbattleflag "item_rate_equip", getbattleflag("item_rate_equip"); setbattleflag "item_rate_card", getbattleflag("item_rate_card"); setbattleflag "item_rate_mvp", getbattleflag("item_rate_mvp"); setbattleflag "item_rate_adddrop", getbattleflag("item_rate_adddrop"); setbattleflag "item_rate_treasure", getbattleflag("item_rate_treasure"); atcommand "@reloadmobdb"; announce "[Event] : Double rates disabled!",bc_all,0xFF6060; end; } Test results:
    http://imgur.com/a/lyLI5
  2. _Okuz_'s post in Guild Salary was marked as the answer   
    Here is the final script.
     
    prontera,150,150,5 script Guild Salary Manager 109,{ if (!getcharid(2) || getguildmasterid(getcharid(2)) != getcharid(0)) { mes "[Manager]"; mes "Only Guild Masters are allowed to use my services."; close; } if (salary_received) { mes "[Manager]"; mes "You already got you reward... Maybe next week..."; close; } mes "[Manager]"; mes "I need to check if you are the owner of any active castle in order to proceed with your payment..."; next; set .@count, getarraysize(.castle_salary$); for (set .@i, 0; .@i < .@count; set .@i, .@i + 3) { if (getcastledata(.castle_salary$[.@i],1) == getcharid(2)) { getitem atoi(.castle_salary$[.@i + 1]), atoi(.castle_salary$[.@i + 2]); set salary_received, 1; } } mes "[Manager]"; mes (salary_received ? "Congratulations, you have a Castle and deserve a reward!" : "Unfortunately you need at least one Castle to earn a reward."); close; // Arg(0): castle_map // Arg(1): item_id // Arg(2): amount S_setCastleSalary: set .castle_salary$[getarraysize(.castle_salary$)], getarg(0); set .castle_salary$[getarraysize(.castle_salary$)], getarg(1); set .castle_salary$[getarraysize(.castle_salary$)], getarg(2); return; OnAgitEnd: OnAgitEnd2: OnAgitEnd3: query_sql "DELETE FROM `char_reg_num` WHERE `key` = 'salary_received'"; end; OnInit: callsub(S_setCastleSalary, "prtg_cas01", "501", "10"); callsub(S_setCastleSalary, "prtg_cas02", "501", "10"); callsub(S_setCastleSalary, "prtg_cas03", "501", "10"); } Att,
    _Okuz_.
  3. _Okuz_'s post in Requesting for Talking NPC Facts was marked as the answer   
    Hello Brahms, how are you buddy?

    I don't know what you meant by saying Facts... Maybe something like this:
    prontera,150,150,5 script Talking Facts NPC 690,{ end; OnTalk: freeloop(1); while (1) { npctalk "This is a fact..."; sleep 3000;                 npctalk "This is another fact...";                 sleep 3000; } freeloop(0); end; OnInit: donpcevent strnpcinfo(3) + "::OnTalk"; } Every 3 seconds "3000" it will say "This is a fact..." and "This is another fact...", you can add more messages or change its time according to your needs.

    I hope it works!

    Att,
    _Okuz_.
  4. _Okuz_'s post in AFK Homunculus was marked as the answer   
    Hello again AngelaKiss! =]

    Let's move to the next challenge: restrict in towns. We need an extra validation to check if the player's map have or not the mf_town mapflag, this mapflag tells to the -map-server that the flagged map is a town.

    Change this:
    if (checkhomcall() == 0 && (checkidle() / 60 >= .vaporize)) { To this:
    if (checkhomcall() == 0 && (checkidle() / 60 >= .vaporize) && !getmapflag(strcharinfo(3),mf_town)) { The final script must be like this:
     
    - script AFK_Vaporizer -1,{ OnPCLoginEvent: initnpctimer getcharid(3); end; OnTimer60000: if (checkhomcall() == 0 && (checkidle() / 60 >= .vaporize) && !getmapflag(strcharinfo(3),mf_town)) { atcommand "@useskill 244 1 "+strcharinfo(0); dispbottom "You are not allowed to farm with Homun while AFK."; } initnpctimer getcharid(3); end; OnInit: set .vaporize, 2; // How many minutes to use vaporize. } Thanks,
    C ya!
  5. _Okuz_'s post in help please was marked as the answer   
    Yeap buddy but that's what the first script you posted is intended to do. The function that we have just created will call the NPC that already have this feature. As I said before, you need to check the script validations because that might be your problem.   However, if you just want to add 7 days without checking if players already have received it or not, just put this on your item script and forget all I said before. 670,Gold_Coin_Moneybag,Bag of Gold Coins,2,100000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{ set #VIP_expire, gettimetick(2) + (7*86400); },{},{} C ya!
  6. _Okuz_'s post in Help about this script! was marked as the answer   
    Hello Dejavu, how are you?

    Please don't forget to use the Code quotation when posting codes to the forum, it's better to read and debug.
     
    prontera,194,146,5 script Changename 644,{ mes "Input new name"; input @NewName$; if(countitem(26080) < 5000 || Zeny < 500000000) { mes "Not enough requirements"; close; } next; mes "Please relog for the changes to take effect"; query_sql("UPDATE `name` FROM `char` SET `name`='"+@NewName$+"' WHERE `name`='"+strcharinfo(0)+"'"); delitem 26080,5000; set Zeny,Zeny-500000000; close; } Here are a few notes about your script:

    Line 6: Check if you have any item with id 26080 in your inventory and check if you have more than 500000000 zenys to proceed.
    Line 14: Delete 5000 items with id 26080 from your inventory.
    Line 15: Delete 500000000 Zenys.

    Change the item id if needed.

    I hope it works, good luck!
×
×
  • Create New...