Nietypowy potek

Status
Zamknięty.

Ceffe

New User
Zarejestrowany
Dołączył
Grudzień 27, 2009
Posty
6
Liczba reakcji
0
Witam! Mam do was pro?b? forumowicze!​

Tak jak w nazwie tematu potrzebuje skrypta na nietypowy potek!
Jaki?
Taki ?e zale?nie od lv daje mane ale nie chodzi mi o manaraune.

Chodzi mi o takie cos:

10-50=200 mp
51-100=400mp
101-149=500mp
150-200=800mp

Jak si? da takie co? zrobi? to prosz? o help bo znam sie na skryptach ale probowalem z tym i nic!;/

Z gory thx.
 
Odp: Nietypowy potek

Skrypty gotowe w 100%
Testowane z wynikiem pozytywnym.

Stw?rz plik o nazwi? (w Actions/scripts) MPotion.lua
tam wklej:
Kod:
   function onUse(cid, item, frompos, item2, topos)
pl= getPlayerLevel(cid)
pot = 10
pot2 = 51
pot3 = 101
pot4 = 149
pot5 = 200
if pl >= pot and pl < pot2 then
doPlayerAddMana(cid,200)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
elseif pl >= pot2 and pl < pot3 then
doPlayerAddMana(cid,400)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
elseif pl >= pot3 and pl < pot4 then
doPlayerAddMana(cid,500)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
elseif pl >= pot4 and pl < pot5 then
doPlayerAddMana(cid,800)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
elseif pl >= pot5 then
doPlayerAddMana(cid,800)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
else
doPlayerSendTextMessage(cid,22,"Za maly poziom na uzycie tej runy.")
end
end


Nast?pnie stw?rz (w Actions/scripts) HPotion.lua
i wklej tam:
Kod:
   function onUse(cid, item, frompos, item2, topos)
pl= getPlayerLevel(cid)
pot = 10
pot2 = 51
pot3 = 101
pot4 = 149
pot5 = 200
if pl >= pot and pl < pot2 then
doPlayerAddHealth(cid,200)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
elseif pl >= pot2 and pl < pot3 then
doPlayerAddHealth(cid,400)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
elseif pl >= pot3 and pl < pot4 then
doPlayerAddHealth(cid,500)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
elseif pl >= pot4 and pl < pot5 then
doPlayerAddHealth(cid,800)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
elseif pl >= pot5 then
doPlayerAddHealth(cid,800)
doSendMagicEffect(frompos,7)
doRemoveItem(item.uid,1)
else
doPlayerSendTextMessage(cid,22,"Za maly poziom na uzycie tej runy.")
end
end

Dalej edytujemy plik o nazwie actions.xml (w folderze Actions)
Dodajemy tam kolejno: (w miejscu id wstawiamy id swojego itemka)
Kod:
<action itemid="8473" script="HPotion.lua" />
<action itemid="7590" script="MPotion.lua" />

Skrypt pisany pod tibie 7.6 z silnikiem YurOTS 094_f (edytowany)
Pisany pod runk?, lecz mo?na spr?bowa? czy zadzia?a pod pota.
Mile widziany reput :)
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry