Jump to content
  • 0

Issue with Stolao's Mining [4.43]


Strand

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   2
  • Joined:  07/01/13
  • Last Seen:  

Hello community!

I just tried the Stolao´s Mining script for my server but I having an issue with the drop of every Deposit.

The function contains the following structure:

Quote

-    script    Mining    -1,{
function MiningSpawn;    function MiningFunc;
OnMineJell:
    MiningSpawn(1,0);
    MiningFunc(0,0,.Pick[0],5,100,rand(1,2),7049,5000,909,2500,909,1250,909,625,909,625,909,625,909,625,909,625,909,625,7126,625);
    end;

The red color represents the ItemID and the green color represents the DropChance as far as the script establishes it:

Quote

//calfunc "MiningFunc",<MinBaseLevel>,<MinMineLvl>,<Min Pick>,<Break Chance>,<Damage Chance>,<Exp>,<ItemID1>,<Get Chance1>{,<ItemID2>,<Get Chance2>.....,<ItemID10>,<Get Chance10>};

Quote

// 6 - ItemID1 - 10
//    Item Id
// 7 - Get Chance1 - 10
//    Chance of Collecting / 10000

 

The problem is, when I try to increase the drop chance of the second item and kill the Jellopy Deposit it just will drop the first item. Even if I swap the drop chance values making the second item have the highest drop chance.

Happens the same if I add high chance values to the rest of the items. It will only recognize the first item of the row.

Any ideas on what can I possibly do to make it work?

Thank you.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   1
  • Joined:  04/22/18
  • Last Seen:  

4 minutes ago, Stolao said:

ya looks like you were right, i went ahead and updated my git, i don't really support this script anymore though since i use an SRC version myself now

All good ? You did an awesome job in this script. Just want to help out at the very least if I could.

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   60
  • Joined:  09/23/17
  • Last Seen:  

@Stolao  would be more helpful than the community; you probably would have gotten a better response by replying to their topic as well

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   2
  • Joined:  07/01/13
  • Last Seen:  

Hello TheDerpySupport,

I already tried by replying to the same topic aswell, but nobody answers.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

The rates should be in descending order. Invert your item 1 and 2.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   2
  • Joined:  07/01/13
  • Last Seen:  

Hello @Capuche

Thanks for responding. 

It did not work either way.

I believe the main resides here:

Quote
for(set .@i,6; .@i < getargcount() - 6 && !.@C; set .@i, .@i + 2 ){
  if(getarg(.@i + 1,0) + MineMaster * (.@i - 5) / 7 > rand(10000))
  getitem getarg(.@i,7049),1; set .@C,1;

But I do not know where to start.

The script is just considering the first item drop chance. It is just ignoring the other 9 items with their respective drop chance.

This is the full script: https://github.com/Stolao/Npc_Release/blob/master/Mining/Mining.txt

Edited by GMHelios
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

for(set .@i,6; .@i < getargcount() - 6 && !.@C; set .@i, .@i + 2 ){
	if ((getarg(.@i + 1,0) + MineMaster * (.@i - 5) / 7) > rand(10000)) {
		getitem getarg(.@i,7049),1;
		set .@C,1;
	}
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   1
  • Joined:  04/22/18
  • Last Seen:  

Hope I am not too late.

for(set .@i,6; .@i < getargcount() && !.@C; set .@i, .@i + 2 ){
	if ((getarg(.@i + 1,0) + MineMaster * (.@i - 5) / 7) > rand(10000)) {
		getitem getarg(.@i,7049),1;
		set .@C,1;
	}
}

Remove the - 6 from the for loop and it work. The reason is that is that it will stop at max value - 6, which will remove the last 6 arguments which then you will only receive stone all the time.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

5 hours ago, funfair91 said:

Hope I am not too late.


for(set .@i,6; .@i < getargcount() && !.@C; set .@i, .@i + 2 ){
	if ((getarg(.@i + 1,0) + MineMaster * (.@i - 5) / 7) > rand(10000)) {
		getitem getarg(.@i,7049),1;
		set .@C,1;
	}
}

Remove the - 6 from the for loop and it work. The reason is that is that it will stop at max value - 6, which will remove the last 6 arguments which then you will only receive stone all the time.

ya looks like you were right, i went ahead and updated my git, i don't really support this script anymore though since i use an SRC version myself now

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

3 minutes ago, funfair91 said:

All good ? You did an awesome job in this script. Just want to help out at the very least if I could.

naw this one is garbage compared to the one I'm running on my server, but its src skill  based so I'm not releasing soon

screenEinherjar055.jpg

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...