Cze??, chcia?bym do swojego silnika wprowadzi? item, kt?ry wypada z ka?dego potwora i jest jaki? % na to ?e wypadnie, lecz chcia?bym zrobi? to przez c++ , tylko ?e nie potrafi? napisa? takiego skryptu. Pom?g?by mi kto? ? Pozdrawiam
Pomoglby mi kto? napisa? skrypt do creaturescripts, kt?ry dodaje item do loota ka?dego potwora i jest na to XX szansa ?
PHP:
function onKill(cid, target, corpse)
local boss = math.random(100,100)
if getCreatureName(target) == 'Rat' then
doPlayerSendTextMessage(cid,22,"Tekst testowy!")
if boss == 100 then
doSummonCreature('Rat', getPlayerPosition(cid))
end
end
end
W czystym YurOTS nie ma creaturescripts.
Je?eli interesuje Ci? nie kod C++, a rozwi?zanie problemu to najprostszym rozwi?zaniem problemu b?dzie ?ci?gni?cie Notepad++.
Po ?ci?gni?ciu wciskasz ctrl+shift+f i uzupe?niasz:
Szukany tekst: <loot>
Zamie? na: <loot> \n <item id="XXXX" chance="YYYY"/>
Katalog: ?cie?ka do data/monster/
Tryb szukania: Rozszerzony (\n, \r, \t, \0, \x...)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.