Jump to content
  • 0

Awesome fishing system on work.


Lil Troll

Question


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

I revised the whole script and add new flavor on it, I also merge known fishing scripts, refer to this post.

http://rathena.org/board/topic/86736-utility-release-world-of-fishing/#entry219910

 

The script features:

Imitation hope Fishing System (Fishing System Imitating Seal Online)
Version: Ver1.0
Scripter: small salmon (grass0916)
Intro: automatic fishing, fishing and manual modes can freely switch.

[Fishing Meme]: Use automatic fishing, you can set the hook items temporarily stored in the Fishing Box in which Meme, can then be brought out.
[Auto fishing]: props that will be the name and quantity of bait entered, the timer will get caught up props.
[Manual fishing]: fish will shift around, the player must go in another direction the fish back track (using the directional control props).

Note 1: Manually fishing props to reward superior than the automatic fishing. While fishing on the way for some distraction or leave fishing range will stop fishing.
Note 2: Fishing level will affect the fishing speed, reducing fishing failure probability. Fishing rods fishing category will greatly affect the speed, increasing probability of rare props bait.
Note 3: The cold box preset 10 different types of fish store, you can expand by a special pipe cold tank capacity.

--- Fishing Box is the extra added features ---

Auto-Fishing, can freely switch the two modes and Self-Fishing.
[Fishing Box]: Use Self-Fishing, you can set the bait items temporarily stored in the security freezers which can then be brought out.
[Auto-Fishing]: Bait props name and quantity of input, the timing will be made to catch the props.
[Self-Fishing]: The fish will be about offset, players must go to another direction of the fish back to the track (using the directional control props).

Note 1: Self-Fishing props reward superior than the Auto-Fishing. Fishing trip with some of the distractions or to leave the fishing range will stop fishing.
Note 2: Fishing level will affect the fishing speed, to reduce fishing the probability of failure. Types of fishing rods will substantially affect the fishing speed, increasing the rare prop bait probability.
Note 3: Fishing Box default to 10 different types of fish stored by the special pipeline to expand the capacity of the Fishing Box.

Video shows the full features:


Edited by Lil Troll
Link to comment
Share on other sites

14 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Interesting script. Not too difficult to redo, my only concern is how does it know your near water. Because I've failed to see a cellcheck of any sort, nor do i think you can even check for water.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Actually it has a basic ranged detection it do only have certain coordiantes

////////////////////////////////////////////////////////////////
//                                                            //
//                     Fishing Range                          //
//                                                            //
////////////////////////////////////////////////////////////////

ftown,213,198,4    script    Out_Range    139,2,20,{

    set CanFishing, 1 ;
    dispbottom ""+ strcharinfo(0) +": Seems like my rod can reach the fish now." ;

}

ftown,216,201,4    script    In_Range    139,200,200,{
    
    set CanFishing, 0 ;
    dispbottom ""+ strcharinfo(0) +": Seems like my rod cant reach the fish." ;

}

Room for improvement specially in range detection is much appriciated! :D

 

For additional reference, here is the original script:

The link of download.
 

https://sites.google.com/site/grasscomputernote/ro-script/2012-08-15/Fishing%20System%20Imitating%20Seal%20Online.txt?attredirects=0&d=1

The script:

