Jump to content

Zephy

Members
  • Content Count

    20
  • Joined

  • Last visited

Everything posted by Zephy

  1. Zephy

    countitem loop

    Damn this is pissing me off. For some reason when I try to use my script it says that my player is not attached. Eeff it, here's the actual script. prontera,155,150,3 script TEST_NPC1 99,{ // Loop to check if player has the required items for(.@i = 0; .@i < getarraysize(.qitem[0]); .@i++) { if(countitem(.qitem[.@i] >= .qamt) { mes .npc_name$; mes "congrats dialogue for gather items."; delitem .qitem[.@i],.qamt; getitem .pitem,.pamt; close; } } // Dialogue if player does NOT have the required items already mes .npc_name$; mes "dialogue hereeeee."; mes "More hereeeee"; next; mes .@player_name$; mes "PC dialogue here"; next; if(select("Yes, please.:No, thank you.") == 2) { mes .npc_name$; mes "leaving message here"; close; } mes .npc_name$; mes "more dialogue"; next mes .npc_name$; mes "Come back with:"; // List items for(.@i = 0; .@i < getarraysize(.qitem[0]); .@i++) mes "^FF0000"+ .qamt +"x - "+ getitemname(.qitem[.@i]) +"^000000"; mes "...and I will give you the item."; close;OnInit: // Configuration // General .npc_name$ = "[^008800NPC_NAME^000000]"; // NPC's dialogue name .@player_name$ = "[^FF0000"+strcharinfo(0)+"^000000]"; // Items .pitem = 901; // Prize item for completing the quest .pamt = 1; // Prize item amount setarray .qitem[0], 501, 502, 503; .qamt = 1; // Quest item amount end;} I guess I should mention that I'm getting this strange error as well, even though I don't have that in my script ._. . [Error]: npc_read_event_script: detected possible use of wrong case in a script. Found '::OnPcLoginEvent', probably meant to be '::OnPCLoginEvent' (in 'OnPCLoginEvent').
  2. Zephy

    countitem loop

    I don't think that's it because I have the same loop to print out the requirements and its... for(set .@i, 0; .@i <= getarraysize(.item[0]); .@i++)mes ^FF0000"+ .amt +"x -"+ getitemname(item[0]) +"^000000^"; ...and it prints all the items out correctly. EDIT: I think that whoever said a character was not attached was right. When I looked at the emulator (before changing the code) it kept giving me an error that the player was not attached (which is weird since the player has to initiate the script by talking to the NPC). The only real problem I saw with that was that it wasn't displaying the '.@player_name$' variable. So I changed the code to remove the error from the emulator (e.g. take out the '.@player_name$' variable). I'll keep messing around with it, especially since Nameless2you said the syntax was correct and it worked. Thanks everyone :x.
  3. Zephy

    countitem loop

    Sorry :x. This was just a theoretical "snippet" from that script so you could get an idea of the loop. In the original one all variables are declared under 'OnInit'. However, it still does not work.
  4. Zephy

    countitem loop

    So i'm trying to avoid writing out all the 'countitem' stuff and just do it in a loop. - script Deleter -1,{ for(.@i = 0; .@i < getarraysize(.item[0]); .@i++) { if(countitem(.item[.@i]) >= .amt) { delitem .item[.@i], .amt; } } setarray .item[0], 501, 502, 503, 504; .amt = 1;} But for some reason it doesn't work. Can anyone tell me where my error is exactly? Did I do the logic wrong?
  5. Uh, okay ill try to do it tomorrow.
  6. Do you want it to be a physical NPC (a player can click on it) or do you want it to be automatic (when a player kills a multiple of 5 MVPs on a certain map, automatically gain the items)? Here is a script that will do the latter :x... /*=========================================================Untitledby Zephy===========================================================Description:No description available.===========================================================Compatibility:Optimised for Hercules emulators.===========================================================Changelog:1.0 - Initial release.===========================================================Additional Notes: - If you want the kills to be reset when the player dies, uncomment line 44 and 52. - Currently the kill counter variable (@mvpkill) is a temporary variable, meaning that if the player logs out, their score will reset. If you want them to keep the score even when they log out, remove the '@' in @mvpkill.=========================================================*/- script MvP Counter -1,{OnNPCKillEvent: for (.@i = 0; .@i < getarraysize(.map$); .@i++) { if (getmonsterinfo(killedrid, MOB_MVPEXP) && strcharinfo(3) == .map$[.@i]) // Checks if user has killed an MvP on a specified map { @mvpkill++; //Increments variable to count MvP kills } if (@mvpkill % 5 == 0) // Checks if @mvpkill if a multiple of 5 { @amount++; // Increment variable for prize amount (increment by 1 per 5 kills) getitem .prize, @amount; // Gives player the prize } }end;/*OnPcDieEvent: if (@mvpkill) { @mvpkill = 0; }end;*///ConfigurationOnInit: .prize = 0; // Prize ID setarray .map$[0], "bossnia_01", "bossnia_02"; // Maps that you want this script active on end;}
  7. File Name: Modified Healer File Submitter: Zephy File Submitted: 06 Dec 2013 File Category: Scripts Versatile healer that can be configured easily. Additional features include price, buffs, repair, and delay per use. Modified from Euphy's healer. Click here to download this file
  8. File Name: Banker File Submitter: Zephy File Submitted: 06 Dec 2013 File Category: Scripts Here is a veristile Banker NPC that allows exchanging of an item for zeny, vice versa, and storage of said item without the use of a SQL database. I've noticed that there weren't many of these "Banker" NPCs in the athena project, and the ones that were, weren't the way I personally wanted them. So I made this :x. Its fully tested and working with the latest revision of Hercules. Click here to download this file
  9. Zephy

    Modified Healer

    Version 1.0

    775 downloads

    Versatile healer that can be configured easily. Additional features include price, buffs, repair, and delay per use. Modified from Euphy's healer.
  10. Zephy

    Banker

    Version 2.0

    172 downloads

    Here is a veristile Banker NPC that allows exchanging of an item for zeny, vice versa, and storage of said item without the use of a SQL database. I've noticed that there weren't many of these "Banker" NPCs in the athena project, and the ones that were, weren't the way I personally wanted them. So I made this :x. Its fully tested and working with the latest revision of Hercules.
  11. Zephy

    Banker

    deposit items just like kafra @storage? or different? does it suport multiple deposit of items? line 65: if (@banknotewithdraw =< 0) { // Checks if the player enters a number less than or equal to 0 should be: if (@banknotewithdraw <= 0) { // Checks if the player enters a number less than or equal to 0 It does not support multiple deposit of items. It's more like a banker exchanging an item (Bank note) to zeny or vice versa. It also allows storage of the item.
  12. Zephy

    Banker

    Finally home so I can now test it properly. Thanks for moving, didn't know about that rule :x.
  13. Zephy

    Banker

    This is the first script I'm going to release to the public for Hercules. I'm still new to Hercules but I think I've got it down for the most part. This NPC a versatile Banker that allows for storage and exchanging (item ---> zeny, and vice versa) of an item (made for bank notes, but they can be anything really) without using a SQL databse. I've noticed this type of NPC has been scarce around all the Athena emulators, so I decided to make one :x. I made this during my break in between classes so it has NOT been tested yet. Over the next few days I'll be testing it and changing it, but for now, here is the initial release. I will fully support this script so if something is wrong, let me know. I would also love some input on this script. What should I do differently, is it a clean script, does it work, are there any shortcuts I should know about? Let me know! EDIT: I have tested it, fixed it up and added some things. The new script can be found here.
  14. I've already done that. It still isn't fast enough. I was looking for a source modification to remove the delay ;/.
  15. So I was wondering if there is a way to make a skill have the same effect as setting no_skill_delay to 1 (in conf/battle/skill.conf), but for a specific skill, not all skills. I have already set delay_rate to 0 as well, however, it's skill not fast enough. Any ideas?
  16. Thanks so much Via! It works!
  17. Would you mind elaborating?
  18. Ive diffed the client, edited the clientinfo.xml accordingly. Server is up and running but I still cant connect. Any ideas?
  19. I think you changed the duration of the skill, not the cool down. Make sure you're following the correct structure of the database. // Structure of Database: // SkillID,CastingTime,AfterCastActDelay,AfterCastWalkDelay,Duration1,Duration2,Cool Down,Fixed Casting Time //-- LG_INSPIRATION2325,2000,2000,0,30000:45000:60000:75000:90000,0,0,1000  See if that works.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.