Witam dzis chce zaproponowac 'zadania' o ktorych wspomnial Artur Xardas
Dajmy na to np Robimy npc ktore daje mam zadania
Za kazde zadanie mamy expa i minimalna nagrode
Za all wykonane zadania wielkia nagroda
(ilosc zadan ,poziom trudnosci i nagrody ) ustala support
Co myslicie na ten temat?
2.Kiedy Wizzard mial God'a zauwazylem ze sie zamienial w takiego duszka (na przykladzie moze go wam pokazac ) bo opisac niemoge zbytnio
Pomysl to dac tego ducha jako (dusze) wylatujaca z deda przy kazdym Dedzie
Ostatnio edytowany przez Valior (2010-01-25 17:51:35)
Offline
To Valior Zrobiłem Skrypt Do Twojej 1 pomyśli ( Ale nie Wiem czy działa) i Gm tylko nagrody będzie musiał zmienić i zadania
W data/npc/ tworzysz plik Quest Men.Xml i spisujesz w nim to:
<npc name="Quest Men" script="data/npc/scripts/quest.lua" lookdir="3" autowalk="25">
<health now="500" max="500"/>
<look type="111" head="0" body="0" legs="0" feet="0"/>
<parameters>
<parameter key="message_greet" value="Witam |PLAYERNAME|. Zamieniam itemki z questo na nagrody powiec 'pomoc'." />
<parameter key="message_needmoremoney" value="Niemasz tyle kasy." />
<parameter key="message_decline" value="Czy |TOTALCOST| to za duzo dla ciebie?" />
</parameters>
</npc>
Potem wejdź w /data/npc scripts stworz plik quest.Lua i wpisz w nim to:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end
addon_need_premium = 'Sorry, you need a premium account to get addons.'
addon_have_already = 'Sorry, you already have this addon.'
addon_have_not_items = 'Sorry, you don\'t have these items.'
addon_give = 'Masz i sie ciesz xD'
player_gold = getPlayerItemCount(cid,2148)
player_plat = getPlayerItemCount(cid,2152)*100
player_crys = getPlayerItemCount(cid,2160)*10000
player_money = player_gold + player_plat + player_crys
if msgcontains(msg, 'pomoc') then
selfSay('Zamieniam itemki na nagrody.')
elseif msgcontains(msg, 'blue robe') then
if getPlayerItemCount(cid,2090) >= 1 then
selfSay('Przyniosles mi niebieski klucz?')
talk_state = 1
else
selfSay('Niemasz tego itemka. Przyjdz jak go bedziesz mial.')
talk_state = 0
end
elseif msgcontains(msg, 'tak') and talk_state == 1 then
talk_state = 0
if getPlayerItemCount(cid,2090) >= 1 then
if doPlayerRemoveItem(cid,2090,1) == 1 then
selfSay(addon_give)
doPlayerAddItem(cid,7428,1)
end
else
selfSay(havent_item)
end
elseif msgcontains(msg, 'nie') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok to nara ziom...')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
i naprawdę nie wiem czy On Działa
Ostatnio edytowany przez Ausin (2010-01-25 18:15:46)
Offline
Valior dobrze ze przypomniales
Offline
Aus, z tego co się doczytałem, to Twój skrypt jest outfit, który daje nam NPC po oddaniu mu przedmiotu. Błędów nie widzę, tylko ciekawe czy na silniku pójdzie
Dla mnie możesz być kozakiem i mnie zabijać. Odreaguj za swoje niepowodzenia, za twarz... ;* <3
Offline