• 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!

Problem z itemem

Status
Not open for further replies.

Zonkill

Banned User
Joined
Oct 10, 2010
Messages
102
Reaction score
1
Czesc,
zrobilem taki item

Code:
	<item id="2662" article="a" name="hat">
		<attribute key="weight" value="750" />
		<attribute key="armor" value="2" />
		<attribute key="slotType" value="head" />
		<attribute key="magiclevelpoints" value="3" />
		<attribute key="absorbPercentIce" value="8" />
		<attribute key="description" value="Ixxxxa." />
	</item>

Daje prota, ale mlvla nie daje.
Czy mlvl trzeba dodatkowo gdzies wpisac?
 
napisałbyś, jaką treść? nie mam obecnie podglądu na movements a chciałbym wiedzieć jak najszybciej. ;)
 
1. napisz skrypt w lua na item który daje mlvl gdy go założysz (google.pl), wklej go do movements/scripts i nazwij go wedle uznania
2. dodaj to do movements:
<movevent type="Equip" itemid="2662" event="script" value="twojanazwa.lua"/>
 
@up: nup
event="function" value="onEquipItem"
i onDeEquip value="onDeEquipItem"
 
<movevent type="DeEquip" itemid="2323" slot="head" event="function" value="onDeEquipItem"/>
<movevent type="Equip" itemid="2343" slot="head" event="function" value="onEquipItem"/>

Czym się różnią te 2 funkcje?

#edit

DeEquip = kiedy jest zalozony na eq,
Equip = w bp tez?

@@EDIT
items.xml
Code:
<item id="2662" article="a" name="magician hat">
		<attribute key="weight" value="750" />
		<attribute key="armor" value="2" />
		<attribute key="slotType" value="head" />
		<attribute key="magiclevelpoints" value="3" />
		<attribute key="absorbPercentIce" value="88" />
		</item>

movements.xml
Code:
	<movevent type="DeEquip" itemid="2662" slot="head" event="function" value="onDeEquipItem"/>

W czym jest błąd? Item nie daje + mlvl ;/
 
Tym, ze jedna sie wlacza przy sciaganium, a jedna przy zakladaniu?
No i maja inny argument id itemu.
 
items.xml
Code:
<item id="2662" article="a" name="magician hat">
		<attribute key="weight" value="750" />
		<attribute key="armor" value="2" />
		<attribute key="slotType" value="head" />
		<attribute key="magiclevelpoints" value="3" />
		<attribute key="absorbPercentIce" value="88" />
		</item>

movements.xml
Code:
	<movevent type="DeEquip" itemid="2662" slot="head" event="function" value="onDeEquipItem"/>

W czym jest błąd? Item nie daje + mlvl ;/
 
Zeby to zadzialalo musisz miec 2 takie same itemy (tj. o tym samym wygladzie)
Wtedy dajesz funkcje deEquip (przy sciagniu z danego pola, w tym przypadku head) na item bez mlvl w items.xml, a dla drugiego daj Equip (on musi miec ustawiony mlvl).
Znajdz sobie jakis head co daje m lvl i zobacz jak to jest zrobione (ex. Hat of the Mad).
 
Eh..
w items.xml Hat of the mad, jest tylko jedno.
W movements tez nie widze wiecej niz 1 linijke dot. hotm.

Code:
	<item id="2323" article="a" name="hat of the mad">
		<attribute key="description" value="You have a vague feeling that it looks somewhat silly." />
		<attribute key="weight" value="700" />
		<attribute key="armor" value="3" />
		<attribute key="magiclevelpoints" value="1" />
		<attribute key="slotType" value="head" />
	</item>

Code:
	<movevent type="DeEquip" itemid="2323" slot="head" event="function" value="onDeEquipItem"/>

#eDIT

rzeczywiscie..

Code:
<movevent type="Equip" itemid="2323" slot="head" event="function" value="onEquipItem">
		<vocation id="1"/>
		<vocation id="5" showInDescription="0"/>
		<vocation id="2"/>
		<vocation id="6" showInDescription="0"/>
	</movevent>
	<movevent type="DeEquip" itemid="2323" slot="head" event="function" value="onDeEquipItem"/>



##
Serdeczne dzięki za naprowadzenie, śmiga ;) Rep. ++

Code:
	<movevent type="DeEquip" itemid="2662" slot="head" event="function" value="onDeEquipItem"/>
	<movevent type="Equip" itemid="2662" slot="head" event="function" value="onEquipItem"/>
 
Moze sie cos zmienilo, zrob w takim razie tak:
Code:
	<item id="2662" article="a" name="magician hat">
		<attribute key="weight" value="750"/>
		<attribute key="armor" value="1"/>
		<attribute key="slotType" value="head"/>
		<attribute key="magiclevelpoints" value="1" />
	</item>
Code:
        <movevent type="Equip" itemid="2662" slot="head" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2662" slot="head" event="function" value="onDeEquipItem"/>
 
Wszystko działa w takim skrypcie jak podałem wyżej, niema znaczenia gdzie Equip a gdzie DeEquip. :)
Pzdr.
 
Status
Not open for further replies.
Back
Top