Tibia Mod
Forum zostało Przeniesione tutaj:
http://tibiamod.xaa.pl/

Zapraszam.

Join the forum, it's quick and easy

Tibia Mod
Forum zostało Przeniesione tutaj:
http://tibiamod.xaa.pl/

Zapraszam.
Tibia Mod
Czy chcesz zareagować na tę wiadomość? Zarejestruj się na forum za pomocą kilku kliknięć lub zaloguj się, aby kontynuować.

[creaturevents]Extra exp

Go down

[creaturevents]Extra exp  Empty [creaturevents]Extra exp

Pisanie by darkes Nie Lis 18, 2012 5:21 pm

Skrypt pochodzi z silnika db hayate. Dodaje on expa dla pacc oraz odejmuje dla osób bez pacc.
W creaturescript/creaturescript.xml wklepujemy:
Kod:
<event type="login" name="extraexp" event="script" value="extraexp.lua"/>
W creaturescript/scripts/login.lua dodajemy:
Kod:
registerCreatureEvent(cid, "extraexp")
W creaturevent/scripts tworzymy plik o nazwie extraexp.lua
Kod:
function onLogin(cid)
    if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 12345) == 0 then
    setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)+15)
    setPlayerStorageValue(cid, 12345, 1)
   
    elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
    setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)-15)
    setPlayerStorageValue(cid, 12345, 0)
    end
   
    return TRUE
end 

darkes
Uploader

Liczba postów : 27
Join date : 13/11/2012

Powrót do góry Go down

Powrót do góry

- Similar topics

 
Permissions in this forum:
Nie możesz odpowiadać w tematach