Forum poswięcone grze TIBIA
Witam znalazłem na pewnym forum fajny skrypt na exp rune
chciałbym się nim z wami podzielić więc
Cytat:
Bardziej zaawansowana runka dodająca graczowi expa. Jeśli chcesz w formule dodawanych pkt doświadczenia zastosować zmienne takie jak Level, Magic Level, Random czy jakieś inne pierdoły ustaw w configu specialFormula na 1 a następnie wpisz swoją formułę w linijce 17.
-- Advanced Experence Rune by Avixu -- Dedicated for Aries 0.4.0 -- Actions.XML: <action itemid="ITEMID" script="experience_rune.lua" allowfaruse="1" /> local config = { specialFormula = 0, -- jesli chcesz uzyc formuly ze zmiennymi typu level itp ustaw na 1 i podaj formule w linjce 17 experiencePoints = 1000, magicEffect = 14, mayUseOnPlayersMsg = 'You may use this item only on players', removeItem = 1 } function onUse(cid, item, frompos, item2, topos) if(isPlayer(item2.uid) == FALSE) then doPlayerSendCancel(cid, config.mayUseOnPlayerMsg) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return FALSE end if config.specialFormula == 1 then local experiencePoints = math.random(getPlayerLevel(cid)*10, getPlayerLevel(cid)*200) doPlayerAddExp(item2.uid, experiencePoints) doPlayerSay(item2.uid, '+' ..experiencePoints.. ' EXP', 16) else doPlayerAddExp(item2.uid, config.experiencePoints) doPlayerSay(item2.uid, '+' ..config.experiencePoints.. ' EXP', 16) end doSendMagicEffect(topos, config.magicEffect) if config.removeItem == 1 then if(item.type > 1) then doChangeTypeItem(item.uid, item.type - 1) elseif(item.type == 1) then doRemoveItem(item.uid, 1) end end end
Pozdrawiam !
Offline