////////////////////////////////////////////////////////////////
//                                                            //
// ラ辨敞辰╰参 (Fishing System Imitating Seal Online)      //
//                                                            //
// セ: Ver1.0                                               //
//                                                            //
// : 翫辰 (grass0916)                                   //
//                                                            //
// 竲セ虏ざ: Τ笆敞辰, 籔も笆敞辰ㄢ贺家Αパち传     //
//                                                            //
//           玂耫: ㄏノ笆敞辰, 砞﹚盢筥珇     //
//                   既玂耫讽い, ぇ烩   //
//                                                            //
//           笆敞辰: 盢璶Θ辰荤笵ㄣ嘿籔计秖块,    //
//                     ﹚穦眔敞ㄓ笵ㄣ               //
//                                                            //
//           も笆敞辰: 辰ㄠ穦オ熬簿, 產ゲ斗┕よ   //
//                     盢辰┰瓂笵(ㄏノよ北笵ㄣ)       //
//                                                            //
// 称爹1: も笆敞辰笵ㄣ贱纘ゑ笆敞辰ㄓ纔禫              //
//        敞辰硚い琘ㄇだみㄆ薄┪瞒秨敞辰絛瞅穦氨ゎ敞辰//
//                                                            //
// 称爹2: 敞辰单穦紇臫敞辰硉搭ぶ敞辰ア毖诀瞯          //
//        敞辰贺摸穦碩紇臫敞辰硉糤祡Τ笵ㄣ筥诀瞯//
//                                                            //
// 称爹3: 玂絚箇砞 10贺贺摸辰砯, 虑パ疭恨笵   //
//        耎玂絚甧秖                                  //
//                                                            //
// --- 玂耫琌肂穝糤疭︹ ---                             //
//                                                            //
////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////
//                                                            //
// SQL 砞﹚,  main 磅︽                                     //
//                                                            //
//    CREATE TABLE `fishingbox` (                             //
//    `charID` INT( 11 ) NOT NULL ,                           //
//    `itemID` INT( 11 ) NOT NULL ,                           //
//    `itemcount` INT( 11 ) NOT NULL DEFAULT '0'              //
//    ) ENGINE = MYISAM COMMENT = '敞辰玂耫_Design Salmon'; //
//                                                            //
////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////
//                                                            //
//                          跑计砞﹚                          //
//                                                            //
////////////////////////////////////////////////////////////////

-	script	Fishsing_Variable	-1,{

	OnInit:
		// ňゎ岿, 皚﹍て
		deletearray $FishingReward ; deletearray $FishingRewardSP1 ; deletearray $FishingRewardSP2 ; deletearray $FishingRewardSP3 ; deletearray $FishingEquipSpeed ; deletearray $FishingEquipItem ; deletearray $FishingEquipExp ; deletearray $FishingExpMax ; deletearray $FishingLevelName$ ; deletearray $FishingLevelItem ; deletearray $FishingBoxLevel ; deletearray $FishingBoxLevelUpItemCount ;

		// 敞辰珇膀セ诀瞯 ( n/100% )
		set $FishingItemRate, 3000 ;
		// 敞辰莉眔贱纘 ( 炊硄笵ㄣ )
		setarray $FishingReward[0], 579, 624 ;

		// 敞辰莉眔贱纘 ( 祡ΤI笵ㄣ )
		setarray $FishingRewardSP1[0], 7327, 7076 ;
		// 祡ΤI珇膀セ诀瞯 ( n/100% )
		set $FishingItemSP1Rate, 60 ;

		// 敞辰莉眔贱纘 ( 祡ΤII笵ㄣ )
		setarray $FishingRewardSP2[0], 7300, 7052 ;
		// 祡ΤII珇膀セ诀瞯 ( n/100% )
		set $FishingItemSP2Rate, 30 ;

		// 敞辰莉眔贱纘 ( 祡ΤIII笵ㄣ )
		setarray $FishingRewardSP3[0], 7444 ;
		// 祡ΤIII珇膀セ诀瞯 ( n/100% )
		set $FishingItemSP3Rate, 10 ;

		// 敞肂硉Θ ( 虫: ms )
		setarray $FishingEquipSpeed[0], 0, 100, 200 ;
		// 敞珇诀瞯Θ, 紇臫祡Τ笵ㄣ诀瞯 ( n% )
		setarray $FishingEquipItem[0], 100, 103, 106 ;
		// 敞敞辰竒喷Θ ( +n )
		setarray $FishingEquipExp[0], 0, 0, 1 ;

		// 敞辰м竒喷
		setarray $FishingExpMax[0], 100, 150, 250, 400, 600, 850, 1150, 1500, 1900, 2500, 999999 ;
		// 敞辰单嘿
		setarray $FishingLevelName$[0], "辰猫", "穝も隔I", "穝も隔II", "穝も隔III", "刚ōもI", "刚ōもII", "刚ōもIII", "敞辰蔼もI", "敞辰蔼もII", "敞辰蔼もIII", "敞辰ぱ" ;
		// 敞辰单珇诀瞯ど, 搭ぶア毖诀瞯, ぃ紇臫祡Τ笵ㄣ诀瞯 ( n/100% )
		setarray $FishingLevelItem[0], 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500 ;

		// 敞辰Ω丁 ( 虫: ms )
		set .@FishingTime, 30000 ;
		// 敞辰瓜盎计 ( 虫: pic )
		set $FishingBmp, 12 ;

		// 敞辰瓜郎 (郎挡Юゲ斗计絪腹 1~END)
		set $FishingPicName$, "fishing_" ;
		// 敞辰瓜穝 - ︽ぃ惠э
		set $FishingPicPer, .@FishingTime / $FishingBmp ;

		// も笆敞辰秈︽丁 ( 虫: ms )
		set $FishingTime, 15000 ;
		// 熬簿硉 ( 虫: ms )
		set $FishingFloatTime, 100 ;
		// も笆敞辰贱纘笆敞辰n
		set $FishingRewardRate, 5 ;

		// 敞辰玂耫辰砯贺秖膀セ
		set $FishingBoxLimit, 10 ;
		// 敞辰玂耫单紇臫玂耫计 ( n/单 )
		setarray $FishingBoxLevel, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ;
		// 敞辰玂耫どゲ斗笵ㄣ
		set $FishingBoxLevelUpItem, 579 ;
		// 敞辰玂耫どゲ斗笵ㄣ计秖
		setarray $FishingBoxLevelUpItemCount, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 ;

}

