Jump to content

Euphy

Members
  • Posts

    2997
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Euphy

  1. The bitmask doesn't make sense. 1 = 2+4. :< (I prefer what you had before.)
  2. My mistake, thanks for catching that. Post edited.
  3. Looks good, Capuche. Can't think of anything else to add. Thanks for working on this, Akinari!
  4. Updates in the last 3 posts applied in r17319. New lines from r17317: //etc 378: Eleanor is now in %s mode. 379: Item Failed. [%s] is cooling down. Wait %.1f minutes. 380: Item Failed. [%s] is cooling down. Wait %d seconds. 381: Skill Failed. [%s] requires %dx %s. 382: You're too close to a stone or emperium to use this skill. //383-389 freeJarek: you missed r17314, line 1454.Thanks to everyone for keeping updated!
  5. Duplicates copy the script body, not the state (enabled/disabled). You can disable the main NPC and still run duplicates from it. Duplicates save a considerable amount of RAM by only storing one instance of a script, not hundreds (or thousands). Not sure what you mean by this at all...
  6. An easier way: - script #sample -1,{ OnAgitStart: OnAgitStart2: sleep rand(10,50); // In case both are executed simultaneously, don't overlap. if (!.bound) { set .bound,1; bindatcmd("guildrecall",strnpcinfo(0)+"::OnBlock"); bindatcmd("recall",strnpcinfo(0)+"::OnBlock"); } end; OnAgitEnd: OnAgitEnd2: sleep rand(10,50); if (.bound && !agitcheck() && !agitcheck2()) { set .bound,0; unbindatcmd("guildrecall"); unbindatcmd("recall"); } end; OnBlock: message strcharinfo(0),.@atcmd_command$+" is blocked during WoE."; end; }
  7. FRN translation updated in r17314. Added a new line: 1454: Color set to '%s'.
  8. @Anakid: For the record, you really should not use that method of storing names; there's absolutely no reason to use permanent variables for every player (they'll slow down the server by constantly syncing with your `mapreg` table). Performing a single query is far more efficient.
  9. Script instances are unique. You can't close a window from one script with another script.
  10. mes "Input an item ID."; input .@item; if (getitemname(.@item) == "null") { mes "Invalid item "+.@item+"."; close; } mes "Input an amount."; input .@amount; if (.@amount == 0 || .@amount > 30000) { mes "Invalid amount "+.@amount+"."; close; } mes " "; mes "Giving "+.@amount+"x "+getitemname(.@item)+" to all players."; close2; set .@size, query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1",.@aid); for(set .@i,0; .@i<.@size; set .@i,.@i+1) { getitem .@item,.@amount,.@aid[.@i]; } end;
  11. Euphy

    bindatcmd

    Something like this... - script #sample -1,{ OnInit: bindatcmd("eventon",strnpcinfo(0)+"::OnEventOn",99,99); bindatcmd("eventoff",strnpcinfo(0)+"::OnEventOff",99,99); bindatcmd("joinevent",strnpcinfo(0)+"::OnJoinEvent"); end; OnEventOn: if (.var) message strcharinfo(0),"The event is already on."; else { set .var,getcharid(3); announce "GM "+strcharinfo(0)+" is hosting an event! Type @joinevent to join.",bc_all; } end; OnEventOff: if (!.var) message strcharinfo(0),"The event is already off."; else { set .var,0; announce "The event has ended.",bc_all; } end; OnJoinEvent: if (.var) { message strcharinfo(0),"Joining event..."; set .@cid,getcharid(0); if (!attachrid(.var)) message strcharinfo(0),"@joinevent failed."; else { getmapxy(.@map$,.@x,.@y,0); warpchar .@map$,.@x,.@y,.@cid; } } else message strcharinfo(0),"No event is ongoing."; end; OnPCLogoutEvent: if (.var && getcharid(3) == .var) donpcevent strnpcinfo(0)+"::OnEventOff"; end; }
  12. Here are the relevant parts of the script: OnMinute10: // Start time (every hour) if (.Status) end; set .Status,1; //... announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0; set .Status,0; The .Status NPC variable is set when the event starts, and is unset when it ends. You want to replace the first section with this:OnMinute00: OnMinute30: set .Status,1;
  13. Updated topic according to r17284 (sorry it's late!).
  14. April Digest 2013 The following digest covers the month of April, 2013. Development Team @Akinari has joined as Core Developer. @Baalberith has joined as Core Developer. @helvetica has joined as Core Developer. Development Highlights Renewal updates: Finalized PIN code implementation. (r17240, r17242) Cashshop support. (r17242) Renewal Homunculus stats. (r17270) Added atrr-column for additional mob modes. (r17304) Implemented many new packets. (r17229, r17234, r17250, r17293, r17294, r17300, r17303, r17306) Renewal scripts: Malangdo Culvert instance. (r17279) Malangdo quests and NPCs. (r17234, r17269, r17275) Updated Malangdo mob_db and mob_skill_db. (r17279) Other noteworthy changes: Implemented Channel System to replace @main. (r17228, r17284, topic) Implemented Multilanguage Support. (r17251, topic) Implemented Console Commands. (r17255) Implemented Secure NPC Timeout and a slight script engine update. (r17280, topic) New options for starting items, including auto-equip. (r17281) Misc. Stats During the period there were 80 commits. Of these 80 commits 43 included bug-fixes.
  15. Switched to ANSI (Windows-1251) in r17309. Tell me if it works. I don't think it's necessary, since some people are probably more comfortable with Pastebin and it's easy to upload differentials, too. Thanks, though!
  16. jaBote, thank you for the very detailed response; I didn't mean any offense at all by switching off from your translation, but was only going by opinions of other staff members. In any case, you are always very welcome to submit changes (preferably entire files or differentials) to what's in the SVN and post in this topic. Or, as you've stated, it would serve the project best if you two could work together on a translation.
  17. Switched to Leeg's translation in r17305, as recommended by Daegaladh and DevilEvil. FRN and CHN translations also updated in this revision.
  18. @Capuche: I wrote the map_msg changes in r17296, and the lines I mentioned are edits I've made to the original part II update.
  19. Thanks to everyone for your continued support! All translations posted thus far have been updated in the SVN. Files still needed: CHN, POR, RUS ~ Channel System, part II (1436-1476). FRN, SPN ~ Revisions to Channel System, part II (changes). GRM, MAL @Lilith: Unfortunately no one from the Dev Team has Russian installed, nor do we know how to work with it. x_x
  20. I added a config section for a reason, please read it. set .Quests,4; // Number of subquests per mission (increases rewards).
  21. Slight Script Engine Update r17280 applies a handful of changes that are just barely worth mentioning. 'close' vs. 'end' Prior to this update, the 'close' command could be used to used to end scripts without having a dialogue window open. This is bad practice, since 'end' is the proper command; now the map-server will output a reminder to edit those scripts: [Warning]: Incorrect use of 'close' command! (source:Example NPC / path:npc/custom/Example.txt)Some of you may have also noticed that, before this change, only 'close' could end a script with a menu open ('select', 'prompt', 'menu'). This has been corrected; now 'end' is able to terminate these scripts.// Before: select("Choice 1:Choice 2"); close; // After: select("Choice 1:Choice 2"); end; NPC TimeoutThe more noticeable change is the completion of the "Secure NPC Timeout" feature, turned on by default (as it is on official servers). With this change, NPCs will automatically terminate if the attached player is idle for a given period of time: /** * Optional NPC Dialog Timer * When enabled all npcs dialog will 'timeout' if user is on idle for longer than the amount of seconds allowed * - On 'timeout' the npc dialog window changes its next/menu to a 'close' button * Comment to disable the timer. **/ #define SECURE_NPCTIMEOUT /** + * Number of seconds after an 'input' field is displayed before invoking an idle timeout. + * Default: 180 **/ #define NPC_SECURE_TIMEOUT_INPUT 180 /** + * Number of seconds after a 'menu' is displayed before invoking an idle timeout. + * Default: 60 **/ #define NPC_SECURE_TIMEOUT_MENU 60 /** + * Number of seconds after a 'next' button is displayed before invoking an idle timeout. + * Default: 60 **/ #define NPC_SECURE_TIMEOUT_NEXT 60 For instance, a "next" button will automatically turn into "close" after 60 seconds have passed.So what? if (QuestVariable == 4) { /* Section 1 */ mes "You've completed the quest."; set QuestVariable,5; next; /* --------- */ mes "Here's your reward!"; getitem 512,1; close; } else if (QuestVariable == 5) { mes "You've already claimed a prize!"; close; } In the snippet above, idling in the first section (marked off by *) will end the script before the player can receive a reward. While this may be a stretch, less-obvious cases certainly do exist.The point: Make sure to check that these changes do not cause any errors or exploits in your custom scripts. They shouldn't, for the most part, but they will break poorly-written NPCs. Thanks for reading!~ :>
  22. item_combo_db: 2777:2777,{ bonus bAllStats,-999; }
  23. They're working in the latest revision. Which revision are you using?
  24. I usually don't comment on graphics works, but this is just brilliant. o_o
×
×
  • Create New...