Jump to content
  • 0

Endless Tower Mod


ran0120

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.04
  • Content Count:  25
  • Reputation:   0
  • Joined:  05/18/23
  • Last Seen:  

When a boss monster is killed in my server, a TCG Card (7227) is given to the player. However, boss monsters that is not spawn normally (quest mvps, instances, etc.) isn't giving out the item upon them dying. I feel like starting with the endless tower would be beneficial as it has around 20 boss monsters. I was able to resolve this in the past as the script for the endless tower is separated individually by floors. But checking on the script now, it's different as multiple variables are just used and there's no way to differentiate which floor is which. Is there a mod I can do or insert in the existing script for the TCG Card (7227) to be automatically given to the player when killing a monster inside the endless tower?

Edited by ran0120
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  236
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

Hello,

I am not sure how you achieved that all boss monsters drop TCG, but I guess the reason why it doesn't work for some monsters is that you use a script to achieve this that uses the OnNPCKillEvent label.
The Problem is that this label only gets triggered when a monster gets killed that doesn't already have a label, which most of those you mentioned as not working have.

You could use addmonsterdrop to add the drop manually to all boss monsters, an example would be this:

-	script	ITEM_DROP	FAKE_NPC,{
    OnInit:
		setarray .reward[0], 7227, 10000;

		query_sql("SELECT id FROM `mob_db_re` WHERE `mvp_exp` > 0;", .@monsterIds);

		for(.@i = 0; .@i < getarraysize(.@monsterIds); .@i++)
			addmonsterdrop .@monsterIds[.@i], .reward[0], .reward[1];

}

It pulls all monsters IDs that have mvp exp and adds a 100% drop chance for the TGC.

If you want to define the monsters manually, you also could simply put them in an array.

-	script	ITEM_DROP	FAKE_NPC,{
    OnInit:
		// mob id, chance (1% = 100)
		setarray .reward[0], 7227, 10000;
		setarray .monsterIds[0], 1002;

		for(.@i = 0; .@i < getarraysize(.monsterIds); .@i++)
			addmonsterdrop .monsterIds[.@i], .reward[0], .reward[1];
}

One thing you need to know though is that the drop rate you set is influenced by the level penalty system if you use renewal.
So if you set it to 100% but your character is 6~9 level or more above the mob the drop rate will be reduced.

Edited by Winterfox
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.04
  • Content Count:  25
  • Reputation:   0
  • Joined:  05/18/23
  • Last Seen:  

7 hours ago, Winterfox said:

Hello,

I am not sure how you achieved that all boss monsters drop TCG, but I guess the reason why it doesn't work for some monsters is that you use a script to achieve this that uses the OnNPCKillEvent label.
The Problem is that this label only gets triggered when a monster gets killed that doesn't already have a label, which most of those you mentioned as not working have.

You could use addmonsterdrop to add the drop manually to all boss monsters, an example would be this:

-	script	ITEM_DROP	FAKE_NPC,{
    OnInit:
		setarray .reward[0], 7227, 10000;

		query_sql("SELECT id FROM `mob_db_re` WHERE `mvp_exp` > 0;", .@monsterIds);

		for(.@i = 0; .@i < getarraysize(.@monsterIds); .@i++)
			addmonsterdrop .@monsterIds[.@i], .reward[0], .reward[1];

}

It pulls all monsters IDs that have mvp exp and adds a 100% drop chance for the TGC.

If you want to define the monsters manually, you also could simply put them in an array.

-	script	ITEM_DROP	FAKE_NPC,{
    OnInit:
		// mob id, chance (1% = 100)
		setarray .reward[0], 7227, 10000;
		setarray .monsterIds[0], 1002;

		for(.@i = 0; .@i < getarraysize(.monsterIds); .@i++)
			addmonsterdrop .monsterIds[.@i], .reward[0], .reward[1];
}

One thing you need to know though is that the drop rate you set is influenced by the level penalty system if you use renewal.
So if you set it to 100% but your character is 6~9 level or more above the mob the drop rate will be reduced.

Yeah. I forgot to include the script that I was using and you're correct I used the OnNPCKillEvent. I tested your array script and it's working fine with normal boss monsters as well as quest and instance mvps. Thank you.

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