////////////////////////////////////////////////////////////////
//                                                            //
//                          辰竤絛瞅                          //
//                                                            //
////////////////////////////////////////////////////////////////

summer,56,96,4	script	Out_Range	139,2,20,{

	set CanFishing, 1 ;
	dispbottom "硂柑Τ辰竤瑈笆, 琌続敞辰よ" ;

}

summer,56,96,4	script	In_Range	139,200,200,{

	set CanFishing, 0 ;

}

////////////////////////////////////////////////////////////////
//                                                            //
//                          敞辰恨瞶                          //
//                                                            //
////////////////////////////////////////////////////////////////

summer,65,93,4	script	翫辰敞辰恨瞶	560,{

	// 材Ω敞辰, 箇砞Θ笆敞辰
	if ( FishingMode$ == "" ) set FishingMode$, "笆敞辰" ;

	set $NPC_Fishing$, "[翫辰敞辰恨瞶]" ;
	switch( select( "^006633敞辰м聅凝^000000", "^ff6600潦禦敞^000000", "^cc0000敞辰家Αち传, 讽玡 [" + FishingMode$ + "]^000000", "^3333ff玂耫ど^000000" ) ) {
		case 1:
			callfunc "Fishing_Level" ;
			close ;

		case 2:
			callshop "Fishing_Equip" ;
			close ;

		case 3:
			if ( FishingMode$ == "も笆敞辰" ) set FishingMode$, "笆敞辰" ;
			else set FishingMode$, "も笆敞辰" ;

			dispbottom "敞辰家Αち传Θ" ;
			close ;

		case 4:
			callfunc "Fishing_Box_Level" ;
			close ;
	} // switch

}

////////////////////////////////////////////////////////////////
//                                                            //
//                         敞辰ㄧΑ                         //
//                                                            //
////////////////////////////////////////////////////////////////

function	script	LetFishing	{

	// 敞辰秈︽い, ぃ狡
	if ( FishingOn ) close ;

	// 笆敞辰秨闽秨币
	set FishingOn, 1 ;

	// 材Ω敞辰, 箇砞Θ笆敞辰
	if ( FishingMode$ == "" ) set FishingMode$, "笆敞辰" ;

	set .@Fisher$, ""+strcharinfo(0)+"" ; // 產嘿既纗
	dispbottom .@Fisher$ + " : 赣ぐ或讽辰荤㎡ ?" ;
	input .@item_type$ ;
	if ( CanFishing )
		if ( countitem( .@item_type$ ) ) {
			dispbottom .@Fisher$ + " : 赣碭 " + .@item_type$ + " 辰荤㎡ ?" ;
			input .@item_count ;
			if ( .@item_count == 0 ) end ;
			else if ( countitem( .@item_type$ ) >= .@item_count ) {
				dispbottom .@Fisher$ + " : ㄏノ " + .@item_count + "  " + .@item_type$ + " ㄓ敞辰舘 !" ;
				sleep2 1000 ;
				unittalk getcharid( 3, .@Fisher$ ), "敞辰秨﹍舘 !!" ;

				// Auto_Fishing - ㄧ计肚: 產嘿辰荤辰荤计秖
				if ( FishingMode$ == "笆敞辰" )
					callfunc "Auto_Fishing", .@Fisher$, .@item_type$, .@item_count ;
				// Self_Fishing - ㄧ计肚: 產嘿辰荤辰荤计秖
				else if ( FishingMode$ == "も笆敞辰" )
					callfunc "Self_Fishing", .@Fisher$, .@item_type$, .@item_count ;
			} // else if
			else
				dispbottom .@Fisher$ + " : 钩⊿Τ硂或 " + .@item_type$ + " 瑿 ..." ;
		} // if
		else
			dispbottom .@Fisher$ + " : иōΤ硂贺狥﹁盾 ...?" ;
	else
		dispbottom "硂柑セ⊿Τ辰竤 ..." ;

	cutin "space", 0 ;

	// 笆敞辰秨闽闽超
	set FishingOn, 0 ;
	close ;

}

