Jump to content

GmOcean

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by GmOcean

  1. Well, there isn't a problem with the script. The command ' resetlvl(1) ' should have resetted everything... So maybe it's something else. Are you sure that the NPC your talking to, to jobchange is the one you listed?
  2. Well, for one, I usually write my scripts under the assumption that the server wont crash (However I do know that it is a possibility). But if were going to assume that the server IS goign to crash... then yes, I would agree, bitmask would be the way to go. Or even just using a string var. Instead of: if ((RED_EGG == 1) && (BLUE_EGG == 1) && (YELLOW_EGG == 1) && (GREEN_EGG == 1) && (PURPLE_EGG == 1) && (BLACK_EGG == 1) && (GOLD_EGG == 1)) { We can use: if( compare(""+EGG_FOUND+"","1234567") ) { do this; } //Were not including the "0" in this since we only need to check for numbers 1-7 And to set this variable, we can do this: if( EGG_FOUND$ == "" ){set EGG_FOUND$,"0";} set EGG_FOUND$, ""+insertchar(EGG_FOUND$,""+getstrlen(EGG_FOUND$),getstrlen(EGG_FOUND$)); The only issue with this is the way we check to see which one is done. Which is why we can either go the easy route, and make them have to find each egg in order. OR we can hardcode each EGG's script to have a certain number for the egg. I'll use the existing ' if () ' command as an example: if( EGG_FOUND$ == "" ){set EGG_FOUND$,"0";} set EGG_FOUND$, ""+insertchar(EGG_FOUND$,""+1,2); //RED_EGG = 1, BLUE_EGG= 2, YELLOW_EGG = 3 set EGG_FOUND$, ""+insertchar(EGG_FOUND$,""+2,3); set EGG_FOUND$, ""+insertchar(EGG_FOUND$,""+3,4); //This would display: "0123" dispbottom EGG_FOUND$; Again, I know this just over-complicates things, but the point to was to comment on his script, and as all if not most of us scripters are, we like to give example to further their abilities. So even if this method is un-ethical, it is a new technique lol.
  3. Oh lol. I just realized you were asking to MAKE this an automated event.. thought you just wanted to change w/e time you had... Umm, hold on... - script KOH#announcer -1,{ OnInit: disablenpc "KingOfHill"; disablenpc "kohfinish"; end; } poring_c02,224,217,5 script KingOfHillEvent 56,{ if ($started == 1) donpcevent "KingOfHill::Onregister"; if (getgmlevel()>=50) goto L_GM; mes "[King Of Hill]"; mes "Only my master can open the race"; L_no: close; L_GM: mes "[King Of Hill]"; mes "Hello master, would you like to start the race?"; menu " - Yes",-,"- No",L_no; close2; OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1600: OnClock2000: cleararray $kohplayers[0],0,getarraysize($kohplayers); announce "King Of Hill Event was started",0; enablenpc "KingOfHill"; enablenpc "kohfinish"; set $started,1; if(playerattached){sleep2 10000;} else {sleep 10000;} announce "Please proceed at the middle of Event Room if you want to participate",0; if(playerattached){sleep2 10000;} else {sleep 10000;} announce "Participants please enter the warp portal now before it will close",0; initnpctimer; end; OnTimer30000: announce "King Of Hill event will start in about 30 seconds",0; sleep2 5000; announce "Hurry and Join the Race",0; end; OnTimer50000: announce "King Of Hill Portal is closed",0; end; OnTimer51000: donpcevent "KOHannouncer::OnEnable"; stopnpctimer; disablenpc "KingOfHill"; end; } //=========================================================== quiz_02,46,375,5 script KingOfHill 811,{ Onregister: if ($started == 1) { mes "Hello would you like to register to join the race?"; next; menu " -Yes",-," -No",L_no; next; mes "Thankyou for registering Mr. " + strcharinfo(0) + ", Have fun!"; if (getarraysize($kohplayers) == 0) setarray $kohplayers[0], getcharid(3); else setarray $kohplayers[getarraysize($kohplayers)], getcharid(3); atcommand "@option 255,0,0"; warp "mjolnir_04",77,304; end; } end; L_no: close; end; } //=========================================================== - script KOHannouncer -1,{ OnEnable: mapannounce "mjolnir_04","The one who will reach the end of the bridge found at the top of the Hill will win the event",16; announce "Get Ready... Countdown will begin at 5",bc_all; sleep2 1000; announce "4",bc_all; sleep2 1000; announce "3",bc_all; sleep2 1000; announce "2",bc_all; sleep2 1000; announce "1",bc_all; sleep2 1000; donpcevent "freezer::OnEvent"; //areawarp "mjolnir_04",72,307,82,300,"mjolnir_04",77,304; announce "GO!",bc_all; end; } mjolnir_04,135,208,5 script Finish Line!::kohfinish 111,2,2,{ if ($started == 0) end; OnTouch: if (.winner == 1) { mes "Sorry we have got a winner."; end; } if (.winner == 0) { mes "You win !!"; set .winner,1; close2; } announce strcharinfo(0)+" is the King of the Hill!!",bc_all; getitem 7720,1; set $started,0; atcommand "@doommap"; atcommand "@kill "+strcharinfo(0); set .winner,0; cleararray $kohplayers[0],0,getarraysize($kohplayers); disablenpc "kohfinish"; end; } mjolnir_04,0,0,0 script freezer 111,2,2,{ OnEvent: for (set .@i, 0; .@i < getarraysize($kohplayers); set .@i, .@i + 1) { attachrid($kohplayers[.@i]); atcommand "@option 0 0 0"; } end; } Edit: I made it auto-start every 4hours starting at Midnight, so 6x a day. Also, it should still be able to start manually if a GM sets it.
  4. GmOcean

    Novice Zone

    It supports all novices up to JobLevel 10. Novice, High Novice, Baby Novice, Baby High Novice (If there is one lol), Super Novice, Baby Super Novice... (Not too sure on the Super Novices, but from my understanding it should).
  5. I personally, don't like the Quest Log lol... I despise the GUI !! I perfer my @quest implemention lol. Though... it is harder to use than the Quest Log T.T; I gotta hand script all details of my quests into it, but it's fine, kinda like a HELP i'm lost give me a walkthrough. Back on topic now.... This script is well written for a first script, but as Annie said, it does use quite a bit of perm-variables to get the job done. My suggestion would be to use: ' .variables ' for all the sub ones until the quest/event is complete then use, your ' #variable ' as the only perm-var. This would save resources. Example: Instead of: set RED_EGG,1; You can use: setd "."+"RED_EGG"+ getcharid(3) +"",1; Granted, it looks messier, it does eliminate the need of perm-vars until the script is actually done. Additionally, you can set them into an array using this method, to effectively eliminate the need of making different named variables. setd "."+"RED_EGG"+ getcharid(0) +"[0]",1; setd "."+"RED_EGG"+ getcharid(0) +"[1]",1; Lastly I don't think anyone noticed this but your script does have a pretty bad typo, preventing the quest from completing... if (EB_COMPLETE == 1) { mes "[bunny]"; mes "Thank you so much for returning my eggs!"; close; end; } && mes "[Lottery Machine]"; mes "Congratulations! Come back soon!"; set #EB_COMPLETE,1; set EB_START,0; close; end; Right now it's setting: ' #EB_COMPLETE ' to 1. But is checking for: ' EB_COMPLETE '. You need either change the other one to a #var as well, or erase the ' # ' in the first var lol. Or they will be able to continually do the quest as far as I see it.
  6. GmOcean

    Novice Zone

    new_1-1,57,114,4 script Novice Zone 123,{ mes "Are you done?"; if(select("Yes:No") == 1){close2; atcommand "@go 0"; end;} else { close; } } - script novice_zone -1,{ OnPCLoadMapEvent: sleep2 1000; while( strcharinfo(3) == "new_1-1" && BaseJob == 0 && JobLevel < 10) {sleep2 1; if( Hp < MaxHp || readparam(Sp) < readparam(MaxSp) ) {percentheal 100,100; specialeffect2 312;} } end; } new_1-1,0,0,0,0 monster Poring 1002,100,5000,5000; new_1-1,0,0,0,0 monster Drops 1113,100,5000,5000; new_1-1,0,0,0,0 monster Poporing 1031,1000,5000,5000; new_1-1 mapflag loadevent new_1-1 mapflag noteleport new_1-1 mapflag monster_noteleport All i did was use the normal new_1-1 map and added spawns, and your NPC, additionally, it'll auto heal novicecs JobLevel 1-9. So it can't be abused.
  7. Change: OnClock0000: to a time that you want....
  8. That, is an old script. It is a txt based one at that. It doesn't store information into a sql_db but instead into $variables. You should update that, with one we have here in rAthena. (That's my suggestion). Or if you refuse, you have the option of requesting that this script be transfered to a sql format, but i am almost positive, that your going to be told to just use an existing sql pvp_ladder script.
  9. Well, if something like that was created for this purpose, the i could see this working. Since it would basically be, users pick for what scripts they would like to have added. The only issue with this is, that it only really benefits future users. I mean obviously those who are voting to have it added, also have the capability to add it manually themselves. Secondly, we'd need a way to determine if it was added, worthy, your Yes/No votes, is good, but how do we figure out if it gets passed? A certain amount of Yes votes overall, or perhaps a certain amount within a ' X day ' period. Though, this would probably result in people making accounts just to vote and ultimately feed their scripts into the svn. At anyrate, it is still upto the dev's on this one. However, there are a few scripts I think SHOULD be added, mainly utlity scripts / pvp ladder / WoE controller scripts. Mainly because they are so commonly requested for in the script_request section. It would also lighten the load in the script_support section for these types of scripts, since the one people use would more commonly be standardized to the one in the svn.
  10. Okay, as of right now, bindatcmd works as intended no problems at all, even the support for parameters is very useful. I would just also like for there to be a variable added as well, so we can figure out which command is used. Now before anyone says anything, YES i do know you specify an event label, which in turn renders this suggestion useless. However, with a variable ( .@atcmd$ ) we can in turn use 1 label for all of our bound-atcmds and determine how to calculate it from there. I for one, would perfer to have this added, mainly because i like to use commands like this dynamically if i could. I had to stop mid-way writting a script to allow the dynamic build of atcmds because, i was unable to figure out which command was used. e.g if i were to use: @test Testing Atcommand it would set the following: .@atcmd$ = test .@atcmd_parameters$[0] = Testing .@atcmd_parameters$[1] = Atcommand - script at_cmd -1,{ OnInit: bindatcmd("test","at_cmd::OnUseCmd"); end; OnUseCmd: dispbottom "You used: @"+ .@atcmd$+" "+ .@atcmd_parameters$[0] + .@atcmd_parameters$[1]; end;
  11. @scenerarykeem - It didn't store the information because it doesn't do that. All that does is create a table. You need a script to update the information. I'm pretty sure there have been atleast 1 or 2 released here, so go download it. As for it appearing in your fluxcp theme, you need to edit that yourself. That's really isn't script_support related content.
  12. I agree with Euphy. Granted I am glad to have seen my disguise event added. But, we shouldn't be adding scripts based on personal request. Because eventually, we'd have quite a few people asking for their works being added.
  13. O.o are you sure.. Well, I haven't tried making this script just suggested a method to store the information to reward all players who have the highest amount.
  14. GmOcean

    UseSkillToPC

    Well, for use, I can only think of this command being used for NPC for hire/ controlled mercenary scripts. Other than that, I have no idea for the use lol.
  15. GmOcean

    UseSkillToPC

    Most of those skills at rely on item stats are usually offensive skills and in this case not affect the server in any real way, since we aren't going to be using the NPC to attack players (Though we could). However, as for stating stats, just add another parameter, with a bit type reading. 1 = Str, 2 = Vit, 4 = Agi, 8 = Int, 16 = Dex, 32 = Luk... And 3 = Str/Vit OR 7 = Str,Vit,Agi... You get the idea. But this would imo effectively allow us to specify which stats we want to be affected.
  16. Are they GM Lvl 99s? Because, if they are, they won't get kicked.
  17. Why not store the information into an array. While attaching each player, set array[0] as the highest. Then when someone has the same amount set it to array[1] and so on. And finally if someone has the highest, delete array and set at [0]. Lastly you can store the amount and players I'd in the same array slot so you can retrieve the information later using explode to reattach and give the prize. This way you wouldn't need to loop through all the players again, just the ones you know are winners.
  18. GmOcean

    @tradepoint

    Oh, so it does have support for parameters. That's good to know. I couldn't find it anywhere in the documentation for it.... Thanks for the small info Emistry.
  19. That's, because your specifying a variable when it's an array. You need to also specify which slot in the array. .@maps$[0]
  20. GmOcean

    @tradepoint

    Well, if they need to start a trade with a person the normal way first, then yes this would need a src edit. However it could be done via script by simulating an @command. But that's assuming you can pass data using bindatcmd. But then again even if you can't, we can always prompt input commands and menus for accept and reject. But, passing parameters with bindatcmd would be a whole lot better and cleaner.
  21. It dissapears when the server restarts, because the information is stored in npcvariables ' .variables '. This is the intended behavior because this script by default only supports a limited number of guilds/parties at one time. The last thing you want, is for, all slots to be filled by guilds who are no longer active. Thus rendering it useless.
  22. Ahh, i see, i didn't know doevent changed to queue. I figured it still opperated as it did before.... *goes back to other scripts and adds saftey measures*
  23. Then, it's probably something rooted further in the script. However, I don't see why this is happening, the script calls: ' doevent ' which will run automatically while still continuing with the current script, which would allow you to close. My only guess is that if this is not the case, then your other character probably isn't being re-attached.
  24. mes "Level- ^009900"+.@lvl+"^000000"; close2; doevent strnpcinfo(0)+"::OnRequest"; end;
  25. @Annieruru, well it looks like i no longer have to write it lol. But yea, using SQL in my scripts is something, i've only recently started to do, mainly because rAthena has made the switch from txt -> sql... SO i figured i might as well, start picking it up as it may be a useful skill in the future. But, I am far more adept in non-sql scripts... since until rA, i was so hell-bent on NOT using sql lol. Even my test servers, were txt based for as long as i can rememeber @.@; Edit: As for cracking your mission board script... if i sat down and stared at it with a pot of coffee, i could probably replicate it, but, it definately wouldn't be as optimized... Your's would be like a chainsaw used to cut down a tree... while i would be using a standard hand axe... it'd get the job done, but definately not as fast or easy lol. @Emitry - Nice find lmao.. Edit2: You know the more i look at this script... the more i realize, that i've already made something like this before, only thing is it didn't have guild support. Only allowed support for parties, and in addition, i used it so party leader could change everyone to the same pallette, <-- no idea why, but requests are requests lol. Edit3: Yea, your script Annie, is alot more complex than this one... this one doesn't really compare...
×
×
  • Create New...