Ovner
Senior User
- Dołączył
- Czerwiec 21, 2009
- Posty
- 528
- Liczba reakcji
- 52
- Wiek
- 32
Dodaj do lib/function.lua:
Albo je?li u?ywasz 0.4 DEV:
Stw?rz plik w data/creaturescripts/scripts o nazwie killinginthenameof.lua i wklej to:
Dodaj do login.lua:
Dodaj do creaturescripts.xml:
Tworzymy plik o nazwie Grizzly Adams.xml i jego zawarto?? to:
Tworzymy plik o naziwe killinginthenameof.lua wrzucamy go do data/npc/scripts a jego zwarto?? to:
Jak skofigurowa??
Opis:
Kod:
function isSummon(cid)
return getCreatureMaster(cid) ~= cid or false
end
Albo je?li u?ywasz 0.4 DEV:
Kod:
function isSummon(cid)
return getCreatureMaster(cid) ~= nil
end
Stw?rz plik w data/creaturescripts/scripts o nazwie killinginthenameof.lua i wklej to:
Nie masz wystarczających uprawnień, aby zobaczyć link.
Zaloguj or Rejestracja
Dodaj do login.lua:
Kod:
registerCreatureEvent(cid, "KillingInTheNameOf")
Dodaj do creaturescripts.xml:
Kod:
<event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
Tworzymy plik o nazwie Grizzly Adams.xml i jego zawarto?? to:
Kod:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Grizzly Adams" script="killinginthenameof.lua" access="3" walkinterval="2000" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="144" head="97" body="97" legs="94" feet="97" addons="3"/>
</npc>
Tworzymy plik o naziwe killinginthenameof.lua wrzucamy go do data/npc/scripts a jego zwarto?? to:
Nie masz wystarczających uprawnień, aby zobaczyć link.
Zaloguj or Rejestracja
Jak skofigurowa??
Kod:
-- Troll task example
[1] = {questStarted = 1510, questStorage = 65000, killsRequired = 100, raceName = "Trolls", rewards = {{enable = true, type = "exp", values = 200}, {enable = true, type = "money", values = 200}}},
Opis:
Kod:
- [1] = Number of task.
- quesStarted = Storage to check if the task has been started.
- questStorage = Storage to check of player has killed the monter the needed times.
- killsRequired = How many times the player needs to kill the creature.
- raceName = Monster's race name.
- rewards = Here you can config how many rewards will obtain the player in each task.
--[[
enable = Here you can enable/disable the reward, use true or false.
type = Here you declare the reward type.
--[[
boss or 1 = Player will be teleported to the boss position.
exp or 2 = Player will get experience.
item or 3 = Player will get an item.
money or 4 = Player will get money.
storage or 5 = Player will get a storage value.
points or 6 = Player will get points(storage value) for the rank.
]]--
values = Here you declare the values for the reward type.
--[[
Use a position for "boss", Ex: {x = 100, y = 100, z = 7}.
Use a number value for "exp", Ex: 1000.
Use a table value with two numbers for "item", the first value will be the item id and the second value will be the count, Ex: {2160, 10}.
Use a number value for "money", Ex: 1000.
Use a table value with two numbers for "storage", the first value will be the storage value and the second value will be the count, Ex: {10500, 1}.
Use a number value for "points", Ex: 5.[/B]
]]--
]]--
--Only in the creaturescript.
- creatureStorage = Storage to check the kills for each creature.