////////////////////////////////////////////////////////////////
//                                                            //
//                          笆敞辰                          //
//                                                            //
////////////////////////////////////////////////////////////////

function	script	Auto_Fishing	{

	set .@temp_total_count, countitem( getarg(1) ) ; // 既ヘ玡局Τ赣笵ㄣ┮Τ计秖 (ňゎ敞辰筁祘い辰荤メ斌穝糤)

	for ( set .@i, getarg(2) ; .@i > 0  ; set .@i, .@i - 1 ) {
		dispbottom "瞷辰荤 " + getarg(1) + " 临逞 "+ ( .@i - 1 ) + "   [ 敞辰单: " + FishingLevel + ", 敞辰竒喷: " + FishingNowExp + " / " + $FishingExpMax[ FishingLevel ] + " ]" ;
		delitem getarg(1), 1 ;
		set .@temp_total_count, .@temp_total_count - 1 ;
		if ( .@temp_total_count != countitem( getarg(1) ) ) {
			dispbottom "盡み敞辰临ㄤㄆ薄, 硂妓琌ぃ癸 !!" ;
			return ;
		} // if
		if ( callfunc( "Fishing_Waiting" ) ) {
			// 笵ㄣ眔
			callfunc "Auto_Fishing_Reward" ;
			// 敞辰竒喷仓縩
			callfunc "Fishing_Exp";
		} // if
		else
			return ;
	} // for

	dispbottom getarg(0) + ": ǒ璚, 伦Μ !! 辰荤竒ノ" ;

	return ;

}

function	script	Fishing_Waiting	{

	for ( set .@i, 1 ; .@i <= $FishingBmp ; set .@i, .@i + 1 ) {
		if ( !CanFishing ) {
			dispbottom "盡み敞辰临ㄤㄆ薄, 硂妓琌ぃ癸 !!" ;
			return 0 ;
		} // if
		cutin $FishingPicName$ + .@i, 1 ;
		sleep2 $FishingPicPer - $FishingEquipSpeed[ FishingEquip - 1 ] ;
	} // for

	return 1 ;

}

////////////////////////////////////////////////////////////////
//                                                            //
//                          も笆敞辰                          //
//                                                            //
////////////////////////////////////////////////////////////////

function	script	Self_Fishing	{

	set .@temp_total_count, countitem( getarg(1) ) ; // 既ヘ玡局Τ赣笵ㄣ┮Τ计秖 (ňゎ敞辰筁祘い辰荤メ斌穝糤)

	for ( set .@i, getarg(2) ; .@i > 0  ; set .@i, .@i - 1 ) {
		dispbottom "瞷辰荤 " + getarg(1) + " 临逞 "+ ( .@i - 1 ) + "   [ 敞辰单: " + FishingLevel + ", 敞辰竒喷: " + FishingNowExp + " / " + $FishingExpMax[ FishingLevel ] + " ]" ;
		delitem getarg(1), 1 ;
		set .@temp_total_count, .@temp_total_count - 1 ;
		if ( .@temp_total_count != countitem( getarg(1) ) ) {
			dispbottom "盡み敞辰临ㄤㄆ薄, 硂妓琌ぃ癸 !!" ;
			return ;
		} // if

		// も笆敞辰秨闽秨币
		set SelfFishingOn, 1 ;
		// 敞辰癬ヱ熬簿跑计 (オ璽, タ)
		set FishingCenter, $FishingBmp / 2 ;

		for ( set .@time, 0 ; SelfFishingOn && .@time < $FishingTime ; set .@time, .@time + $FishingFloatTime ) {
			// オ繦诀熬簿
			set FishingCenter, FishingCenter + rand( -1, 1 ) ;

			// 牟窱娩, 敞辰ア毖
			if ( FishingCenter <= 0 || FishingCenter > $FishingBmp )
				set SelfFishingOn, 0 ;
			// 敞辰瓜ち传
			else
				cutin $FishingPicName$ + FishingCenter, 1 ;

			// 熬簿硉 ( 虫: ms )
			sleep2 $FishingFloatTime ;
		} // for

		// 敞辰Θ
		if ( SelfFishingOn ) {
			specialeffect2 610 ;
			// 笵ㄣ眔
			callfunc "Self_Fishing_Reward" ;
			// 敞辰竒喷仓縩
			callfunc "Fishing_Exp";
		} // if
		// 敞辰辅
		else
			specialeffect2 611 ;

		if ( .@i != 1 ) {
			dispbottom "盢秨﹍, 叫非称 !" ;
			sleep2 5000 ;
		} // if

		// も笆敞辰秨闽闽超
		set SelfFishingOn, 0 ;
	} // for

	dispbottom getarg(0) + " : ǒ璚, 伦Μ !! 辰荤竒ノ" ;

	return ;

}

