Jump to content

Mumbles

Retired Staff
  • Content Count

    618
  • Joined

  • Last visited

  • Days Won

    15

Reputation Activity

  1. Upvote
    Mumbles got a reaction from ToiletMaster in summon monster script   
    Here's my method, which utilizes your array and makes it a little easier to reconfigure (if needed):
     
    guild_vs5,57,47,4  script  Wave Mobs#rand::wave_mobs  73,{  // Dialogue   mes "Hello";  mes "You've caused monsters to be summoned!";   close2;    // Summon all monsters in the '.monster_weak' array  for (.@i = 0; .@i < getarraysize(.monster_weak); .@i++)    monster .map$, 0, 0, .weak_name$, .monster_weak[.@i], .weak_amount, strnpcinfo(3) +"::OnWave";      end; OnWave:    // Mob death event    if (mobcount(.map$, strnpcinfo(3) +"::OnWave") <= .announce_start)      announce "There are only "+ mobcount(.map$, "all") +" left! Good luck!", 0;        end;    OnInit:    // Map name    .map$ = "guild_vs5";        // Mob count before announcements start    .announce_start = 95;        // Weak monster name    .weak_name$ = "--ja--";        // List of weak monster IDs    setarray .monster_weak[0],  1301,1297,1403,1654,1268,1507,1830,1307,1302,1635,                  1655,1636,1777,1837,1656,1219,1502,1637,1262,1700,                  1320,1865,1657,1702,1829,1375,1204,1653,1416,1200,                  1197;        // Amount of weak monsters to summon    .weak_amount = 100;      end;}  

     
    You should consider reading a little more on looping through arrays in the documentation or on Wiki. The basic concept of using a for loop with your array(s) is that you'll essentially run the same sequence of code through your array indexes until each index has been used.
     
    for (.@i = 0; .@i < getarraysize(.monster_weak); .@i++)  
    This loop says, "Start .@i off with the value 0. For each loop in which .@i is less than the array size of the array .monster_weak, run the script on the first line below (or within curlies { } below), then increase the current value of .@i by 1."
     
    Now, this might seem like a mouthful at first, but it really starts to make sense once you understand the relation between array indexes and the usage of an incrementation variable (.@i, in this case) in your script.
     
    The first value of an array is at the index 0; this means that an array set up like this:
     
    setarray .array[0], 123, 231, 321;  
    ...will have its first index value (.array[0]) as 123, its second index value (.array[1]) as 231, and its third index value (.array[2]) as 321. When we go through the array with a loop, we start .@i off at 0 so that we can use .@i as a place holder for the array and start reading from the first index (.array[0]) with .array[.@i]. Here's an example of this usage:
     
    for (.@i = 0; .@i < getarraysize(.array); .@i++)  mes .array[.@i];  close;  
    This loop will display an NPC message dialogue with the value of the current index being referred to. The final product will look something like:
     
    123
    231
    321
     
    ...followed by a close button. If you wanted to do more, enclose your looped script within curlies { }, like you would with an if statement.
     

     
    Regarding getarraysize():
    This script command returns a value with the size of an array - the amount of indexes an array has. Our array .array has three indexes, therefore it has an array size of 3. Since there is no value for .array[3], we can safely use the condition .@i < getarraysize(.array) within the for
    loop's expression; this also allows us to increase the amount of values
    our array has without having to modify the loop directly.
     

     
    To reiterate what @Emistry said, you can just use permanent NPC variables (.variable_name) instead of global variables - that is, unless you intend to use your arrays in such a way that permanent NPC variables would not suffice.
  2. Upvote
    Mumbles reacted to jaBote in Positions?   
    It's quite simple yet intuitive:
     
    Just go to that map, and place yourself on the place you want to put your NPC, then use /where (it's a command client that tells you the map and the x,y positions you are in). You'll get the map and the x, y coordinate positions on that map. Then you just put those numbers on the NPC coordinates.
  3. Upvote
    Mumbles reacted to Beret in Paid Server   
    Well this feature is much more ancient was never implemented in an emulator.  
    This system sets the time in which the player has access to the server for example:  
    18:54:50  
    in this case above I have 18 hours 54 minutes and 50 seconds of server access.  
    - When that time runs out even me being online I will be disconnected from the server.  
    - When character is offline time is not counted, only counts the time in which the character is online in game.       If I'm not mistaken the same packet working other types of restrictions that are they:   1 - maintenance = Here you must block access to the server allowing only GM.

    2 - over 18 = Here is to check the age of the player for him to have access if it has 18 years or more.

    3 - paying = here is to check if the player has and how much credit he has time before being kicked from the server. If the time ends and he is online will be kicked from the server and a message will be displayed that he need more credits.

    4 - P2P = Here is the server in free mode.      I find it interesting that the implementation of this system, because players who help with a donation to the server could have access to a paid server, which could be determined the time by the administrator for example:  
    2013-10-10 18:54:50
    In this case above the player has 30 days of access to the paid server.
  4. Upvote
    Mumbles got a reaction from jaBote in N> Help on SC_PROPERTYFIRE   
    You could do it with a script, like:
     
     
    OnPCDieEvent:  sc_end SC_PROPERTYFIRE;  end;
  5. Upvote
    Mumbles got a reaction from 2834 in Hercules on Windows   
    Read this: http://herc.ws/board/topic/152-obtaining-hercules/?p=845
     
    You'll have to compile it in MSVC, but it works just fine.
  6. Upvote
    Mumbles reacted to Capuche in got problem with Quest_shop   
    Add(2,5378,1,1000000,0,515,50,10007,1,1065,1,7038,5,622); miss one argument.
    ...,622, <amount>;
  7. Upvote
    Mumbles reacted to GodLesZ in Help please, Chat bubble/room doesn't update.   
    The reason for the missing update is the wrong NPC name
    donpcevent "PvP Ranker::OnInit"; This assumes an NPC named "PvP Ranker" has an Event named "OnInit" (which is executed once after server start and on every @reloadscript and @loadnpc).
    Your NPC is named "PvP Ladder".

    So either rename your NPC to "PvP Ladder" or adjust all "PvP Ranker::OnInit" call to "PvP Ladder::OnInit".
  8. Upvote
    Mumbles got a reaction from serverkid in Dynamic IP and Server   
    You could enable DNS support on your client and configure a subdomain to point to your IP and/or use a VPN. I'm sure there are better methods now, but one popular method I recall is the use of Hamachi to create a VPN and have players connect with that IP address.
     
    Example:
    Update all of your public IP address configurations to server.myRO.com, which points to your computer's public IP address, 87.65.43.21 - doing so allows you to update where your subdomain points to with ease, rather than updating a bunch of files.; alternatively, use Hamachi to create a VPN and generate an IP address for players to connect to, and use that for your public IP address settings.
     
    The best solution? Lease space with hosting providers to suit your needs. I prefer BuyVM.net, but if you don't know how to manage or set up a server, I suggest you try hosting services that will set up your server and provide support. For a list of services that are backed by our community, check out our Paid Services section.
  9. Upvote
    Mumbles got a reaction from ToiletMaster in Shortening the script   
    for (set @i, 82000; @i < 82267; set @i, @i +1) { if (checkquest[@i]) callsub "N_Progess"; set @i, @i + 1;}  
    I don't see much of a difference in the usage of callsub here, in comparison to goto; in either case, it's just sloppy coding and could be written like this:
     
      for (@i = 82000; @i < 82267; @i++)  {    if (checkquest(@i))    {      mes "You're currently still performing a quest!";      mes "Please ^FF0000finish the quest or abandon the quest!^000000";      close;    }  }  
    Using descriptive labels and names is important too, especially when you want to look back at your code and figure out what's going on; comments are useful, but functions named like L_quest, R_quest, and so forth don't tell me or anyone else a whole lot about what the function does. Regardless, calling the functions was a little pointless, as they were both only called once throughout all 4828 lines; it'd make more sense to simply include the content of the function where it was originally called.
     
    Here's my method, which is a little prettier than @Emistry's (no offense c:) but basically the same thing. I placed the level checks outside of the switch, as they're only needed once anyways, and organized the entire script to be more readable. It's 358 lines (including the header and comments) versus Emistry's 207 lines, but I like my code to be a little less mashed together.
     
    http://upaste.me/b3607239c4edd0b0
  10. Upvote
    Mumbles got a reaction from Dramosith in How To Connect To My Own RO Server? [Super Old Newbie]   
    Hi @jolnar,
    You might be better off following the guide by Patskie
    and running Hercules on your own computer, unless you plan on having
    others connect as well. If you'd like to connect remotely, read on.
     
    In step 8 in Patskie's guide, you'll want to change your char_ip and map_ip setting to your remote server's public IP address. Afterwards, change the <address> IP in your clientinfo.xml to the same IP and try connecting. If you're actually using a Hercules emulator, 2012-04-18 is the default client configured in src/common/mmo.h
  11. Upvote
    Mumbles got a reaction from kerbiii in Help with vellum kaltz script   
    Hi @kerbiii,
    It appears there is currently no proper method to execute this effect. I've gone ahead and started a new issue in the tracker regarding the change. Thanks for bringing this to our attention.
  12. Upvote
    Mumbles got a reaction from llbranco in [help] 1 login for more than 1 DB   
    You can just point your servers to read from the same login database and columns; I don't know anything about private FlyFF, WoW, or Mana World(?) servers, but if they can read plain text or MD5 hashes and be configured to read from specific tables and columns, it should work fine.
  13. Upvote
    Mumbles reacted to Zephy in How to disable cool down on Inspiration skill   
    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.
  14. Upvote
    Mumbles got a reaction from kyeme in Bind commands   
    I'd like to see this happen as well. c:
     
    Additionally, would it be possible for bind commands to be automatically added to the @commands list? Perhaps under a "Custom" or "Special" category.
  15. Upvote
    Mumbles reacted to kyeme in Bind commands   
    I would like to suggest bind commands not to be case sensitive (if possible). Thank you!
  16. Upvote
    Mumbles got a reaction from somale in Hercules Invasion   
    Event: Hercules Invasion

    Description:
    A completely revamped and optimized variation of the widely popular Poring Invasion event. Configuration settings are dynamic and easily modifiable. Customizable parameters include normal monsters, "prized" monsters, each respective monster amounts, monster tiers, invasion map,NPC name, and server name. NPC can be triggered by staff using the command @invasion.

    Download:
    https://github.com/datmumbles/Scripts/raw/master/event/invasion.txt
  17. Upvote
    Mumbles reacted to Samuel in callfunc   
    Does this happens for third jobs only?
     
    if that so, try changing 7 to 63 in the itemdb
  18. Upvote
    Mumbles got a reaction from madtoyz in Change Cash Point by Happ5 become unlimited exchange   
    o.O;
     
    Are you not using Hercules? It seems to be erroring at the variable declarations. Here's an adapted version that uses the set command for variable declarations.
     
     
    izlude,160,149,4  script  Point Exchanger::point_x  714,{  mes .name$;    mes "Hello there, "+ strcharinfo(0) +"!";  mes "I can exchange your "+ getitemname(.item_id) +" for "+ .x_rate +" Points each!";  next;    // End the session if player chooses to  if (select("Exchange "+ getitemname(.item_id) +":^FF0000End session^000000") == 2)  {    mes .name$;    mes "Aw, what a shame! See you later, then!";    close;  }    mes .name$;  mes "Please input the amount of coins you would like to exchange. Remember, 1 "+ getitemname(.item_id) +" is equivalent to "+ .x_rate +" Points!";  next;    input .@amount;  // Input coin amount to be exchanged    // User does not have specified amount of coins  if (countitem(.item_id) < .@amount)  {    mes .name$;    mes "I'm sorry, but you do not have "+ .@amount +" "+ getitemname(.item_id) +" in your inventory! You currently have "+ countitem(.item_id) +".";    close;  }    delitem .item_id, .@amount;          // Delete specified amount of coins  set .@exchange, .@amount * .x_rate;      // Calculate amount to be updated  set #CASHPOINTS, #CASHPOINTS + .@exchange;  // Update points    mes .name$;  mes "The transaction was successful! You traded "+ .@amount +" "+ getitemname(.item_id) +" for "+ .@exchange +" Points! You now have "+ #CASHPOINTS +" Points.";  close;      OnWhisperGlobal:    // Whisper anything to initialize settings    message strcharinfo(0), strnpcinfo(1) +" : 'OnInit' label has been intialized.";    OnInit:    // Configuration    set .name$, "[^0000FFPoint Exchanger^000000]";  // NPC name    set .item_id, 7539;    // Item ID of coin to exchange    set .x_rate, 30;    // Exchange rate (1 coin for x points)    end;  }
  19. Upvote
    Mumbles got a reaction from madtoyz in Change Cash Point by Happ5 become unlimited exchange   
    Whoa, I wasn't aware of that! I got so used to triggering that label manually lol. That's great that we no longer need to; thanks for the heads up! c:
  20. Upvote
    Mumbles reacted to Tepoo in Anti 0 Delay GRF   
    Harmony is getting obsolete.
     
    you can use the free to get tools to prevent these things.
     
    SecureGRF + Packet Obfuscation + Client MD5 Hash everything is free to get. 
    Harmony is the middleage, hercules the future. dont try to fight cyborgs with sword and bow.
  21. Upvote
    Mumbles reacted to jaBote in How to properly make set equips?   
    This, or you could even use the db/pre-re or re/item_combo_db.txt file (example, renewal file), which is now the official mean of making item combos. The way you tried and Via corrected is still supported but I personally don't reccommend that.
  22. Upvote
    Mumbles reacted to jaBote in prohibit monsters in a map to go to a certain area of the same map   
    You can try to warp monsters outside by making use of the OnTouchNPC event label and unitwarp script command:
     
    doc/script_commands.txt (unit* commands, especially unitwarp):
    *unitkill <GID>;*unitwarp <GID>,<Mapname>,<x>,<y>;*unitattack <GID>,<Target ID>;*unitstop <GID>;*unittalk <GID>,<Text>;*unitemote <GID>,<Emote>;Okay, these commands should be fairly self explaining.For the emotions, you can look in db/const.txt for prefixes with e_PS: unitwarp supports a <GID> of zero, which causes the executor of the script to be affected. This can be used with OnTouchNPC to warp monsters:OnTouchNPC: unitwarp 0,"this",-1,-1;
  23. Upvote
    Mumbles reacted to Angelmelody in how can i make this script automatically start every 2hrs?   
    +OnMinute0:+ if(gettime(3)%2) end;KoEActualStart:  
    The event will  automatically start  every 2hrs(2:00.. 4:00.. 6:00..8:00...)
  24. Upvote
    Mumbles reacted to jaBote in Mapflag via script   
    As far as I know, no mapflags in db/re or pre-re/map_zone_db.conf allow a Group Level override. Only overrides possible there are in the disabled_commands section of a map zone.
     
    Mapflags set are absolute since they don't usually accept another extra argument than off, which disables it (the exceptions are further configuration parameters for special mapflags like bexp, jexp, pvp_nightmaredrop and so). Then the nowarp mapflag, when set, doesn't allow group levels overrides just as expected, so I see no problem there.
     
    After a quick glance in src/map/npc.c @ npc_parse_mapflag function, the only mapflag which allows GM override level is nocommand.
     
    If you would like to bypass nowarp and nowarpto restrictions then you should proceed as always: giving the any_warp permission.
     
    Hope I helped.
  25. Upvote
    Mumbles reacted to Mikado in About the new MOTD.txt   
    If you use the message command two times, it will display two different lines.
    message strcharinfo(0),"First line.";message strcharinfo(0),"Second Line."; I don't know if it's the finest way of doing it, but works.
×
×
  • Create New...

Important Information

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