• logo_cipsoft
    Nowe serwery zostały otwarte 27 Sie 2025:
    Escura (Retro Open PvP) Mystera (Retro Open PvP) us_logo Penumbra (Retro Open PvP)

Creaturescripts Nowy AOL, dodatkowe atrybuty

Status
Zamknięty.

DiS

Advanced User
Dołączył
Kwiecień 5, 2008
Posty
274
Liczba reakcji
12
Witam, wykona?em sobie nowy amulet of loss, z dodatkowymi atrybutami i si? nim dziel?:
Poniewa? chcia?em doda? dodatkowe atrybuty typu ochrona przed ogniem, energy musia?em wykombinowa? maly skrypcik, dzi?ki kt?remu AOL bd znika? po dedzie.
Poniewa? gdy mamy te 2 atrybuty razem
<attribute key="preventitemloss" value="1"/>
<attribute key="absorbPercentAll" value="50"/>

To ten atrybut, powoduje znikni?cie AOL przy dedzie, ale te? przy ka?dym trafieniu potwora czy gracza.
<attribute key="charges" value="1"/>


Zwyk?y AOL wygl?da tak:

<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420"/>
<attribute key="slotType" value="necklace"/>
<attribute key="preventitemloss" value="1"/>
<attribute key="charges" value="1"/>


Nowy AOL dodaj?cy np 50% ochrony od wszystkiego i maj?cy 10arr wygl?da tak:

ITEMS.XML
<item id="2132" article="a" name="silver amulet of loss">
<attribute key="weight" value="350"/>
<attribute key="armor" value="10"/>
<attribute key="slotType" value="necklace"/>
<attribute key="absorbPercentAll" value="50"/>
<attribute key="description" value="This amulet give you 50% protection for all."/>
<attribute key="preventitemloss" value="1"/>

teraz wchodzimy do creaturescripts/scripts i tworzymy nowy o nazwie aoldie.lua

function onDie(cid, corpse)
if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2132) then
doPlayerRemoveItem(cid, 2132, 1)
end
end

nast?pnie w login.lua dodajemy t? linijke:
registerCreatureEvent(cid, "aoldie")

nast?pnie w creaturescripts.xml
dodajey t? linijke:
<event type="die" name="aoldie" script="aoldie.lua" />

Mo?e komu? si? r?wnie? przyda

A mnie to dzia?a na Avesta 7.6
 
Status
Zamknięty.
Do góry