GmOcean
Community Contributors-
Content Count
371 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by GmOcean
-
So, based on what you posted it should look like this: OnClock2100:OnClock2200:OnClock2300:OnClock0000:OnClock0100:OnClock0200:OnClock0300:OnClock0400:OnClock0500:OnClock0600:OnClock0700:.Rounds = 5;callsub iRound5;end;OnClock0800:OnClock1000:OnClock1200:OnClock1400:OnClock1600:OnClock1800:OnClock2000: set .Rounds,10;iRound5: set .ResetCounter,.ResetCounter+1; set .EventON,1; set .Timer,1; set .Wait,1; announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue; announce "The Event is being held in Prontera.",bc_all | bc_blue; setnpctimer 0; initnpctimer; end;
-
Custom headgear problem 2014-10-22b Client
GmOcean replied to Aeromesi's question in Client-Side Support
I also agree, you can't use items above 32767 yet in Herc without making a few src modifications first. -
I updated my post so it displays the proper cost. Also, BaseLevel and JobLevel are constant variables, that will always have a set value. These can be found in const.txt located in your db folder.
-
prontera,150,191,5, script Healer 641,{ mes "[^0000FF Healer ^000000]"; mes "Would you like to be healed?"; mes "^FF0000 *Note - It costs "+ (((BaseLevel + JobLevel) / 2) * 5) +" zeny to get healed.* ^000000"; if (select("Yea please.:No thank you.") == 2) { close;}if (Zeny < (((BaseLevel + JobLevel) / 2) * 5) && BaseLevel > 50) { mes "I'm sorry but you don't have enough zeny.";}if (BaseLevel > 50) { Zeny -= (((BaseLevel + JobLevel) / 2) * 5);}percentheal 100,100;close;} O.o that should do it. Though it looks like you went through my topic to get this, glad it was of help somewhat
-
Okay, so 2 suggestions. First, I think we should modify *getinventorylist; to push the equip-slot the item is equipped on rather than just passing 1 (equipped) or 0 (not-equipped). Reason: 1) It'll still be compatible with existing scripts that use a boolean check to see if the item is equipped or not. 2) Currently using existing commands, you'd have to do several more checks + a loop just to confirm that the item in question is equipped on ' X ' slot. 3) It's just more beneficial to do so. Below is a working src code for the changes, but I'm sure someone could write it better D: Second, I think it's about time we got a command for checking cart_inventory. I just don't see why we don't have one O.o; There's just no downside except having 1 extra command in script_commands.txt Again, here's a write-up that's basically a copy+paste of *getinventorylist; (without the equip-slot modifications since equip will just return 0 anyways).
-
It's just letting you know you're using a command that will be removed in the (very)near future. So you should use these commands instead: *setmount {<flag>}; & *checkmount()
-
Updated ~!! - Formatting, and revision suggested to make things simpler. ( Special thanks: Haru ). @Litro - This has been suggested before, but it probably won't be done until I decide to release each script as a separate public release available for download. Which in turn, would create a support/release topic for each one. But I'm holding off on that for now, else people would just continue to download scripts of interest instead of learning them. Even though I post the finished product here, they will end up reading at least 5% of what I wrote, perhaps making them want to learn more D: ( who knows, just wishful thinking xD ). @bidolay145 - While I don't mind helping with something like that, please make a support / request topic with your issue/request. If you have any questions or concerns with the scripts posted here, then those can be addressed within this topic. as a side note, I'll write a tutorial for a script based on just the little information provided. When it's done you can check here for it if no one was able to help you before hand. - Thank you D:
- 40 replies
-
- guides
- scripting support
-
(and 5 more)
Tagged with:
-
Well, if you look closely at the OnBarricadeA/B/C labels, you'll see that I didn't specify the map name for it to check. Therefore it would never delete. Just replace ' mapname ' with the map you spawn the barricades on.
- 8 replies
-
- Barricade
- barricases
- (and 4 more)
-
You would simply just spawn more than 1 monster, each taking up 1 cell of the " wall ". Then, when the last one is killed you remove the wall like you did in your test script. Then if you have multiple walls. You give each wall a different name, and the monsters that are spawned along that wall, have same Event label, just different from the other walls. ( Does that make sense? ) Example: - script Barricade -1,{OnInit: setwall "te_aldecas3",81,228,1,4,6,"christmas_wall_a"; setwall "te_aldecas3",81,232,1,4,6,"christmas_wall_b"; setwall "te_aldecas3",81,234,1,4,6,"crhistmas_wall_c"; for( .@i = 0; .@i < 4; .@i++ ){ monster "te_aldecas3",( 81 + .@i ),228, "Barricade", 1905, 1, strnpcinfo(0)+"::OnBarricadeA"; monster "te_aldecas3",( 81 + .@i ),232, "Barricade", 1905, 1, strnpcinfo(0)+"::OnBarricadeB"; monster "te_aldecas3",( 81 + .@i ),234, "Barricade", 1905, 1, strnpcinfo(0)+"::OnBarricadeC"; } monster "te_aldecas3", 81, 236, "Emperium", 2107, 1, strnpcinfo(0)+"::OnEmperiumDead"; end; OnBarricadeA:if( !mobcount(mapname, strnpcinfo(0)+"::OnBarricadeA") ){ delwall "christmas_walla_a";}end;OnBarricadeB:if( !mobcount(mapname, strnpcinfo(0)+"::OnBarricadeB") ){ delwall "christmas_walla_b";}end;OnBarricadeB:if( !mobcount(mapname, strnpcinfo(0)+"::OnBarricadeC") ){ delwall "christmas_walla_c";}end;OnEmperiumDead:monster "te_aldecas3", 81, 236, "SUPER MONSTER", 1002, 1, strnpcinfo(0)+"::OnSuperDead";end;OnSuperDead:dispbottom "All done.";end;}
- 8 replies
-
- Barricade
- barricases
- (and 4 more)
-
You just need to add a variable check at the label when each monster dies: OnBarricade0: ++.barricade[0]; if( .barricade[0] == 6 ){ delwall "conq_RL01"; } dispbottom "There are "+ (6 - .barricade[0]) +" barricades left."; end; Just add checks like that for each wall you design. Same goes for spawning a monster after breaking the emperium: OnEmperium:// spawn monster command here.end;
- 8 replies
-
- Barricade
- barricases
- (and 4 more)
-
The problem is here: if (.frifin$ == 1 && (gettime(4)==3)) { And here: if (.satfin$ == 1 && (gettime(4)==4)) { You're trying to compare a string variable to a number. Just erase the ' $ ' sign, and things should fix itself. Also, you shouldn't be using ' goto ' anymore as the command will soon be removed. Instead use the command: callsub <label>{,<argument>,...<argument>}; Edit: @Offtopic - While I do not remember you (sorry lol) I do remember the script. It allowed users to have a sub-job allowing them to select upto 5 skills from that sub-job and add it to their own skills. Sort of making a hybrid. it was far over powered lol. EDP + Any power hit skill @.@;
-
D: I don't think Annieruru would like to teach here lol, no pay, horrible hours and absolutely 0 benefits !
- 40 replies
-
- guides
- scripting support
-
(and 5 more)
Tagged with:
-
Updated ~!! Added Basic PvP Script under ' Beginner Scripts '. Added Bounty Hunting Script under ' Intermediate Scripts '.
- 40 replies
-
- guides
- scripting support
-
(and 5 more)
Tagged with:
-
Need to have Harmony installed to detect MacAddress afaik.
-
Okay, well looking at your script I see you used the command addrid. Are you using rAthena or Hercules as your emulator? If your using rAthena, than you should be able to go back to the regular switch(select) option instead of doevent. But also while replacing your for(loop) and using addrid as Emistry suggested. If you're using Hercules as your emulator, then I'll have to look around for another solution. Edit: Okay, since you said *doevent, didn't work. Then I think the only option left, without src modifications is a timer using this command: addtimer <ticks>,"NPC::OnLabel"; This should allow you to give each player their own timer, which upon activation you can prompt them with the menu. Can also just put the timer to 1 tick, to make it appear practically instantly.
-
@ Emistry - Hercules, doesn't have addrid by default. But there is another option. Use this command: doevent "<NPC object name>::<event label>"; Since the command will hold off execution until the original script is done, you can loop through everyone making them call the event, and when it's done. Have that label prompt them with the menu options.
-
It is the same, but I don't have an updated diff lol. That's what I was trying to replicate myself @.@;
-
I don't believe that to be your issue, I'll take a good look at it later. Edit: Okay, after looking at your script, I couldn't find anything fundamentally wrong. And it doesn't seem to be the switch(select); since these do work within loops.
-
Without seeing the script that caused this to happen ( if it was even a script ), we will be unable to help you. All I can say from that alone is, you may have a script that runs as soon as a player logs in that attempts to delete a timer that isn't there. But I doubt this is the case since we'd see a debug from the script command. Another guess is it would be src related since the console is failing to parse the timer at this point. Perhaps someone more knowledge-able can assist with this.
-
File Name: check_bound command File Submitter: GmOcean File Submitted: 16 Nov 2014 File Category: Plugins A simple command to check if the player currently has a bound item in their inventory. Thus eliminating the need to use getinventorylist; to do the check. Additionally, you can check for a number of parameters regarding that item. *checkbound(<item_id>{,<bound_type>{,<refine>{,<attribute>{,<card_1>{,<card_2>{,<card_3>{,<card_4>}}}}}}});This command allows you to check whether or not the attached player has the specified bound item in their inventory.Valid bound types are: 1 - Account Bound 2 - Guild Bound 3 - Party Bound 4 - Character BoundOptional Parameters: refine - checks to see if the item is refined to the given number. attribute - whether the item is broken (1) or not (0) card 1,2,3,4 - checks to see if the specified cards are compounded on the item as well. Example: if( checkbound(1205) ){ mes "You have a bound Cutter"; close;} else { mes "You do not have a bound Cutter"; close;} Example 2: if( checkbound(1205, 2) ){ mes "You have a guild_bound Cutter"; close;} else { mes "You don't have the required item."; close;} Example 3: if( checkbound(1205, 2, 7) ){ mes "You have a +7 guild_bound Cutter."; close;} else { mes "You don't have the required item."; close;} Click here to download this file
-
Version v0.2
26 downloads
A simple command to check if the player currently has a bound item in their inventory. Thus eliminating the need to use getinventorylist; to do the check. Additionally, you can check for a number of parameters regarding that item. *checkbound(<item_id>{,<bound_type>{,<refine>{,<attribute>{,<card_1>{,<card_2>{,<card_3>{,<card_4>}}}}}}});This command allows you to check whether or not the attached player has the specified bound item in their inventory.Valid bound types are: 1 - Account Bound 2 - Guild Bound 3 - Party Bound 4 - Character BoundOptional Parameters: refine - checks to see if the item is refined to the given number. attribute - whether the item is broken (1) or not (0) card 1,2,3,4 - checks to see if the specified cards are compounded on the item as well. Example: if( checkbound(1205) ){ mes "You have a bound Cutter"; close;} else { mes "You do not have a bound Cutter"; close;} Example 2: if( checkbound(1205, 2) ){ mes "You have a guild_bound Cutter"; close;} else { mes "You don't have the required item."; close;} Example 3: if( checkbound(1205, 2, 7) ){ mes "You have a +7 guild_bound Cutter."; close;} else { mes "You don't have the required item."; close;} -
[Request Support] Player Customized Quest Script + SQL Track [ALMOST COMPLETE]
GmOcean replied to anticlimax18's question in Script Requests
Well, I wrote a variation of your script, but it's not 100% complete, nor am I fully positive it's working 100%, but script_checker says there is no errors in the syntax. Perhaps, you can use it for a comparison to your code, and find the results you need: prontera,164,167,0 script Quest Master 857,{mes ( .@npc$ = "[^FF0000 Quest Master ^000000" );mes "[^00FF00 Generate Requirement ^000000]";mes ""+ getitemname(.currency[0]) +" x "+ .currency[1] +"";mes "[^0000FF Taking Requirement ^000000]";mes ""+ getitemname(.currency[2]) +" x "+ .currency[3] +"";next;mes .@npc$;switch( select( "[Turn in all quests]", "[Obtain Quest]", "[Abandon Quest]", "[Generate Quests]"+ ( (getgmlevel() >= 99)?":[Generate Random Quests]" : "" )+"" ) ){ case 1: for( .@i = 0; .@i < getarraysize( @quests$ ); .@i++ ){ explode( .@array$, @quests$[.@i], ":" ); switch( atoi(.@array$[5]) ){ case 1: if( .@array$[4] == .@array$[3] ){ .@quests[.@a] = atoi( .@array$[6] ); .@a++; } break; case 2: case 3: if( countitem( atoi(.@array$[2]) ) == atoi(.@array$[3]) ){ .@quests[.@a] = atoi( .@array$[6] ); .@a++; } break; } } if( !.@quests[0] ){ mes "You don't have any completed quests."; close; } getitem .currency[0], (.currency[1] * getarraysize(.@quests)); for( .@i = 0; .@i < getarraysize( @quests$ ); .@i++ ){ explode( .@array$, @quests[.@i], ":" ); for( .@j = 0; .@j < getarraysize( .@quests ); .@j++ ){ if( .@quests[.@j] == .@array$[6] ){ @quests[.@i] = ""; .@quests$ = .@quests$ + ""+ .@array$[6] +":"; } } } callsub iRedeem, .@quests$; // Updates quests to have a reward so posters can redeem it. mes "All quests have been redeemed."; mes "Come back again, and complete some more."; close; case 2: if( max_active && ( getarraysize(@quests$) >= .max_active ) ){ mes "You can not actively pursue any more quests at the moment."; mes "You need to either complete your current quests or abandoned them."; close; } mes "Only a maximum of "+ .select_limit +" available quests will be listed from a category at a time."; mes "Select a category."; next; mes .@npc$; .@select = select( "[Hunting] - [Random Difficulty]", "[Item Gather] - [Random Difficulty]", "[Cooking] - [Hard Difficulty]"); .@count = query_sql("SELECT * FROM `Paid_Quest` WHERE `TrackID` = '0' AND `type` = '"+ .@select +"'", .@quest_id, .@name$, .@pub_id, .@track_id, .@mob_id, .@itme_id, .@tar_amt, .@type, .@time); if( !.@count ){ mes "There are no quests of this type available at this time."; close; } iQSelectLoop: if( .@count < ( .select_limit ) ){ .@select2 = ( .@count + 1 ); } else { .@select2 = ( .select_limit + 1 ); } .@select = .@select2; while( .@select == .@select2 ){ .@quest_menu$ = ""; .@i = 1; while( .@i < .@select2 ){ .@a = rand( getarraysize(.@name$) ); if( !compare( .@quest_menu$, .@name$[.@a] ) ){ .@quest_menu$ = .@quest_menu$ + .@name$[.@a] +":"; .@quest_select[.@i] = .@a; .@i++; } } .@quest_menu$ = .@quest_menu$ + "[^0000FF More Quests ^000000]"; .@select = select( .@quest_menu$ ); } .@a = .@quest_select[.@select]; mes .@name$[.@a]; switch( .@type[0] ){ case 1: mes "Objective: "+ getmonsterinfo( .@mob_id[.@a], 0 ) +""; mes "Kill amount: "+ .@tar_amt[.@a] +""; break; case 2: case 3: mes "Objective: "+ getitemname( .@item_id[.@a] ) +""; mes ""+ ( (.@type[0] == 2)? "Collect Amount" : "Cook Amount" ) +": "+ .@tar_amt[.@a] +""; break; } mes "----------------------------------"; mes "Do you accept?"; next; if( select( "Yes, I accept", "No, let me choose another" ) == 2 ){ callsub iQSelectLoop; end; } @quests$[getarraysize(@quests$)] = .@name$[.@a] +":"+ .@mob_id[.@a] +":"+ .@item_id[.@a] +":"+ .@tar_amt[.@a] +":"+ 0 +":"+ .@type[0] +":"+ .@quest_id[.@a] +""; query_sql("UPDATE `Paid_Quest` SET(`TrackID`) VALUES('"+ getcharid(0) +"') WHERE `id` = '"+ .@quest_id[.@a] +"'"); mes .@npc$; mes "Quest Accepted."; mes "All quests will be abandoned upon logging out."; close; case 3: mes "Did you want to abandon all your quests, or a specific one?"; next; mes .@npc$; if( select( "One quest", "All quests" ) == 2 ){ @quests$ = ""; mes "All quests have been abandoned."; close; } for( .@i = 0; .@i < getarraysize(@quests$); .@i++ ){ explode( .@array$, @quests$[.@i], ":" ); .@quest_menu$ = .@quest_menu$ + .@array$[0] +":"; } mes "Which quest did you want to abandon?"; next; .@select = select( .@quest_menu$ ); explode( .@array$, @quests$[( .@select - 1 )], ":" ); mes .@array$[0]; switch( .@array$[5] ){ case 1: mes "Objective: "+ getmonsterinfo( .@array$[1], 0 ) +""; mes "Progress: "+ .@array$[4] +" / "+ .@array$[3] +""; break; case 2: case 3: mes "Objective: "+ getitemname( .@array$[2] ) +""; mes "Progress: "+ countitem( .@array$[2] ) +" / "+ .@array$[3] +""; break; } mes "----------------------------------"; mes "Are you sure you want to abandon this quest?"; next; if( select( "Yes, abandon the quest.", "No, I've changed my mind." ) == 2 ){ close; } @quests$[( .@select - 1)] = ""; mes "Quest has been abandoned."; close; case 4: // Only Item Collection quests are available to create as of now. mes "What item did you want to post for a quest?"; input .@item; if( !getitemname( .@item ) == "null" ){ mes "^^FF0000 INVALID ITEM"; close; } mes "How many did you want to request?"; mes "Minimum: 1","Maximum: 1,000"; input .@amt,1,1000; query_sql("INSERT INTO `Paid_Quests` (`name`,`pub_id`,`item_id`,`tar_amt`,`type`,`time`) VALUES('"+ escape_sql("Collection: "+ getitemname(.@item) +"") +"','"+ getcharid(0) +"','"+ .@item +"','"+ .@amt +"','2','"+ gettimetick(2) +"')"); next; mes "Quest, successfully submitted."; close; case 5: // GM only quest generator. end;}iRedeem:explode( .@array$, getarg(0), ":" );for( .@x = 0; .@x < getarraysize( .@array$ ); .@x++ ){ query_sql("UPDATE `Paid_Quests` SET(`reward`) VALUES('1') WHERE `id` = '"+ atoi(.@array$[.@x]) +"'");}return;end;OnInit:// [0] = Item Required to post a quest. | [1] = Amount needed.// [2] = Item Required to accept a quest. | [3] = Amount needed.setarray .currency[0], 501, 5, 502, 1;// Amount of quests to post at a time.// Default: 3.select_limit = 3;// [0] = Start of Food item IDs// [1] = End of Food item IDs.setarray .cook_id[0], 12040, 12100;// Max amount of quests each player can actively pursue at a time.// Default: 3.max_active = 3;end;}// SQL TABLE TO BE USED./*CREATE TABLE `master_main`.`paid_quests` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `pub_id` INT(11) NOT NULL, `TrackID` INT(11) NOT NULL DEFAULT 0, `mob_id` INT(11) NOT NULL DEFAULT 0, `item_id` INT(11) NOT NULL DEFAULT 0, `tar_amt` INT(11) NOT NULL DEFAULT 0, `type` INT(11) NOT NULL DEFAULT 0, `time` BIGINT NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE INDEX `id_UNIQUE` (`id` ASC));*/ *Note - This hasn't been tested. Reason being, I do not want to setup a sql table, add quests and the such to do the testing for this. You can post back errors, you find and I'll will provide support for it, but right now I'm not going to alter my sql schemas*. -
*bump* O.o just want to bring this into light again.
-
I agree with this, especially sc_config. But while we're at it, let's not forget mob_db D: it's been heavily requested by users for quite sometime now.