Full Version : how to test for loyalty?
xmlspawner >>Q&A >>how to test for loyalty?


<< Prev | Next >>

Xerocrates- 10-14-2007
All Right, Another Question on my favorite Xmldialog tongue.gif



I would make a simil-talk comand to say to the npc to Arm/Disarm his-self (that word exist?)

i have made:


Command: Disarm Yourself!
Text:*Drop Out his weapon*
Condiction: isn't important now i think...
Action:SETONTHIS/UNEQUIP,Firstvalid,false


And It work...

Now i would make the Arm Trigger...

Command:Arm Yourself!
Text:*Bla bla bla*
Condiction:The weapon is on his backpack
Action:SETONTHIS/EQUIP/The weapon in his backpack


How i can specify to the Npc "That damned weapon (One then using yous best combat) on your Backpack!"?


Tnx for any Help

ArteGordon- 10-14-2007
I'm afraid that there is no convenient way of referring to items in creatures backpacks. It is on the todo list.

Xerocrates- 10-14-2007
arg... i must invent something...


hum...

what's about the Loyalty on a npc?


I have made a condiction gump

GETONPARENT,loyalty=Wonderfullyhappy

But it doesn't work...

If i make another condiction like... bhu.. i dunno... GETONPARENT,controlmaster.serial=GETONTRIGMOB,serial

the propriety of the npc is of his own master

It work...

But i need that Loyalty...
What's wrong?


tnx for any help

ArteGordon- 10-14-2007
With loyalty, you are testing the value of an enum, so you need to do it like

GETONPARENT,loyalty=#Wonderfullyhappy

http://xmlspawner.15.forumer.com/index.php...pic=399&hl=enum

What was the problem with the xmlweaponability attachment?

Xerocrates- 10-14-2007
Nothing, it work perfectly, it was my distraction tongue.gif

Tnx for the hit smile.gif



Edit:

*groan*

But the Wonderfullyhappy doesn't work...

Cut/copied
Modified, nothing...

i have try to read the link, but i haven't understand what was write...

i think the # must be replaced whit something isn't?

sorry tongue.gif

ArteGordon- 10-14-2007
I just checked and under RunUO 1.0 loyalty was an enum, but RunUO 2.0 changed loyalty it to an int. That is why the check doesnt work.
You just have to check the value of loyalty from 0 to 100 like this

GETONPARENT,loyalty=100

where a value of 100 is what is reported as wonderfully happy.

Xerocrates- 10-14-2007
Nothing... mayby there's something changed by the scripter on the loyalty, I ask to him...

I play on a RunUO 1.0

but is strage, by the [props the format of "loyalty" is "Wonderfullyhappy Extremlyhappy ecc. ecc."

But, nothing.. i also try to see how the server read the Loyalty by one triks

Command:Say your loyalty bastard!
Text:{GETONPARENT,loyalty}



And his said "Wonderfullyhappy"

So the format must be "Wonderfullyhappy"

......*BANG*......

ArteGordon- 10-14-2007
what version of xmlspawner are you running?

If you are running vesion 2.52 or later then this should work

GETONPARENT,loyalty=#WonderfullyHappy

Older versions dont support enum testing. Try making sure that you have the correct uppercase spelling of the enum value. It is 'WonderfullyHappy' not 'Wonderfullyhappy' . The Happy is capitalized.

Xerocrates- 10-15-2007
Already Checked the case are right


hum.. i ask to my scripter... mayby he as edited something about the loyalty and his for that the check doesn't work...

Xerocrates- 10-15-2007
All Right I've made some check, test and other


If the loyalty is on Actionfield by Setonthis or in a text field by Getonthis It work...

But if is itr on a condiction filed by the GETONTHIS or GETONPARENT it doesn't work...

I think is bug....



some ideas?



ArteGordon- 10-16-2007
I'll check it out.

Xerocrates- 10-16-2007
Tnx