Jump to content

Euphy

Members
  • Posts

    2997
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Euphy

  1. Hmm, I had no idea, since our documentation says: ._. I suppose it doesn't really hurt to have the function, though, unless you disagree.
  2. strcmp("<string>","<string>") commit: d569d28 This command compares two strings are returns a value: 1: string 1 > string 2 0: strings are equal -1: string 1 < string 2 Don't know how this wasn't in the emulator for so long - it should open up a lot more scripting possibilities. ^^
  3. isbegin_quest(<ID>) commit: a3dbbe2 Return the state of the quest: 0 = Quest not started (not in quest log) 1 = Quest has been given (state is either "inactive" or "active") 2 = Quest completed Not very significant, but an alternative to Checkquest(ID,HASQUEST) that's better in most situations.
  4. We count these manually, so you can do it too.
  5. Isn't that what npc/custom/jobmaster.txt does?
  6. Easiest way is to edit the database entry (or copy into db/import/item_db.txt to avoid conflicts!): 604,Branch_Of_Dead_Tree,Dead Branch,11,50,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ if (strcharinfo(3) == "your_map") { delitem 604,1; monster "this",-1,-1,"--ja--",-1,1,""; } else dispbottom "This item can't be used on your current map."; },{},{}
  7. If I remember correctly, we already rejected this idea in the past for the reason @nanakiwurtz stated. Imagine the amount of hits on a decently-populated high-rate server: it'd be thousands of executions per second! It's simply too unrealistic a burden on the servers to be in our repository, in my opinion. You can accomplish most of what you want to do with the 'autobonus' commands.
  8. Have you tried with item type 11? Those shouldn't disappear after use (ex. Reins of Mount, id 12622).
  9. EDIT: includes some additional changes in 834f3ba. Not technically script commands, but anyway~ With the intent of making npc/other/Global_Functions.txt more useful, I've added the following functions in 97687ca: "F_GetPlural": Returns the plural of a noun - only follows basic rules, with few exceptions! callfunc "F_GetPlural","<noun>"{,<0:normal/1:uppercase>} // Examples: callfunc("F_GetPlural","dog") // returns "dogs" callfunc("F_GetPlural","fox",1) // returns "FOXES" callfunc("F_GetPlural","knife") // returns "knives" "F_InsertPlural": Returns the plural of a noun if the given number is not 1. <format string> uses sprintf(), and MUST contain %d (arg0) and %s (arg1), in that order. callfunc "F_InsertPlural",<number>,"<noun>"{,<0:normal/1:uppercase>{,"<format string>"}} // Examples: callfunc("F_InsertPlural",1,"dog") // returns "1 dog" callfunc("F_InsertPlural",3,"fox",1) // returns "3 FOXES" callfunc("F_InsertPlural",5,"knife",0,"^FF0000%d^000000 %s") // returns "^FF00005^000000 knives" "F_InsertArticle": Returns 'a' or 'an' based on a word - only follows basic rules, without exceptions! callfunc "F_InsertArticle","<word>"{,<0:lowercase a/1:uppercase A>} // Examples: callfunc("F_InsertArticle","apple") // returns "an apple" callfunc("F_InsertArticle","dog",1) // returns "A dog" "F_InsertComma": Returns a number with commas between every three digits. callfunc "F_InsertComma",<number> // Examples: callfunc("F_InsertComma",7777777) // returns "7,777,777" "F_GetNumSuffix": Returns a number with a '-st', '-nd', '-rd', or '-th' suffix. callfunc "F_GetNumSuffix",<number> // Examples: callfunc("F_GetNumSuffix",1) // returns "1st" callfunc("F_GetNumSuffix",11) // returns "11th" callfunc("F_GetNumSuffix",32) // returns "32nd"
  10. You can imagine that the vast majority of users doing this would never update their databases again. Definitely not what we want. An important check in all of the databases is the number of fields (columns) provided - with your suggestion, we'd have to remove that check. I understand your intent, and agree that it'd be convenient, but I still can't agree with it. You're trading a handful couple of conflict edits for tens of thousands of extra checks/operations each time every database loads.
  11. Look for all the #ifdef RENEWAL in the src/map/ related to MATK and switch it with the Pre-Renewal code. It'll take a while, and there will almost definitely be a lot of balance issues afterwards...
  12. To delete entries, you'd have to create a separate command for every database which would remove entries, and check for every entry whether it's being added or deleted. It's inefficient and not really worth the effort.
  13. While being able to delete entries would be convenient, I feel that it's outside the scope of 'import' files.
  14. Marking as "approved", awaiting someone to code this.
  15. What he said! In general, if you want to add a feature that already exists, making a pull request will greatly increase the chances of us adding it (as well as speeding up the process).
  16. I took the names from a (dead) server I used to play (and they're credited in my releases topic) XD. And wow, that's an old script. One of the first ones I wrote, I think...
  17. You can create your own files, if one isn't already there. Do you think it'd be beneficial to have empty files for all the databases, or could we simply do a better job documenting it?
  18. Upon rereading this (and looking at the votes), I'm going to reject this proposal. I think the costs outweigh the benefits, and doing a large-scale reorganization makes updating official scripts far more difficult. An easy way to enable/disable NPCs on maps would be to write a script command which returns the names of all NPCs on a map (similar to @mapinfo 2) and then looping through with 'enablenpc'/'disablenpc'.
  19. This was already implemented in the form of the 'bonus_script' command.
  20. These items have already been added; any further comments should be posted in this topic.
  21. Euphy

    Lvl max

    This was completed by Cydh in 96443cd. If you have additional information (i.e. sources showing that our data is incorrect), please post a bug report.
  22. Eh... that was entirely a joke, I would never put such effort into a real script. ;D In case you need one, here's the actual version of that script (as you can see, it's pretty bare): prontera,148,170,6 script MVP Ladder 891,{ mes "[MVP Ladder]"; mes "Hello!"; mes "What are you doing here?"; next; switch(select("Check rankings.:My stats.:Nothing...")) { case 1: mes "[MVP Ladder]"; query_sql("SELECT char_id,CAST(`value` AS SIGNED) FROM `global_reg_value` WHERE `str` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value); for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) { query_sql("SELECT `name` FROM `char` WHERE char_id = "+.@cid[.@i]+";",.@j$); set .@name$[.@i], .@j$; } if (!getarraysize(.@cid)) mes "The rankings are empty."; else for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) mes "["+(.@i+1)+"] "+.@name$[.@i]+" ~ "+.@value[.@i]+" kills"; close; case 2: mes "[MVP Ladder]"; mes "You have killed "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s."); close; case 3: close; } OnNPCKillEvent: if (getmonsterinfo(killedrid,22)) { set MVP_Rank, MVP_Rank+1; if (MVP_Rank == 1) query_sql("INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ("+getcharid(0)+",'MVP_Rank','1',3,0)"); else query_sql("UPDATE `global_reg_value` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `str` ='MVP_Rank'"); dispbottom "~ You've killed "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~"; specialeffect2 313; } end; }
  23. Euphy

    God Quests

    npc/quests/seals/ Read: http://irowiki.org/wiki/God_Items_Quest
  24. It's a joke, I suggest you don't use it. xD
×
×
  • Create New...