Forum Tibijczyków - youots.pun.pl
Daje skrypt na manarunki + NPC do 7.6 bo nigdzie na forum nie znalazłem a oto on:
W data/actions/scripts tworzymy plik "manarune.lua" i wklejamy to:
Spoiler:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2270 and item.type > 1 then
doPlayerAddMana(cid,8000)
doChangeTypeItem(item.uid,item.type-1)
doSendMagicEffect(topos,12)
doPlayerSay(cid,"Mniam...",1)
else
doRemoveItem(item.uid,1)
end
return 1
end
Tłumaczenie:
doPlayerAddMana(cid,8000)
Ilość dodawanej many
doPlayerSay(cid,"Mniam...",1)
Tekst pokazany po urzyciu runy
Potem w data/actions w plika "actions.xml" wklejamy taki skrypt:
Spoiler:
<action itemid="2270" script="manarune.lua" />
Gdy to juz zrobisz wchodzisz w data/npc/script
i szukasz npc który sprzedaje runy i musisz mu tam dopisać taki link(wklejasz go tam gdzie masz podane podobne takie linijki z sd, hmm, gfb):
Spoiler:
elseif msgcontains(msg, 'manarune') then
buy(cid,2270,100,10)
2270- ID runy
100- ilość urzyć w jednej runie
10- ilość gp za rune
Musisz mu jeszcze dopisac za ile ma sprzedawać rune czyli dajesz troche wyżej i tam pisze naprzykład:
Spoiler:
if msgcontains(msg, 'runes') then
selfSay('I sell hmms (40gps), uhs (40gps), gfbs (60gps), manarune (10gps), explosions (60gps), sds (90gps) and blank runes (5gps). To buy more runes say "10 uh" or "100 sd".')
elseif msgcontains(msg, 'wands') then
selfSay('I sell wand of inferno (15k), plague (5k), cosmic energy (10k), vortex (500gp) and dragonbreath (1k).')
Offline