Jump to content

GmOcean

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by GmOcean

  1. GmOcean

    color code

    If, you fully read my first post, you'll see that, I mentioned, you must put the black code ( ^000000 ) in front of text that displays black. Colorizing text in rA/eA work like this: mes "This will appear as black because its a new script, so don't worry about leaving colors in the end of scripts."; mes "^FF0000 Everything from now on will be red, until I change the color again."; mes "^000000 Now everything will be black. ^00FF00 And now all green until I change it again. ^000000"; mes "You'll notice that I used the code for black at the end of the above line, thus making all this black. ^0000FF"; close; // I put blue at the end of this script but it doesn't matter because the script ended, a new script will always appear in black.
  2. GmOcean

    color code

    By using color codes before each section that has a different color (this includes if you want text to display as black). mes "- ^FF0000"+ getd(".@pt_"+ .@j3 +"["+ (.@i+1) +"]") +" ^0000FF"+ getitemname(getd(".@pt_"+ .@j3 +"["+ .@i +"]")); That will make your above message display as wanted. ^RRGGBB ex. ^FF0000 = RED ex. ^00FF00 = GREEN ex. ^0000FF = BLUE ex. ^FFFFFF = WHITE ex. ^000000 = BLACK You can also refer to here: Color Codes for a list of other colors, the middle 6 Letters/numbers are what you use.
  3. Don't use: ' .@variables ' when in combination with callsub, it acts the same way as callfunc, meaning you can't pass scope variables (Atleast this has been my issue through testing). Replace those with a normal @variable, and see if that works. Because your problem could be that, your trying to pass the .@variables, and run a sql query, leading those variables to be reset to 0. Thus, it can't check against anything, resulting in your 0 players found.
  4. Okay fixed, a small typo :/, my keyboard sucks, so some times keys just don't register lmao... At anyrate, as long as you have that command installed it should work just like the original.
  5. Well, in this case, all I can deduce from the src, is that it effectively makes it so players can kill one another in the specified cells. The names cell_pk & cell_pk_check are just that in themselves. Names. You can change those names to cell_pvp if you wished too. In fact, it is VERY easy to make custom cells, in rA, the only part that makes custom cells difficult, is whether or not those cells hold any real function. Keeping that in mind, I wrote a few scripts that uses custom cells to determine location, thus eliminating the use of OnTouch NPCs. It is quite effective. All in all, my suggestion is simply change out the word: pk and put your prefered word: pvp
  6. The reason I'm releasing this here, instead of a merger through GIT, is because this script uses a command that is currently not implemented as part of rA, you need to add it yourself. Here is the link: getrandmob() credits to: Akinari At anyrate, here is the edited version of the disguise event to make use of his wonderful command. Edit: Fixed a typo. Disguise(2).txt
  7. Well, i'm not 100% sure since I don't know what errors your getting, in regards to it not working but for both OnCheck and OnClaim try changing sleep 1 INTO sleep2 1 That's what I'm speculating right now at least.
  8. Yay, finally lol. I've been waiting since eA for the src to be standardized with a form of proper documentation, because unless your familiar with the code and know what your looking for, you're going to get lost and fast. It may be just 1 file atm, but it's one step in the right direction. Keep up the good work.
  9. Okay, that helps. Needed that info before I started on a script lol.
  10. Question in regards, to the parameters, how would I enable the command to check ALL monsters in a specific list regardless of level. Would I just simply put 0? getrandmob(0,0)? OR //Is does it check against the level and choose all monsters lower or higher? getrandmob(10,0)? getrandmob(100,0)?
  11. That's odd, i'm not receiving any errors. I'll have another look at it, when I get home from work.
  12. That is a better option, I didn't know it existed. Well, there we go. I'd use Solution #3 as well.
  13. You have 2 options to do this: 1. Create a custom monster, a duplicate really, and change its card drop rate, so that it is influenced by your rates properly. OR 2. Create a custom monster, a duplicate really, and use this script I created a few years back for eAthena. - script CustomDropRates -1,{ OnInit: setarray $@MobOkay_ID[0],1651,1649,1650,1647,1646,1648; //Replace XXXX with the ID's of the monsters you want to be affected by this script. Add more as necessariy. *Note only supports 128 different monsters* set $@MaxDropChance,10;end; OnNPCKillEvent: if( strcharinfo(3) != "mapname" ){end;} for(set @i,0; @i<getarraysize($@MobOkay_ID); set @i,@i+1) {if (killedrid==$@MobOkay_ID[@i]) {callfunc "DropItemRate";}} end; } function script DropItemRate { set @i,0; set @dropID,0; deletearray $@MobDrop_item[0],128; getmobdrops(killedrid); goto iDropItemLoop; iDropItemLoop: set @i,rand(1,$@MaxDropChance); if (@dropID == $@MobDrop_count){dispbottom "Success"; end;} if (@i==1 && $@MobDrop_rate[@dropID]<=1) {getitem $@MobDrop_item[@dropID],1; set @dropID,@dropID+1; goto iDropItemLoop;} if (@i<=$@MaxDropChance){set @dropID,@dropID+1; goto iDropItemLoop;} end; } The setup for this script is easy really. 1. Create a duplicate of your monster, following the guide here: http://rathena.org/wiki/Custom_Mobs 2. After that, go to your new "custom" mob, and change the card droprate ( or any drops you want to be affected by this script ) to 0. 3. Go to my script, and replace, "mapname" with your actual map you want this to work on. 4. Place script in your npc/custom folder, and add it to script_custom.conf 5. Either restart your server OR @reloadscript && @reloadmobdb After that is done, simply test for any issues. Once you've determined there aren't any issues simply remove dispbottom "Success"; From this line: if (@dropID == $@MobDrop_count){dispbottom "Success"; end;} If you have any further questions on how to configure this script further refer to this topic here: http://rathena.org/board/topic/77309-help-custom-drop-rate/?hl=%2Bcustom+%2Bdrop+%2Brate
  14. Ahh, I see. Fixed in my first post. I forgot to use atoi() command, after I updated the script to make it optimized.
  15. GmOcean

    Disguise Npc

    Ahh, now that I looked at the full script yea, that is the case lol, I just saw kName the first time, and made the assumption based on my experience with Mob_db.txt. *Note to self, don't make assumptions lol*
  16. if(Sex){rentitem( rand(28103,28104),TIME );} else {rentitem( rand(28101,28102), TIME );}
  17. GmOcean

    Disguise Npc

    This is due to pulling names from the kList. As in the Korean/Japanese names, not the english ones you see ingame. You'd have to configure the sql query to fit your needs.
  18. I see, sorry, there was a small typo with the script that prevented it from being read properly. It's been updated and now works 100%. I put set instead of setarray. Thus resulting in the script never getting to set the commands. Enjoy~! There's still time to make it for halloween xD
  19. I agree with Cydh's take on this. While it may be longer in the end, at least this way we can have a bit more freedom in how it's handled, for instance, giving prontera different restrictions than other towns, but while making it a town. However, I can see why you don't want to implement this, from my stand point it seems the main reason is backwards compatibility with previous revisions that use a normal mapflag system. My solution to this would be a 2-3month merger time limit. Meaning we implement the system, but keep both operational for 2-3months, allowing server owners to make the switch, then just cut the old wire. Or if that isn't a possibility than, perhaps a conf file switch, 0 new zone system, 1 old mapflag system. At any rate, these are my thoughts on the subject. If I'm missing something crucial into why it was rejected please let me know, because resource issue seems a bit minor in terms of processing the new information. Mainly because the same issue has been said about sql but there have yet to be any major reports regarding performance issues due to sql.
  20. Yea, I don't know why that works. Because I've tried giving all classes the ability to learn 10 additional skills but only through my NPC. Unfortunately it just wouldn't keep them, they'd disappear if I relogged or I used Status Points or Skill Points. But an item that gives all those skills would work.
  21. The issue here is that, unless the Novice's can actually learn those skills through normal means (using skill points) than they won't be able to keep them forever. This is an on-going issue that has yet to be resolved without using some form of continuous loop. I'm sorry, but what your asking for just currently isn't 100% possible. We can make a script that will give those skills (permanently) however, they won't stay forever even if we tried :/
  22. Really? Hmm, let me take another look, I may have missed something a bit more crucial than sleep2.... Edit: I updated my first post. If that doesn't work, than I have no idea why it's not working. But my suspect may be the announce, but they all look fine to me. :/ maybe I'm just tired @.@~!
  23. Well, from my understanding the "MAIN" reason would actually be the way each engine handles DML sessions. I honestly can't say InnoDB lacks in the performance department in regards to large amounts of data. However, it does allow for multiple/parallel DML sessions, of which would be a negative effect on rA. MyISAM will currently limit those DML sessions to run 1 by 1, meaning that the rA system, only has to process one of those at a time to bring forth an update, thus reducing the strain on the server and lag in total. Then when you compare how scripters use SQL to store information, you'll see most of it is called when player performs action X. And since we can have anywhere from 1 - 1000+ players at any given time, you have to take into consideration that each of those players could trigger action X at once. Or in the instance where action X is killing any monster and updating the data to log how many kills... Well, what happens when a 10 wizards in 10 different parties kill 100 monsters each with SG? The answer is you'll have 1,000 indivisual queries to run, now if all 1,000 of those run at once, then rA systems will suffer until they are done and you'll experience lag on your server. But if we were to use MyISAM it'd run all 1,000 1 by 1, meaning the lag experienced should only be that of Internet connection / cpu stats. Again, this is all from my understanding. So I should say that, certain DBs should allow for InnoDB while most that perform at a more frequent rate, like that in my example or saving all the characters, should be handled by MyISAM.
  24. Okay, your issue here is it's using: sleep2 instead of sleep. Here, is the script with it corrected. //########################################################################## //By: ____ _ __ __ ____ _____ # // | \ ___ __ __ _ | | \ \ / /_ _ _ / ___\ / ____| # // | || | / _ \\ \ / /| || | \ \ / /| || \ | || | ___ | (___ # // | || || __/ \ \/ / | || |__ \ \/\/ / | || \| || |___|\ \___ \ # // __|____/__\___|__\__/__|_||____|_____\_/\_/__|_||_|\__|_\_____/_____) | # //|_____________________________________________________________________/ # // # //########################################################################## // # //== Dice Event # // # //########################################################################## // # //== Automatically starts a dice event every 30 minutes of every hour # // # //== Prize- Change 13723 to any item ID you want the winner to recieved # // # // Code Modify by : WordsUp // Credit still for mAisakaTaiga //########################################################################## - script Dice#announcer -1,{ OnInit: disablenpc "prtevent"; hideonnpc "Dice#evnt1"; end; OnClock0100: OnClock0200: OnClock0300: OnClock0400: OnClock0500: OnClock0600: OnClock0700: OnClock0800: OnClock0900: OnClock1000: OnClock1100: OnClock0000: OnClock1300: OnClock1400: OnClock1500: OnClock1600: OnClock1700: OnClock1800: OnClock1900: OnClock2000: OnClock2100: OnClock2200: OnClock2300: OnClock2400: announce "Dice: We are going to have a Dice event.",bc_all,0x00CED1; sleep 10000; announce "Dice: For those who wants to join, Please proceed zhakastia 56, 55 and enter the Warp Portal.",bc_all,0x00CED1; sleep 10000; announce "Dice: After 1 Minute the Portal will close.",bc_all,0x00CED1; sleep 10000; announce "Dice: So please go to zhakastia 56, 55 and enter the Warp Portal now if you want to join.",bc_all,0x00CED1; enablenpc "prtevent"; initnpctimer; end; OnTimer30000: announce "Dice: Last 30 seconds.",bc_map,0x00CED1; sleep 5000; announce "Dice: If you want to join please enter the Warp Portal beside me here zhakastia 56, 55.",bc_all,0x00CED1; end; OnTimer50000: announce "Dice: Last 10 seconds.",bc_all,0x00CED1; end; OnTimer55000: announce "Dice: 5.",bc_all,0x00CED1; end; OnTimer56000: announce "Dice: 4.",bc_all,0x00CED1; end; OnTimer57000: announce "Dice: 3.",bc_all,0x00CED1; end; OnTimer58000: announce "Dice: 2.",bc_all,0x00CED1; end; OnTimer59000: announce "Dice: 1.",bc_all,0x00CED1; end; OnTimer60000: announce "Dice: Time's up.",bc_all,0x00CED1; end; OnTimer61000: disablenpc "prtevent"; donpcevent "Dice#evnt1::OnEnable"; stopnpctimer; end; OnTimer62000: announce "Dice: The next Dice event will begin after 1 Hour",bc_all,0x00CED1; end; } //-------------------------------------------------- zhakastia,52,55,0 warp prtevent 2,2,quiz_01,204,90 //-------------------------------------------------- quiz_01,204,93,6 script Dice#evnt1 715,{ //-------------------------------------------------- mes "[Dice]"; mes "Please tell me your name"; next; input .@name$; if(.@name$ != strcharinfo(0)) { mes "[Dice]"; mes "Are you sure thats your character name?"; close; } mes "[Dice]"; mes "Congrats. You've won."; close2; announce "Dice: We have a winner, "+.@name$+".",bc_map,0x00CED1; getitem 22001,5; warp "zhakastia",97,62; hideonnpc "Dice#evnt1"; end; OnEnable: mapannounce "quiz_01","Dice: We are about to start the Dice event.",bc_map,0x00CED1; sleep 10000; mapannounce "quiz_01","Dice: You MUST GO INSIDE THE BOX, because if you're caught standing on the stairs you'll be automatically disqualified.",bc_map,0x00CED1; sleep 10000; mapannounce "quiz_01","Dice: That's that.. Now let's play...",bc_map,0x00CED1; sleep 10000; goto L_Start; end; L_Start: if(getmapusers("quiz_01") == 1) goto L_Champ; if(getmapusers("quiz_01") == 0) goto L_None; if(getmapusers("quiz_01") > 1) { announce "Dice: . . . . .",0; set $@number, rand(1,4); sleep 10000; announce "Dice: I have a number now. Please go to the box of the number you want.... GO!",bc_map,0x00CED1; sleep 10000; announce "Dice: 5",bc_map,0x00CED1; sleep 5000; announce "Dice: 4",bc_map,0x00CED1; sleep 4000; announce "Dice: 3",bc_map,0x00CED1; sleep 3000; announce "Dice: 2",bc_map,0x00CED1; sleep 2000; announce "Dice: 1",bc_map,0x00CED1; sleep 1000; announce "Dice: Time's up.",bc_map,0x00CED1; donpcevent "evnt#1::OnEnable"; announce "Dice: Winning number "+$@number+".",bc_map,0x00CED1; if(($@number != 1) && ($@number != 2) && ($@number != 3)) goto L_Lose1; if(($@number != 1) && ($@number != 2) && ($@number != 4)) goto L_Lose2; if(($@number != 1) && ($@number != 3) && ($@number != 4)) goto L_Lose3; if(($@number != 2) && ($@number != 3) && ($@number != 4)) goto L_Lose4; end; } L_Lose1: areawarp "quiz_01",183,81,191,59,"zhakastia",97,62; areawarp "quiz_01",195,81,203,59,"zhakastia",97,62; areawarp "quiz_01",207,81,215,59,"zhakastia",97,62; goto L_Start; end; L_Lose2: areawarp "quiz_01",183,81,191,59,"zhakastia",97,62; areawarp "quiz_01",195,81,203,59,"zhakastia",97,62; areawarp "quiz_01",219,81,227,59,"zhakastia",97,62;; goto L_Start; end; L_Lose3: areawarp "quiz_01",183,81,191,59,"zhakastia",97,62; areawarp "quiz_01",207,81,215,59,"zhakastia",97,62; areawarp "quiz_01",219,81,227,59,"zhakastia",97,62; goto L_Start; end; L_Lose4: areawarp "quiz_01",195,81,203,59,"zhakastia",97,62; areawarp "quiz_01",207,81,215,59,"zhakastia",97,62; areawarp "quiz_01",219,81,227,59,"zhakastia",97,62; goto L_Start; end; L_Champ: mapannounce "quiz_01","Dice: Come to me and tell me your name.",bc_map,0x00CED1; hideoffnpc "Dice#evnt1"; end; L_None: announce "No One Entered the Dice Event. Event Closed",bc_map,0x00CED1; hideonnpc "Dice#evnt1"; end; } - script evnt#1 -1,{ OnEnable: areawarp "quiz_01",182,94,228,88,"prontera",156,174; areawarp "quiz_01",185,87,188,82,"prontera",156,174; areawarp "quiz_01",197,87,200,82,"prontera",156,174; areawarp "quiz_01",209,87,212,82,"prontera",156,174; areawarp "quiz_01",221,87,224,82,"prontera",156,174; end; } // -- Mapflags quiz_01 mapflag nowarp quiz_01 mapflag nowarpto quiz_01 mapflag noteleport quiz_01 mapflag nosave quiz_01 mapflag nomemo quiz_01 mapflag nobranch quiz_01 mapflag noloot quiz_01 mapflag noskill quiz_01 mapflag nopenalty
  25. In light of Halloween coming up in a few days, I made this light event. It just needs to be activated by a GM Level 99 or higher by using the command in the script: @undeadmode OR @zombiemode Either one will do the same thing. There are a few parameters to change in the script settings that you can see for yourself. But at either rate, this simple script when activated will count every time a player gets killed by another player. Once 5 people die, 5 zombies (or random undead mob in the array) will spawn in the immediate area. Kill these monsters will disguise the player as a random undead monster. And that's all there is to it. Enjoy. ZombieMode.txt
×
×
  • Create New...