////////////////////////////////////////////////////////////////
//                                                            //
//                          敞辰贱纘                          //
//                                                            //
////////////////////////////////////////////////////////////////

function	script	Auto_Fishing_Reward	{

	set .@probability, rand( 1, 10000 ) ;
	if ( .@probability < ( $FishingItemRate + $FishingLevelItem[ FishingLevel ] ) * $FishingEquipItem[ FishingEquip - 1 ] / 100 ) {
		specialeffect2 610 ;

		// 诀瞯だ皌笵ㄣ
		if ( .@probability < $FishingItemSP3Rate )
			set .@Reward, $FishingRewardSP3[ rand( 0, getarraysize( $FishingRewardSP3 ) - 1 ) ] ;
		else if ( .@probability < $FishingItemSP3Rate + FishingItemSP2Rate )
			set .@Reward, $FishingRewardSP2[ rand( 0, getarraysize( $FishingRewardSP2 ) - 1 ) ] ;
		else if ( .@probability < $FishingItemSP3Rate + FishingItemSP2Rate + FishingItemSP1Rate )
			set .@Reward, $FishingRewardSP1[ rand( 0, getarraysize( $FishingRewardSP1 ) - 1 ) ] ;
		else
			set .@Reward, $FishingReward[ rand( 0, getarraysize( $FishingReward ) - 1 ) ] ;

		// ゼㄏノ玂絚, 钡莉笵ㄣ
		if ( !FishingBoxOn )
			getitem .@Reward, 1 ;
		// ㄏノ玂絚, 笵ㄣ既 ( 20贺摸辰砯), 肚: 贱纘笵ㄣ珇絪腹
		else
			callfunc "Fishing_Box_Save", .@Reward ;
	} // if
	// 敞辰辅
	else
		specialeffect2 611 ;

	return ;

}

function	script	Self_Fishing_Reward	{

	set .@probability, rand( 1, 10000 ) ;

	// 诀瞯だ皌笵ㄣ
	if ( .@probability < $FishingItemSP3Rate * $FishingRewardRate )
		set .@Reward, $FishingRewardSP3[ rand( 0, getarraysize( $FishingRewardSP3 ) - 1 ) ] ;
	else if ( .@probability < $FishingItemSP3Rate * $FishingRewardRate + FishingItemSP2Rate * $FishingRewardRate )
		set .@Reward, $FishingRewardSP2[ rand( 0, getarraysize( $FishingRewardSP2 ) - 1 ) ] ;
	else if ( .@probability < $FishingItemSP3Rate * $FishingRewardRate + FishingItemSP2Rate * $FishingRewardRate + FishingItemSP1Rate * $FishingRewardRate )
		set .@Reward, $FishingRewardSP1[ rand( 0, getarraysize( $FishingRewardSP1 ) - 1 ) ] ;
	else
		set .@Reward, $FishingReward[ rand( 0, getarraysize( $FishingReward ) - 1 ) ] ;

	getitem .@Reward, 1 ;

	return ;

}

////////////////////////////////////////////////////////////////
//                                                            //
//                         敞辰竒喷                         //
//                                                            //
////////////////////////////////////////////////////////////////

function	script	Fishing_Exp	{

	set FishingNowExp, FishingNowExp + 1 + $FishingEquipExp[ FishingEquip - 1 ] ;

	if ( FishingNowExp >= $FishingExpMax[ FishingLevel ] ) {
		set FishingLevel, FishingLevel + 1 ;
		set FishingNowExp, 0 ;
		dispbottom "敞辰单矗ど " + FishingLevel + "" ;
		specialeffect2 410 ;
	} // if

	return ;

}

