Witam dzis zaprezentuje smieszny dosc skrypt.
Polega on na tym ze gdy zalozysz na glowe korone twoj outfit zmienia sie na outfit GameMastera.
Gdy ja zdejmiesz outfit wraca do dawnej postaci ok wiec:
movements/scripts/krol.lua:
movements/movements.xml:
Jesli nie mozna zalozyc korony na glowe:
w items.xml odszukujemy tego:
I zmieniamy na to:
Have fun
Polega on na tym ze gdy zalozysz na glowe korone twoj outfit zmienia sie na outfit GameMastera.
Gdy ja zdejmiesz outfit wraca do dawnej postaci ok wiec:
movements/scripts/krol.lua:
PHP:
function onEquip(cid, item, slot)
standardoutfit = { lookType = getPlayerStorageValue(cid, 3331), lookHead = getPlayerStorageValue(cid, 3332), lookBody =
getPlayerStorageValue(cid, 3333), lookLegs = getPlayerStorageValue(cid, 3334), lookFeet = getPlayerStorageValue(cid, 3335), lookAddons =
getPlayerStorageValue(cid, 3336) }
gmoutfit = { lookType = 75, lookHead = 0, lookBody =0, lookLegs = 0, lookFeet = 0, lookAddons =0 }
setPlayerStorageValue(cid, 3331, getCreatureOutfit(cid).lookType)
setPlayerStorageValue(cid, 3332, getCreatureOutfit(cid).lookHead)
setPlayerStorageValue(cid, 3333, getCreatureOutfit(cid).lookBody)
setPlayerStorageValue(cid, 3334, getCreatureOutfit(cid).lookLegs)
setPlayerStorageValue(cid, 3335, getCreatureOutfit(cid).lookFeet)
setPlayerStorageValue(cid, 3336, getCreatureOutfit(cid).lookAddons)
doPlayerSendTextMessage(cid, 22, "Jestes Krolem!.")
doSetCreatureOutfit(cid, gmoutfit, 90000000)
end
function onDeEquip(cid, item, slot)
doPlayerSendTextMessage(cid, 22, "Niemasz Korony Nie jestes Krolem :/")
doSetCreatureOutfit(cid, standardoutfit, 1)
end
PHP:
<movevent event="Equip" itemid="2128" slot="head" script="krol.lua" />
<movevent event="DeEquip" itemid="2128" slot="head" script="krol.lua" />
w items.xml odszukujemy tego:
PHP:
<item id="2128" article="a" name="crown">
<attribute key="weight" value="1500"/>
</item>
PHP:
<item id="2128" article="a" name="crown">
<attribute key="slotType" value="head"/>
<attribute key="weight" value="1500"/>
</item>