• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[XML] / [Lua] - weapons.xml help

  • Thread starter Thread starter Icy
  • Start date Start date
I

Icy

Guest
Heya, as most of you know you can make multiple items or items with multiple actionids use the same script like this:
Code:
actionid="1337;1339;1445"

But it doesn't seem to work for weapons.

Is there any way to do it 'properly' becuase right now I just have way too many lines of code :P
 
actionid="1337-1445"

I think you misunderstood me, I know you can specify a range of actionids for my actions.xml file - this isn't what I'm looking for.

I'm looking at weapons.xml, and I'm wondering how to specify multiple items for the same script:

For example, right now I have this:
PHP:
		<melee id="8932" level="75" unproperly="1" event="function" value="default">
			<vocation id="5"/>
		</melee>
		<melee id="8926" level="75" unproperly="1" event="function" value="default">
			<vocation id="5"/>
		</melee>
		<melee id="2434" level="75" unproperly="1" event="function" value="default">
			<vocation id="5"/>
		</melee>
but can I do this somehow? (because this code doesn't work):
PHP:
		<melee id="8932;8926;2434" level="75" unproperly="1" event="function" value="default">			<vocation id="5"/>
		</melee>
 
Last edited by a moderator:
I cant find anything thats wrong with it. Does it work if you dont use 89322;8926?, I mean one by one.
 
It works if I do it one by one, it doesn't work if I try to concatenate them with ; or , or spaces, or anything.

Looking at the weapons.cpp vs. actions.cpp file makes me believe there's no way I can do it without modifying my sources & recompiling (which I might try!)

actions.cpp:
Code:
bool Actions::registerEvent(Event* event, xmlNodePtr p, bool override)
{
	...
		IntegerVec intVector = vectorAtoi(explodeString(strValue, ";")), endVector = vectorAtoi(explodeString(endValue, ";"));
	...
}

wheras the weapons.cpp doesn't have these lines or anything similar.
 
Back
Top