Sirion_Mido
Experienced Member
This script a person requested and i made it
It could be not hard but could be helpful for some people:
How it works?
For example if player have got 10 frags i get outfit reward like warmaster
Here We Are
in your creaturescripts/creaturescripts.xml paste the folowing code:
now in your creaturescripts/scripts/login.lua
After
paste
now in your creaturescripts/scripts create file name FragsReward.lua and paste the following:
any errors report back here
Rep++ If It Helpful For You
It could be not hard but could be helpful for some people:
How it works?
For example if player have got 10 frags i get outfit reward like warmaster
Here We Are
in your creaturescripts/creaturescripts.xml paste the folowing code:
XML:
<event type="kill" name="FragsReward" event="script" value="FragsReward.lua"/>
now in your creaturescripts/scripts/login.lua
After
Lua:
registerCreatureEvent(cid, "GuildMotd")
Lua:
registerCreatureEvent(cid, "FragsReward")
now in your creaturescripts/scripts create file name FragsReward.lua and paste the following:
Lua:
local storage = 9000 -- the storage id
local frags = 10 -- the amount of frags to reward the outfit
local female_outfit = 270 -- here the look type for male outfit
local male_outfit = 271 -- here the look type for female outfit
local a = math.max(0, getCreatureStorage(cid, storage)) + 1
function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
doCreatureSetStorage(cid, storage, a)
end
if a == frags and (getPlayerSex(cid) == 0) then
doPlayerAddOutfit(cid,female_outfit)
else
doPlayerAddOutfit(cid,male_outfit)
end
return true
end
any errors report back here
Rep++ If It Helpful For You