function	script	Fishing_Level	{

	set FishingExpMax, $FishingExpMax[ FishingLevel ] ;

	mes $NPC_Fishing$ ;
	mes "敞辰单 : 单 " + FishingLevel + " - ^ff0000" + $FishingLevelName$[ FishingLevel ] + "^000000" ;
	mes "ヘ玡竒喷 : " + FishingNowExp + " / " + FishingExpMax ;

	return ;

}

////////////////////////////////////////////////////////////////
//                                                            //
//                         敞辰玂耫                         //
//                                                            //
////////////////////////////////////////////////////////////////

function	script	Fishing_Box_Save	{

	query_sql "SELECT COUNT(`charID`) FROM `fishingbox` WHERE `charID` = " + getcharid(0), .@total ;

	// 狦赣笵ㄣ竒玂耫 (穝)
	if ( callfunc( "Fishing_Box_Save_Check", getarg(0), .@tempItemcount ) )
		query_sql "UPDATE `fishingbox` SET `itemcount` = " + ( .@tempItemcount + 1 ) + " WHERE `charID` = " + getcharid(0) + " AND `itemID` = " + getarg(0) ;
	// 珇临ぃ玂耫い (穝糤)
	else
		// 狦玂耫禬筁 ''兜珇, 盢礚猭, э钡ō
		if ( .@total >= $FishingBoxLimit )
			getitem getarg(0), 1 ;
		// 狦玂絚临 ''兜珇ず, 
		else
			query_sql "INSERT INTO `main`.`fishingbox` ( `charID`, `itemID`, `itemcount` ) VALUES ( " + getcharid(0) + ", " + getarg(0) + ", " + 1 + " )" ;

	return ;
}

function	script	Fishing_Box_Save_Check	{

	query_sql "SELECT `itemID`, `itemcount` FROM `fishingbox` WHERE `charID` = " + getcharid(0), .@tempItemID, .@tempItemcount ;

	for ( set .@i, 0 ; .@i < getarraysize( .@tempItemID ) ; set .@i, .@i + 1 )
		if ( .@tempItemID[ .@i ] == getarg(0) ) {
			set getarg(1), .@tempItemcount[ .@i ] ;
			return 1 ;
		} // if

	return 0 ;

}

function	script	Fishing_Box_Load	{

	set .@Fishing_Box_Name$, "["+strcharinfo(0)+"  玂耫]" ;
	query_sql "SELECT `itemID`, `itemcount` FROM `fishingbox` WHERE `charID` = " + getcharid(0), .@tempItemID, .@tempItemcount ;

	mes .@Fishing_Box_Name$ ;
	mes "玂耫单: " + FishingBoxLevel + " 单" ;
	mes "玂耫ノ计: " + ( $FishingBoxLimit + FishingBoxLevel ) + " " ;
	next ;
	callfunc( "Fishing_Box_Load_Process", 0, .@tempItemID, .@tempItemcount, .@select ) ;
	if ( .@select != 255 ) {
		mes .@Fishing_Box_Name$ ;
		mes "璶烩ぶ " + getitemname( .@tempItemID[ .@select - 1 ] ) + " ?" ;
		mes "玂耫讽いΤ " + .@tempItemcount[ .@select - 1 ] + " " ;
		mes " " ;
		mes "^ff0000 --- 牡 !! Warning !! ---" ;
		mes " 叫痙種眤璽秖 !!" ;
		mes " 烩禬璽秖, 笵ㄣ盢穦砆防^000000" ;
		next ;
		input .@count ;
		if ( .@count > 0 && .@count <= .@tempItemcount[ .@select - 1 ] ) {
			query_sql "UPDATE `fishingbox` SET `itemcount` = " + ( .@tempItemcount[ .@select - 1 ] - .@count ) + " WHERE `charID` = " + getcharid(0) + " AND `itemID` = " + .@tempItemID[ .@select - 1 ] ;
			getitem .@tempItemID[ .@select - 1 ], .@count ;

			// 狦笵ㄣ砆烩, 埃赣掸戈
			if ( ( .@tempItemcount[ .@select - 1 ] - .@count ) == 0 )
				query_sql "DELETE FROM `fishingbox` WHERE `fishingbox`.`charID` = " + getcharid(0) + " AND `fishingbox`.`itemID` = " + .@tempItemID[ .@select - 1 ] ;
		} // if
		else {
			mes .@Fishing_Box_Name$ ;
			mes "计秖ぃ癸翅 !" ;
		} // else
	} // if 
	return ;

}

