• logo_cipsoft
    Nowe serwery zostały otwarte 27 Sie 2025:
    Escura (Retro Open PvP) Mystera (Retro Open PvP) us_logo Penumbra (Retro Open PvP)

Tasks outdata 100% dzia?a

Status
Zamknięty.

Ovner

Senior User
Dołączył
Czerwiec 21, 2009
Posty
528
Liczba reakcji
52
Wiek
32
Dodaj do lib/function.lua:
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:

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:

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.
 
Odp: Tasks outdata 100% dzia?a

Napisa?by? ?e z otland
 
Ostatnia edycja:
Odp: Tasks outdata 100% dzia?a

A ja mam problem z zrobieniem ?eby reward to by? item.
Robie tak
PHP:
[2] = {questStarted = 1511, questStorage = 65001, killsRequired = 30, raceName = "Vampirs", rewards = {{enable = true, type = "exp", values = 5000}, {enable = true, type = "item", values = {9121, 10}}}},
i po napisaniu do npc hi>report>vampirs nic nie odpisuje...
 
Odp: Tasks outdata 100% dzia?a

A ja mam problem z zrobieniem ?eby reward to by? item.
Robie tak
PHP:
[2] = {questStarted = 1511, questStorage = 65001, killsRequired = 30, raceName = "Vampirs", rewards = {{enable = true, type = "exp", values = 5000}, {enable = true, type = "item", values = {9121, 10}}}},
i po napisaniu do npc hi>report>vampirs nic nie odpisuje...

A z innymi normalnie Ci dzia?a i tylko z tymi "Vampiris" nie odpisuje?
Patrzy?e? w konsole czy s? jakie? b??dy?
 
Odp: Tasks outdata 100% dzia?a

Z item, money i exp dzia?a tylko item nie a w konsoli jest b??d ze p?tla v ?le dzia?a. Daj mo?e linka do oryginalnego tematu.
 
Odp: Tasks outdata 100% dzia?a

Mam tfs 0.4 i nie dziala npc gdy chce go przywolac w silniku wyswietla sie blad "cannot open data/npc/scripts/killing~ no such file or directory

o co chodzi?
 
Status
Zamknięty.
Do góry