Tibia.net.pl
| (#?)
| [8.1][TFS]Real Norseman Addon NPCDyskusja dotycząca tematu [8.1][TFS]Real Norseman Addon NPC, który znajduje się w kategorii Skrypty Lua & XML (Znajdują się tutaj potwory, NPC, itd. Publikacja tylko GOTOWYCH skryptów!), na forum NPC (). Treść: Witajcie zrobilem NPC Norseman Pod TFS tak jak na Real i postanowilem go udostepnic a wiec zaczynamy:
wchodzimy w data/npc i ... | | |
15-07-2008, 14:17
|
| | Gaduła | [8.1][TFS]Real Norseman Addon NPC
Witajcie zrobilem NPC Norseman Pod TFS tak jak na Real i postanowilem go udostepnic a wiec zaczynamy:
wchodzimy w data/npc i tworzymy npc:
Hjaern.xml Kod: <npc name="Hjaern" script="data/npc/scripts/hjaern.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="251" head="0" body="126" legs="126" feet="126" addons="3" corpse="2989"/>
<parameters>
<parameter key="message_greet" value="Be greeted." />
<parameter key="message_farewell" value="Good bye." />
</parameters>
</npc>
Teraz data/npc/scripts
hjaern.lua Kod: 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
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Greetings.'})
function creatureSayCallback(cid, type, msg)
part = getPlayerStorageValue(cid, 7512)
addon = getPlayerStorageValue(cid, 7513)
sex = getPlayerSex(cid)
pos = getCreaturePosition(cid)
if msgcontains(msg, 'frostheart shard') then
if getPlayerStorageValue(cid, 10000) < 1 then
selfSay("Do you bring frostheart shards for our spell?")
talkState = 1
elseif getPlayerStorageValue(cid, 10000) == 2 then
selfSay("Do you bring frostheart shards for our spell?")
talkState = 2
end
elseif msgcontains(msg, 'yes') then
if talkState == 1 then
selfSay('Excellent, you collected 5 of them. If you have collected 5 or more, talk to me about your reward.')
talkState = 3
elseif talkState == 2 then
selfSay('Excellent, you collected 10 of them. If you have collected 10 or more, talk to me about your reward.')
talkState = 4
end
elseif msgcontains(msg, 'reward') then
if talkState == 3 then
IO = getPlayerItemCount(cid,7290)
if IO >= 5 then
if doPlayerRemoveItem(cid,7290,5) == TRUE then
selfSay('Take this. It might suit your Nordic outfit fine.')
setPlayerStorageValue(cid, 10000, 2)
doSendMagicEffect(getCreaturePosition(cid), 14)
doPlayerAddOutfit(cid, 252, 1)
doPlayerAddOutfit(cid, 251, 1)
talkState = 0
else
selfSay('You don\'t have all the request items.')
talkState = 0
end
else
selfSay('You don\'t have all the request items.')
talkState = 0
end
elseif talkState == 4 then
IO = getPlayerItemCount(cid,7290)
if IO >= 10 then
if doPlayerRemoveItem(cid,7290,10) == TRUE then
selfSay('Take this. It might suit your Nordic outfit fine.')
setPlayerStorageValue(cid, 10000, 3)
doSendMagicEffect(getCreaturePosition(cid), 14)
doPlayerAddOutfit(cid, 252, 2)
doPlayerAddOutfit(cid, 251, 2)
talkState = 0
else
selfSay('You don\'t have all the request items.')
talkState = 0
end
end
end
elseif msgcontains(msg, 'no') and (talkState >= 1 and talkState <= 5) then
selfSay('Ok.')
talkState = 0
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
W razie NPC by nie dzialal (powienien) prosze pisac z bledem w konsoli postaram sie naprawic
| |
| | |
19-07-2008, 10:31
|
| | Gaduła |
Prosze o komenty 
Napisalem skrypt i chce znac wasze zdanie na jego temat 
Nie wiem czy robic dalej czy nie ?:P
| |
| | |
19-07-2008, 23:55
|
| | Bywalec | Prośba
Ja mam taką prośbę mógłbyś mi pomóc z skryptami do Ots pod TFS??
@Topic:
Mi działa dobrze jest w porządku | |
| | |
20-07-2008, 22:48
|
| | Gaduła |
A dokladniej o jakie skrypty chodzi?
@topic
Ciesze sie ze sie podoba po to to robilem | |
| | |
23-07-2008, 07:18
|
| | Nowicjusz |
Dobra robota 
@up jak chcesz to dalej rób scripty, niezle Ci wychodzi;s
| |
| | |
26-07-2008, 23:41
|
| | Bywalec |
Chodzi mi o skrypt kuźnia podawany w dziale skryptów oraz chcę aby ktoś mi pomógł zrobić kilka spelli.
| |
| | |
27-07-2008, 00:49
|
| | Nowicjusz | ok
MAM TFS NA tibie 8.21 i nie dziala mi npc od addonow prosze o kontakt numer gg 2754443
blad wyswietlany w konsoli
[27/07/2008 00:43:56] Lua Script Error: [Npc interface]
[27/07/2008 00:43:56] data/npc/scripts/addons.lua  nCreatureSay
[27/07/2008 00:43:56] data/npc/scripts/addons.lua:53: attempt to call global 'doPlayerAddAddon' (a nil value)
[27/07/2008 00:43:56] stack traceback:
[27/07/2008 00:43:56] data/npc/scripts/addons.lua:53: in function 'callback'
[27/07/2008 00:43:56] data/npc/lib/npcsystem/npchandler.lua:268: in function 'onCreatureSay'
[27/07/2008 00:43:56] data/npc/scripts/addons.lua:8: in function <data/npc/scripts/addons.lua:8>
| |
| | |
29-07-2008, 08:14
|
| | Gaduła | Kod: [27/07/2008 00:43:56] data/npc/scripts/addons.lua:53: attempt to call global 'doPlayerAddAddon' (a nil value)
Oznacza ze nie ma funkcji czyli zamien ja na: i powinno dzialac
| |
| | |
29-07-2008, 10:22
|
| | Bywalec |
Super ;p Pozdroo :P xD
Działa mi xd !
| |
| | |
15-08-2008, 00:37
|
| | Bywalec |
[15/08/2008 00:37:10] Lua Script Error: [Npc interface]
[15/08/2008 00:37:10] data/npc/scripts/addon.lua  nCreatureSay
[15/08/2008 00:37:10] data/npc/scripts/addon.lua:43: attempt to call global 'getPlayerOutfitAddon' (a nil value)
[15/08/2008 00:37:10] stack traceback:
[15/08/2008 00:37:10] data/npc/scripts/addon.lua:43: in function 'callback'
[15/08/2008 00:37:10] data/npc/lib/npcsystem/npchandler.lua:268: in function 'onCreatureSay'
[15/08/2008 00:37:10] data/npc/scripts/addon.lua:25: in function <data/npc/scripts/addon.lua:25>
nie dziala zmieniałem
| |
| | |
15-08-2008, 21:39
|
| | Nowicjusz |
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
Lua Script Error: [Npc interface]
data/npc/scripts/addon.lua
data/npc/scripts/addon.lua:1: attempt to index global 'KeywordHandler' (a nil va
lue)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/addon.lua
--------------------------------------------------------------------------
Natomiast mi wyskoczylo takie cos :/ prosze pomocy
| |
| | |
15-08-2008, 22:09
|
| | Any doubts? |
//up
a jaka wersje tfsa masz? I czy masz npc system?
//2x up
nie masz "o" w onCreatureSay a doPlayerAddOutfit dobrze zamieniles z wielkimi literami?
| |
| | |
23-08-2008, 21:40
|
| | Nowicjusz | Odp: [8.1][TFS]Real Norseman Addon NPC
A Da Sie go pzrekompilowac na 8.21?
z real trade system?
bo mam TFS Rl Trade System Npc ALe nie potrafie go przekompilowac pod 8.21
:[
| |
| | |
26-08-2008, 19:29
|
| | Bywalec | Odp: [8.1][TFS]Real Norseman Addon NPC
Ja mam z tym problem. Na najnowszym TFS callback w ogóle nie dziala. Na to co jest w parametrach w xmlu to nie ma problemu ale if msgcontains w callbacku w lua w ogóle olewa (nie ma żadnego bledu w konsoli ale npc nie odpowiada)
PS. Przy okazji otland padl i nie moge sprawdzić czy wydali może nowy patch do 0.2 żeby to naprawić | |
| | |
28-08-2008, 16:55
|
| | Początkujący | Odp: [8.1][TFS]Real Norseman Addon NPC Dobry Skrypcik Mi Sie napewno Przyda | |
| | | Narzędzia tematu | | | | Wygląd | Wygląd liniowy | |
Podobne wątki | | [8.0-8.3] Npc Addoner - Witajcie.
Przedstawiam Wam scrypt autorstwa Gesiora z otland'u. Jest to npc addoner który sprzedaje addony na starym jak i na nowym systemie npc.... Shadow, 16-11-2008 [8.1]Quest na addon utrzymany w klimacie rpg - Pisałem że napisze skrypt podobny do tego "npc do sagi"
postanowiłem zrobić quest na addon piracki. Zadanie utrzymane jest w klimacie rpg. Może... Sharky, 15-11-2008 Poszukuje Npc Addon - Witam w Tym Temacie Poszukuje Npc właściwie pare npc o nazwach "Pirate Addon" i ten npc stal by np. na Demonach i podchodzi sie do niego pisze sie Hi... CIeLmA, 25-10-2008 [8.21]Addony ? Help - Witam, otóż mam taki problem: nie działają mi skryty na wymianę itemów za addony;/ dokladnie mam silnik TFS 0.2.13 i uzywam skryptu(całęgo nie... Avengers, 17-09-2008 Bot z Addon. - Siema!
Ostatnio na rl tibii widziałem 2 kolesi którzy nie mieli pacca a mimo tego widziałem ich full addon Warriora czy istnieje jakiś boot który... Legolas, 31-08-2008
| | Tibia.net.pl: NPC () Temat: [8.1][TFS]Real Norseman Addon NPC Witajcie zrobilem NPC Norseman Pod TFS tak jak na Real [...] | Czasy w strefie GMT +1. Teraz jest 04:31. | | |