Jump to content

Restricting Guild Supply Item Usage to WoE Castles Only


Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  14
  • Reputation:   0
  • Joined:  07/17/24
  • Last Seen:  

I’m looking to create a guild supply item (like an “Acid Demonstration Box”) that contains items similar to Bottle Grenade (7135) and Acid Bottle (7136) but for use only within WoE castles. Here’s what I need:

Inside WoE castles: Players can use the “Acid Demonstration Box” bombs we created to cast Acid Demonstration. The original AD requirements 7135 and 7136 can also still be used.

Outside WoE castles: Players should default to the regular items (Bottle Grenade (7135) and Acid Bottle (7136)) for MVP, PvP, etc. The “Acid Demonstration Box” bombs I created should not work outside castle.

 

Any suggestions on the best approach for this? Thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  383
  • Reputation:   78
  • Joined:  10/30/12
  • Last Seen:  


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  14
  • Reputation:   0
  • Joined:  07/17/24
  • Last Seen:  

Yes, i know that. But my case is different since the items are requirements for skills. Example the acid demonstration bombs. If i put restriction via item_noequip.txt it will only work on which i decided there. I want something like this

 Inside WoE castles: Players can use the “Acid Demonstration Box” bombs we created to cast Acid Demonstration. The original AD requirements 7135 and 7136 can also still be used.

 Outside WoE castles: Players should default to the regular items (Bottle Grenade (7135) and Acid Bottle (7136)) for MVP, PvP, etc. The “Acid Demonstration Box” bombs I created should not work outside castle.

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   19
  • Joined:  12/24/18
  • Last Seen:  

1 hour ago, zemaj said:

Yes, i know that. But my case is different since the items are requirements for skills. Example the acid demonstration bombs. If i put restriction via item_noequip.txt it will only work on which i decided there. I want something like this

 

 Inside WoE castles: Players can use the “Acid Demonstration Box” bombs we created to cast Acid Demonstration. The original AD requirements 7135 and 7136 can also still be used.

 Outside WoE castles: Players should default to the regular items (Bottle Grenade (7135) and Acid Bottle (7136)) for MVP, PvP, etc. The “Acid Demonstration Box” bombs I created should not work outside castle.

 

This feature is available in the Extended Battleground. Find a working Extended Battleground, and you can use its function with the getitem2 item sign "WOE." This feature is exclusive to WOE and cannot be used outside the castle.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  14
  • Reputation:   0
  • Joined:  07/17/24
  • Last Seen:  

12 hours ago, Mice said:

This feature is available in the Extended Battleground. Find a working Extended Battleground, and you can use its function with the getitem2 item sign "WOE." This feature is exclusive to WOE and cannot be used outside the castle.

I can't seem to find a working extended bg script. I read also getitem2 documentation but i don't think that alone can do it. Any leads?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   19
  • Joined:  12/24/18
  • Last Seen:  

11 hours ago, zemaj said:

I can't seem to find a working extended bg script. I read also getitem2 documentation but i don't think that alone can do it. Any leads?

If you can't find a working extended BG script, you will need to create your own function. Think of a way to do it the only solution I can think of is to create a custom mapflag. This mapflag would prevent supplies from a specific box from being used within that mapflag. If you're unable to do this, you can look into third-party services and hire a developer to do it for you. However, I'm not sure if any members here would be willing to do it for you, as it would take up their time to create. So, I'm uncertain if anyone will do this for free here. To be sure about getting a reliable scripter, I recommend checking third-party services, where you can find approved scripters.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  996
  • Reputation:   47
  • Joined:  11/13/11
  • Last Seen:  

On 11/14/2024 at 12:32 AM, zemaj said:

I’m looking to create a guild supply item (like an “Acid Demonstration Box”) that contains items similar to Bottle Grenade (7135) and Acid Bottle (7136) but for use only within WoE castles. Here’s what I need:

Inside WoE castles: Players can use the “Acid Demonstration Box” bombs we created to cast Acid Demonstration. The original AD requirements 7135 and 7136 can also still be used.

Outside WoE castles: Players should default to the regular items (Bottle Grenade (7135) and Acid Bottle (7136)) for MVP, PvP, etc. The “Acid Demonstration Box” bombs I created should not work outside castle.

 

Any suggestions on the best approach for this? Thanks!



Try this 

 

-	script	AcidDemoHandler	-1,{

	// Define WoE castle maps
	setarray .castle_maps$[0], "prtg_cas01", "prtg_cas02", "payg_cas01", "aldeg_cas01";

	// Item IDs
	set .acid_demo_box, 9001; // Replace 9001 with your custom Acid Demonstration Box ID
	set .bottle_grenade, 7135;
	set .acid_bottle, 7136;

	// Acid Demonstration skill ID
	set .acid_demo_skill, 294;

	OnPCUseItemEvent:
		// Check if the used item is the Acid Demonstration Box
		if (getarg(0) == .acid_demo_box) {
			// Verify if the player is inside a WoE castle map
			if (getarraysize(.castle_maps$)) {
				for (set .@i, 0; .@i < getarraysize(.castle_maps$); set .@i, .@i + 1) {
					if (strcharinfo(3) == .castle_maps$[.@i]) {
						// Allow use in WoE castle
						skill .acid_demo_skill, 1; // Cast Acid Demonstration skill
						end;
					}
				}
			}
			// Outside castle maps: cancel item use and show a message
			dispbottom "The Acid Demonstration Box can only be used inside WoE castles.";
			end;
		}
		// Check for regular item usage (Bottle Grenade and Acid Bottle)
		if (getarg(0) == .bottle_grenade || getarg(0) == .acid_bottle) {
			// Allow item usage everywhere
			end;
		}
	end;
}

Save this script in your server's NPC scripts folder.

Reload the script using the @reloadscript command.

Test it inside and outside castle maps to ensure proper functionality.

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
Reply to this topic...

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