Jump to content

Mumbles

Retired Staff
  • Content Count

    618
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by Mumbles

  1. The script command you're looking for is viewpoint.
  2. Should be fine as long as you manually update the theme to include these changes: Compatibilized item module (f3eed0e) Update of equip_locations (a55efb0) Update of equip_location_combinations (822220ae) Security Patch (86ba82d)
  3. I'm just nitpicking, but why not use a for loop since it's counter-controlled anyway? for (.@i = 0; .@i < @inventorylist_count; .@i++) { if (!@inventorylist_identify[.@i]) { delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i],1; } } Also, it might be nice to add in a visual effect for that repair (and enclose it in curly braces, because one-liners is just bad coding habit): if (getbrokenid(1)) { specialeffect2 EF_REPAIRWEAPON; repairall; }
  4. Open your server's SQL instance in Workbench so that a window opens for it, presenting you with a window like this: In the sidebar, you should see a menu option for Users and Privileges; it is underlined in the image above. Click on it, a window like this should appear: Select or create your desired username for your server, and then set a password for it. If you haven't already made a schema for your server, make one now. I only intend to use my local server for testing purposes, so for the sake of easy reference and configuration, I've set my schema, username, and password all to ragnarok, as it is the default configuration. From here, click on the Schema Privileges tab and add the user ragnarok to the schema ragnarok. I've given the user ragnarok all privileges except GRANT, as it won't ever need it. Anddd that's it, as far as setting up your user(s) properly in Workbench. If I missed something or if you have any other questions, please feel free to ask.
  5. You're very welcome; I'm glad I was able to help you resolve the issue. c:
  6. This will only prompt players if they do not have the variable auto_third set; if they've already selected their job once, they won't encounter the message anymore. However, if you're loading this (as it is) into a live server, pre-existing players will also be prompted, even if they already have their class of choice. To prevent this from happening, change this line: if(auto_third) { to this: if(auto_third || Class) {
  7. Released yesterday evening: http://herc.ws/board/topic/4173-utility-coin-trader/
  8. Apply these changes to your code: https://github.com/datmumbles/Scripts/commit/5185d01531c4a5d407cebef78fa81b1f4380577d The array names need to have a trailing $ before the opening bracket; in your current version, they're being read as numerical values instead of strings.
  9. Not quite sure what you're asking, but here's some documentation on getgrouipid(): http://herc.ws/wiki/Getgroupid Try elaborating a little more if you still don't have the answer(s) you need.
  10. Edit this line: setarray .@Safe[0],4,7,6,5,4;
  11. Updated. Please re-download the script using the link provided in the first post. Thanks for pointing that out.
  12. Ah, you found another one of my mistakes lol. Change this: cutin .@image$[.@i], 2; to this: cutin .@image$[.@x], 2; ...or just see my other post for the updated version.
  13. Sorry, looks like I forgot to declare it as a string. See my previous post for the fix. .@image[] should be .@image$[]
  14. Here's an example: prontera,150,150,0 script Sample 100,{ // Cutin file names (plays in reverse order) setarray .@image$[0], "kafra_05", "kafra_06", "kafra_07"; // Countdown time (in seconds) .@time = 3; // Map name to play cutins on .map_name$ = "prontera"; // Generate array with account IDs query_sql "SELECT DISTINCT(`account_id`) FROM `char` WHERE `online` = '1'", .@aid; // Loop through countdown sequence for (.@x = .@time; .@x > 0; .@x--) { // Loop through all online players in map for (.@i = 0; .@i < getarraysize(.@aid); .@i++) { if (attachrid(.@aid[.@i])) { if (strcharinfo(3) == .map_name$) { cutin .@image$[.@x], 2; } } } announce "Count down : " +.@x, 0; sleep 1000; } // Clear cutins for (.@y = 0; .@y < getarraysize(.@aid); .@y++) { if (attachrid(.@aid[.@y])) { if (strcharinfo(3) == .map_name$) { cutin "", 255; } } } end; }
  15. Changing the method to the way you described would work, but it seems you already understand what's going on. Patskie's method simply allows you to change the value of .@x within the for loop from "3" to whatever you wish it to be; that way, it will count down for however long you set it to, without cluttering your code unnecessarily.
  16. Here's my method using the OnMinuteXX label as a trigger. It's a bit less effort and allows for virtually limitless amounts of announcements; when the last announcement has been made, it will repeat from the beginning on the next hour. - script announce -1,{ /*----------------------------------------------------- Script -----------------------------------------------------*/ OnInit: // Announcement messages setarray .news$[0], "This is the first announcement.", "This is the second announcement.", "This is the third announcement."; // Announcement options in corresponding order setarray .options[0], bc_all, bc_all|bc_blue, bc_all|bc_yellow; end; /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnMinute00: announce .news$[.i], .options[.i]; .i++; if (.i == getarraysize(.news$)) { .i = 0; } end;}
  17. Here, give this a try: http://herc.ws/board/topic/4173-utility-coin-trader/
  18. Utility: Coin Trader As per @karazu's request: http://herc.ws/board/topic/4157-mithrill-to-gold-to-silver-coins-vice-versa-trader/ Description: Allows players to purchase coins with zeny, exchange coins for zeny, and convert coins to more valuable or lesser coins. See configuration to customise coin values. Download: https://github.com/datmumbles/Scripts/raw/master/util/cointrader.txt
  19. Here's a version that supports multiple items: prontera,150,150,0 script testwarp WARPNPC,1,1,{ message strcharinfo(0), "You touched me!"; /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnInit: // Item constant/ID, amount setarray .item_id[0], Jellopy, 1, Clover, 5, Fluff, 10; // Warp destination .warp_map$ = "prontera"; .warp_x = 155; .warp_y = 179; end; /*----------------------------------------------------- Script -----------------------------------------------------*/ OnTouch: // Check items for (.@i = 0; .@i < getarraysize(.item_id); .@i += 2) { if (countitem(.item_id[.@i]) < .item_id[.@i + 1]) { message strcharinfo(0), "You need the following items to access this warp:"; for (.@j = 0; .@j < getarraysize(.item_id); .@j += 2) { message strcharinfo(0), .item_id[.@j + 1] +" "+ getitemname(.item_id[.@j]); } message strcharinfo(0), "Access denied."; end; } } // Delete items for (.@i = 0; .@i < getarraysize(.item_id); .@i += 2) { delitem .item_id[.@i], .item_id[.@i + 1]; } // Warp player warp .warp_map$, .warp_x, .warp_y; end;}
  20. The more you know. Brought up some good points though. d:
  21. This isn't quite a full-blown script release or anything, but here's a related topic: http://herc.ws/board/topic/3283-edited-cointrader-problem/
  22. While I'm unsure as to whether or not this is possible with our current scope of script commands and item bonuses, I'd just like to clarify a few points. This card negates teleportation effects induced by skills Teleportation is only negated for the user possessing the card Others on the map are still affected by that map's teleportation flags Script-based warps and GM recalls will still work Correct?
×
×
  • Create New...

Important Information

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