do creaturescripts.xml dodajemy:

creaturescripts.xml
   <event type="kill" name="boss" script="boss.lua"/>
 

do login.lua dodajemy:

login.lua
registerCreatureEvent(cid, "boss")
 

tworzymy plik boss.lua w data/creaturescripts i wlejamy:

boss.lua
function onKill(cid, target)
       --Config (By Erexo)
   local  monstername = 'ferumbras'  -- nazwa potwora (z malych liter!)
   local  expedience = 5000  -- ile expa ma dawac (da kazdemu kto choć raz hit potwora)
   local  itemid = 1234  -- id itema
   local  itemcount = 1  -- ilosc itemow
 
   if isMonster(target) and getCreatureName(target):lower() == monstername then
   doPlayerAddExp(cid,expedience)
      doPlayerAddItem(cid, itemid, itemcount)
   end
   return true
end
otspub/za_potwora_kazdy_gracz_dostaje_item_i_exp.txt · Last modified: 2011/05/21 10:07 by karpio
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
 otosowy pasek