function	script	Fishing_Box_Load_Process	{

	set .@p, getarg(0) ;
	copyarray .@temp_ID, getarg(1), getarraysize( getarg(1) ) ;
	copyarray .@temp_count, getarg(2), getarraysize( getarg(2) ) ;

	set getarg(3), prompt( .@temp_ID[ .@p ] ? getitemname( .@temp_ID[ .@p ] ) + " Τ ^ff0000" + .@temp_count[ .@p ] + "^000000 " : "", .@temp_ID[ .@p+1 ] ? getitemname( .@temp_ID[ .@p+1 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+1 ] + "^000000 " : "", .@temp_ID[ .@p+2 ] ? getitemname( .@temp_ID[ .@p+2 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+2 ] + "^000000 " : "", .@temp_ID[ .@p+3 ] ? getitemname( .@temp_ID[ .@p+3 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+3 ] + "^000000 " : "", .@temp_ID[ .@p+4 ] ? getitemname( .@temp_ID[ .@p+4 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+4 ] + "^000000 " : "", .@temp_ID[ .@p+5 ] ? getitemname( .@temp_ID[ .@p+5 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+5 ] + "^000000 " : "", .@temp_ID[ .@p+6 ] ? getitemname( .@temp_ID[ .@p+6 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+6 ] + "^000000 " : "", .@temp_ID[ .@p+7 ] ? getitemname( .@temp_ID[ .@p+7 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+7 ] + "^000000 " : "", .@temp_ID[ .@p+8 ] ? getitemname( .@temp_ID[ .@p+8 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+8 ] + "^000000 " : "", .@temp_ID[ .@p+9 ] ? getitemname( .@temp_ID[ .@p+9 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+9 ] + "^000000 " : "", .@temp_ID[ .@p+10 ] ? getitemname( .@temp_ID[ .@p+10 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+10 ] + "^000000 " : "", .@temp_ID[ .@p+11 ] ? getitemname( .@temp_ID[ .@p+11 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+11 ] + "^000000 " : "", .@temp_ID[ .@p+12 ] ? getitemname( .@temp_ID[ .@p+12 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+12 ] + "^000000 " : "", .@temp_ID[ .@p+13 ] ? getitemname( .@temp_ID[ .@p+13 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+13 ] + "^000000 " : "", .@temp_ID[ .@p+14 ] ? getitemname( .@temp_ID[ .@p+14 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+14 ] + "^000000 " : "", .@temp_ID[ .@p+15 ] ? getitemname( .@temp_ID[ .@p+15 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+15 ] + "^000000 " : "", .@temp_ID[ .@p+16 ] ? getitemname( .@temp_ID[ .@p+16 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+16 ] + "^000000 " : "", .@temp_ID[ .@p+17 ] ? getitemname( .@temp_ID[ .@p+17 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+17 ] + "^000000 " : "", .@temp_ID[ .@p+18 ] ? getitemname( .@temp_ID[ .@p+18 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+18 ] + "^000000 " : "", .@temp_ID[ .@p+19 ] ? getitemname( .@temp_ID[ .@p+19 ] ) + " Τ ^ff0000" + .@temp_count[ .@p+19 ] + "^000000 " : "" ) ;

	return getarg(3) ;

}

function	script	Fishing_Box_Menu	{

	switch( select( "聅凝玂耫", FishingBoxOn ? "笆辰砯, 讽玡 ^ff0000秨币^000000" : "笆辰砯, 讽玡 ^ff0000闽超^000000" ) ) {
		case 1:
			callfunc "Fishing_Box_Load" ;
			close ;

		case 2:
			if ( FishingBoxOn ) set FishingBoxOn, 0 ;
			else set FishingBoxOn, 1 ;

			dispbottom "玂耫家Αち传Θ" ;
			close ;
	} // switch

}

function	script	Fishing_Box_Level	{

	mes $NPC_Fishing$ ;
	mes "ヘ玡玂耫单: " + FishingBoxLevel ;
	mes "ど玂耫 惠璶 " + getitemname( $FishingBoxLevelUpItem ) + " " + $FishingBoxLevelUpItemCount[ FishingBoxLevel ] + " " ;
	next ;
	if ( FishingBoxLevel > 10 )
		dispbottom "玂耫单笷程蔼单" ;
	else
		if ( select( "玂耫耎ど", "" ) == 1 ) {
			if ( countitem( $FishingBoxLevelUpItem ) >= $FishingBoxLevelUpItemCount[ FishingBoxLevel ] ) {
				delitem $FishingBoxLevelUpItem, $FishingBoxLevelUpItemCount[ FishingBoxLevel ] ;
				set FishingBoxLevel, FishingBoxLevel + 1 ;
				dispbottom "玂耫耎Θ, 玂耫ヘ玡单: " + FishingBoxLevel ;
				specialeffect2 248 ;
			} // if
			else
				dispbottom "ど非称笵ㄣぃì" ;
		} // if

	return ;

}

////////////////////////////////////////////////////////////////
//                                                            //
//                        敞辰闽砪扳                //
//                                                            //
////////////////////////////////////////////////////////////////

-	shop	Fishing_Equip	-1, 31001:-1, 31002:-1, 31003:-1, 31011:-1, 31021:-1, 31022:-1 ;

Edited by Lil Troll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

ahh i see, i over looked that lol, 200x200 cell range.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Hope you finish the remake, please pm me when its done. Im really excited. Im very grateful! Thanks:D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Interesting script. Not too difficult to redo, my only concern is how does it know your near water. Because I've failed to see a cellcheck of any sort, nor do i think you can even check for water.

 

Have you tried this?

*checkcell ("<map name>",<x>,<y>,<type>);
...
The meaning of the individual types can be confusing, so here's an overview:
  - cell_chkwall/water/cliff
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

ftown,213,198,4    script    Out_Range    139,2,20,{

    set CanFishing, 1 ;
    dispbottom ""+ strcharinfo(0) +": Seems like my rod can reach the fish now." ;

}

ftown,216,201,4    script    In_Range    139,200,200,{
    
    set CanFishing, 0 ;
    dispbottom ""+ strcharinfo(0) +": Seems like my rod cant reach the fish." ;

}

TO:

script     Fishing Range     -1,{
OnInit:
set .map,ftown
setarray .x[0],150,140,130,120,110,100
setarray .y[0],100,110,120,130,140,150
if(!checkcell(.map,.x,.y,cell_checkwater))
dispbottom ""+ strcharinfo(0) +": Seems like my rod can reach the fish now." ;
end;
}

Is this correct?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Yes, but it'd probably be better to use the NPC to check, because if we use checkcell, then we'd also have to setcell as well, because let's face it, no one stands in the water to fish unless your fly fishing. So i'd have to use setcell on land to specify a certain area that can fish which will act like water, but appear as sand. Which does mean skills that require water can be used in that spot.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Then to this?
 

script     Fishing Range     -1,{
OnInit:
set .map,ftown
setarray .x[0],150,140,130,120,110,100
setarray .y[0],100,110,120,130,140,150
if(!checkcell,[setcell(.map,.x,.y,cell_checkwater)]) {
set CanFishing,1;
dispbottom ""+ strcharinfo(0) +": Seems like my rod can reach the fish now." ;
}
end;
}

Is this correct sir?

Still i cant manage to fix the script, till now im trying to rearrange all stuff but i dont have any luck.

Edited by Lil Troll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Not quite. Your close but kinda a bit off.

OnInit:
set .m$,"ftown";
setcell .m$,150,100,100,150,cell_water,1;
end;
//When player uses fishing rod
FishingLabel:
getmapxy(.@m$,.@x,.@y,0);
if( !checkcell(.@m$,.@x,.@y,cell_chkwater) )
 {dispbottom "I need to be closer to the water to fish."; end;}
//Do fishing (because they are close to water).
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Hmm.. What kind of corrections do you need for the script?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

@nanakiwurtz I manage to finish the whole scripts and revised it adding more fresh contents and mixing all good fishing scripts, here is my new topic regarding the scripts, thanks for reply.

http://rathena.org/board/topic/86131-awesome-fishing-system-on-work/#entry218807


I just needed to make a fishing ladder scripts, but dont know how. :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

Does the script working fine? anyone have tried this script yet?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Wrong link?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

@nanakiwurtz, Sorry heres the correct link.

http://rathena.org/board/topic/86213-lil-troll-world-of-fishing/

 

@vlync there are some typos in the script, and i made it worked! also i revised the whole script and now im doing a better one. :) I will post the script after i finished doing and cleaning the whole script. look at my post from the link above. :)

Edited by Lil Troll
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...