Tajemniczy - 2010-05-22 19:23:11

Witam znalazłem na pewnym forum :P 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.

Kod:

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

Golden - 2010-05-22 23:18:18

Przyda się dzięki

www.h2o-world.pun.pl www.lakonia.pun.pl www.grupa-niepokonanych.pun.pl www.hautecouture.pun.pl www.rapidracing.pun.pl