What's new

B??d przy kupowaniu itemk?w.

Status
Not open for further replies.

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Witam. Skrypt na kupowanie pochodzi oryginalnie z silnika TFSa 0.3.6pl1 przerobiony przezemnie na kupowanie w sklepie magicznym oto on :

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook')
shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 'magic lightwand')

shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion')
shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion')
shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion')
shopModule:addBuyableItem({'strong health'}, 7588, 100, 1, 'strong health potion')
shopModule:addBuyableItem({'strong mana'}, 7589, 80, 1, 'strong mana potion')
shopModule:addBuyableItem({'great health'}, 7591, 190, 1, 'great health potion')
shopModule:addBuyableItem({'great mana'}, 7590, 120, 1, 'great mana potion')
shopModule:addBuyableItem({'great spirit'}, 8472, 190, 1, 'great spirit potion')
shopModule:addBuyableItem({'ultimate health'}, 8473, 310, 1, 'ultimate health potion')
shopModule:addBuyableItem({'antidote potion'}, 8474, 50, 1, 'antidote potion')

shopModule:addBuyableItem({'instense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 350, 3, 'sudden death rune')
shopModule:addBuyableItem({'death arrow'}, 2263, 300, 3, 'death arrow rune')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
shopModule:addBuyableItem({'animate dead'}, 2316, 375, 1, 'animate dead rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'desintegrate'}, 2310, 80,  3, 'desintegreate rune')

shopModule:addBuyableItem({'wand of vortex'}, 2190, 500, 'wand of vortex')
shopModule:addBuyableItem({'wand of dragonbreath'}, 2191, 1000, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of decay'}, 2188, 5000, 'wand of decay')
shopModule:addBuyableItem({'wand of draconia'}, 8921, 7500, 'wand of draconia')
shopModule:addBuyableItem({'wand of cosmic energy'}, 2189, 10000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of inferno'}, 2187, 15000, 'wand of inferno')
shopModule:addBuyableItem({'wand of starstorm'}, 8920, 18000, 'wand of starstorm')
shopModule:addBuyableItem({'wand of voodoo'}, 8922, 22000, 'wand of voodoo')

shopModule:addBuyableItem({'snakebite rod'}, 2182, 500, 'snakebite rod')
shopModule:addBuyableItem({'moonlight rod'}, 2186, 1000, 'moonlight rod')
shopModule:addBuyableItem({'necrotic rod'}, 2185, 5000, 'necrotic rod')
shopModule:addBuyableItem({'northwind rod'}, 8911, 7500, 'northwind rod')
shopModule:addBuyableItem({'terra rod'}, 2181, 10000, 'terra rod')
shopModule:addBuyableItem({'hailstorm rod'}, 2183, 15000, 'hailstorm rod')
shopModule:addBuyableItem({'springsprout rod'}, 8912, 18000, 'springsprout rod')
shopModule:addBuyableItem({'underworld rod'}, 8910, 22000, 'underworld rod')

shopModule:addSellableItem({'wand of vortex'}, 2190, 250, 'wand of vortex')
shopModule:addSellableItem({'wand of dragonbreath'}, 2191, 500, 'wand of dragonbreath')
shopModule:addSellableItem({'wand of decay'}, 2188, 2500, 'wand of decay')
shopModule:addSellableItem({'wand of draconia'}, 8921, 3750, 'wand of draconia')
shopModule:addSellableItem({'wand of cosmic energy'}, 2189, 5000, 'wand of cosmic energy')
shopModule:addSellableItem({'wand of inferno'},2187, 7500, 'wand of inferno')
shopModule:addSellableItem({'wand of starstorm'}, 8920, 9000, 'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo'}, 8922, 11000, 'wand of voodoo')

shopModule:addSellableItem({'snakebite rod'}, 2182, 250,'snakebite rod')
shopModule:addSellableItem({'moonlight rod'}, 2186, 500,   'moonlight rod')
shopModule:addSellableItem({'necrotic rod'}, 2185, 2500, 'necrotic rod')
shopModule:addSellableItem({'northwind rod'}, 8911, 3750, 'northwind rod')
shopModule:addSellableItem({'terra rod'}, 2181, 5000, 'terra rod')
shopModule:addSellableItem({'hailstorm rod'}, 2183, 7500, 'hailstorm rod')
shopModule:addSellableItem({'springsprout rod'}, 8912, 9000, 'springsprout rod')
shopModule:addSellableItem({'underworld rod'}, 8910, 11000, 'underworld rod')


npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Kiedy kupuj? runki, potki to wszystko jest ok, ale je?li chc? kupi? np r??d?k? oboj?tnie jak? to wyskakuje mi taki b??d w silniku :

beztytuuvdm.png


Niniejsze skrypty w kt?rych jest b??d s? oryginalnymi z TFSa.

module.lua linijki 1156 oraz 1292 :

1156:

Code:
		if(shopItem.buy == -1) then
			[COLOR="Red"]error("[ShopModule.onSell]", "Attempt to purchase an item which only sellable")[/COLOR]
			return false
		end

1292 :

Code:
function(cid, itemid, subType, amount, ignoreCap, inBackpacks)
				[COLOR="Red"]module.npcHandler:onBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks)[/COLOR]
			end,

oraz npchandler.lua linijki 263 oraz 440 :

263 :

Code:
function NpcHandler:processModuleCallback(id, ...)
		local ret = true
		for i, module in pairs(self.modules) do
			local tmpRet = true
			if(id == CALLBACK_CREATURE_APPEAR and module.callbackOnCreatureAppear ~= nil) then
				tmpRet = module:callbackOnCreatureAppear(unpack(arg))
			elseif(id == CALLBACK_CREATURE_DISAPPEAR and module.callbackOnCreatureDisappear ~= nil) then
				tmpRet = module:callbackOnCreatureDisappear(unpack(arg))
			elseif(id == CALLBACK_CREATURE_SAY and module.callbackOnCreatureSay ~= nil) then
				tmpRet = module:callbackOnCreatureSay(unpack(arg))
			elseif(id == CALLBACK_PLAYER_ENDTRADE and module.callbackOnPlayerEndTrade ~= nil) then
				tmpRet = module:callbackOnPlayerEndTrade(unpack(arg))
			elseif(id == CALLBACK_PLAYER_CLOSECHANNEL and module.callbackOnPlayerCloseChannel ~= nil) then
				tmpRet = module:callbackOnPlayerCloseChannel(unpack(arg))
			elseif(id == CALLBACK_ONBUY and module.callbackOnBuy ~= nil) then
				[COLOR="Red"]tmpRet = module:callbackOnBuy(unpack(arg))[/COLOR]
			elseif(id == CALLBACK_ONSELL and module.callbackOnSell ~= nil) then
				tmpRet = module:callbackOnSell(unpack(arg))
			elseif(id == CALLBACK_ONTHINK and module.callbackOnThink ~= nil) then
				tmpRet = module:callbackOnThink(unpack(arg))
			elseif(id == CALLBACK_GREET and module.callbackOnGreet ~= nil) then
				tmpRet = module:callbackOnGreet(unpack(arg))
			elseif(id == CALLBACK_FAREWELL and module.callbackOnFarewell ~= nil) then
				tmpRet = module:callbackOnFarewell(unpack(arg))
			elseif(id == CALLBACK_MESSAGE_DEFAULT and module.callbackOnMessageDefault ~= nil) then
				tmpRet = module:callbackOnMessageDefault(unpack(arg))
			elseif(id == CALLBACK_MODULE_RESET and module.callbackOnModuleReset ~= nil) then
				tmpRet = module:callbackOnModuleReset(unpack(arg))
			end

440 :

Code:
function NpcHandler:onBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks)
		local callback = self:getCallback(CALLBACK_ONBUY)
		if(callback == nil or callback(cid, itemid, subType, amount, ignoreCap, inBackpacks)) then
			[COLOR="Red"]if(self:processModuleCallback(CALLBACK_ONBUY, cid, itemid, subType, amount, ignoreCap, inBackpacks)) then[/COLOR]
				--
			end
		end
	end

Nie wiem co jest z nimi nie tak :(
 

Nights

Ten typ ;)
Joined
May 12, 2010
Messages
350
Reaction score
32
Odp: B??d przy kupowaniu itemk?w.

A czy przy "magic lightwand" lub "spellbooku" te? tak jest? Bo wydaje mi si?, ?e przy nich nie poda?e? ilo?ci.
 

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: B??d przy kupowaniu itemk?w.

Sprawdz? i dam edita.

@edit
Poprawi?em owe braki w ilo?ci, ale teraz jest co? takiego.

a33fdc4e9ab96135.png


Te z nr 1 mog? normalnie kupi? i sprzeda?, ale nie maja opisu :<
 
Last edited:

Nights

Ten typ ;)
Joined
May 12, 2010
Messages
350
Reaction score
32
Odp: B??d przy kupowaniu itemk?w.

Poka? skrypt po dodaniu ilo?ci, bo zapewne co? ?le dopisa?e? =d
 

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: B??d przy kupowaniu itemk?w.

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addBuyableItem({'spellbook'}, 2175, 150, 1, 'spellbook')
shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 1, 'magic lightwand')

shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion')
shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion')
shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion')
shopModule:addBuyableItem({'strong health'}, 7588, 100, 1, 'strong health potion')
shopModule:addBuyableItem({'strong mana'}, 7589, 80, 1, 'strong mana potion')
shopModule:addBuyableItem({'great health'}, 7591, 190, 1, 'great health potion')
shopModule:addBuyableItem({'great mana'}, 7590, 120, 1, 'great mana potion')
shopModule:addBuyableItem({'great spirit'}, 8472, 190, 1, 'great spirit potion')
shopModule:addBuyableItem({'ultimate health'}, 8473, 310, 1, 'ultimate health potion')
shopModule:addBuyableItem({'antidote potion'}, 8474, 50, 1, 'antidote potion')

shopModule:addBuyableItem({'instense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 350, 3, 'sudden death rune')
shopModule:addBuyableItem({'death arrow'}, 2263, 300, 3, 'death arrow rune')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
shopModule:addBuyableItem({'animate dead'}, 2316, 375, 1, 'animate dead rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'desintegrate'}, 2310, 80,  3, 'desintegreate rune')

shopModule:addBuyableItem({'wand of vortex'}, 2190, 500, 1, 'wand of vortex')
shopModule:addBuyableItem({'wand of dragonbreath'}, 2191, 1, 1000, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of decay'}, 2188, 5000, 1, 'wand of decay')
shopModule:addBuyableItem({'wand of draconia'}, 8921, 7500, 1, 'wand of draconia')
shopModule:addBuyableItem({'wand of cosmic energy'}, 2189, 1, 10000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of inferno'}, 2187, 15000, 1, 'wand of inferno')
shopModule:addBuyableItem({'wand of starstorm'}, 8920, 18000, 1, 'wand of starstorm')
shopModule:addBuyableItem({'wand of voodoo'}, 8922, 22000, 1, 'wand of voodoo')

shopModule:addBuyableItem({'snakebite rod'}, 2182, 500, 1, 'snakebite rod')
shopModule:addBuyableItem({'moonlight rod'}, 2186, 1000, 1, 'moonlight rod')
shopModule:addBuyableItem({'necrotic rod'}, 2185, 5000, 1, 'necrotic rod')
shopModule:addBuyableItem({'northwind rod'}, 8911, 7500, 1, 'northwind rod')
shopModule:addBuyableItem({'terra rod'}, 2181, 10000, 1, 'terra rod')
shopModule:addBuyableItem({'hailstorm rod'}, 2183, 15000, 1, 'hailstorm rod')
shopModule:addBuyableItem({'springsprout rod'}, 8912, 18000, 1, 'springsprout rod')
shopModule:addBuyableItem({'underworld rod'}, 8910, 22000, 1, 'underworld rod')

shopModule:addSellableItem({'wand of vortex'}, 2190, 250, 1, 'wand of vortex')
shopModule:addSellableItem({'wand of dragonbreath'}, 2191, 500, 1, 'wand of dragonbreath')
shopModule:addSellableItem({'wand of decay'}, 2188, 2500, 1, 'wand of decay')
shopModule:addSellableItem({'wand of draconia'}, 8921, 3750, 1, 'wand of draconia')
shopModule:addSellableItem({'wand of cosmic energy'}, 2189, 5000, 1, 'wand of cosmic energy')
shopModule:addSellableItem({'wand of inferno'},2187, 7500, 1, 'wand of inferno')
shopModule:addSellableItem({'wand of starstorm'}, 8920, 9000, 1, 'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo'}, 8922, 11000, 1, 'wand of voodoo')

shopModule:addSellableItem({'snakebite rod'}, 2182, 250, 1, 'snakebite rod')
shopModule:addSellableItem({'moonlight rod'}, 2186, 500, 1, 'moonlight rod')
shopModule:addSellableItem({'necrotic rod'}, 2185, 2500, 1, 'necrotic rod')
shopModule:addSellableItem({'northwind rod'}, 8911, 3750, 1, 'northwind rod')
shopModule:addSellableItem({'terra rod'}, 2181, 5000, 1, 'terra rod')
shopModule:addSellableItem({'hailstorm rod'}, 2183, 7500, 1, 'hailstorm rod')
shopModule:addSellableItem({'springsprout rod'}, 8912, 9000, 1, 'springsprout rod')
shopModule:addSellableItem({'underworld rod'}, 8910, 11000, 1, 'underworld rod')


npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback, cid)
npcHandler:addModule(FocusModule:new())
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: B??d przy kupowaniu itemk?w.

A spr?buj tego sposobu:
PHP:
local trade = {
				{id=2187, buy=15000, sell=3000, name="wand of inferno"},
				{id=2189, buy=10000, sell=2500, name="wand of cosmic energy"}
				}

local items = {}
for _, item in ipairs(trade) do
	items[item.id] = {storage = item.storage, item_id = item.id, buyPrice = item.buy, sellPrice = item.sell, subType = 0, realName = item.name}
end

local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
	if items[item].buyPrice ~= 0 then
		doPlayerRemoveMoney(cid, amount * items[item].buyPrice)
		for i = 1, amount do
			doPlayerAddItem(cid, items[item].item_id, amount)
		end
		doNPCTalkALot(cid, 200, {"You bought "..amount.." "..items[item].realName.." for "..items[item].buyPrice * amount.." gold coins."})
	end
end
 
local onSell = function(cid, item, subType, amount, ignoreCap, inBackpacks)
	if items[item].sellPrice ~= 0 then
		doPlayerAddMoney(cid, items[item].sellPrice * amount)
		doPlayerRemoveItem(cid, items[item].item_id, amount)
		doNPCTalkALot(cid, 200, {"You sell "..amount.." "..items[item].realName.." for "..items[item].sellPrice * amount.." gold coins."})
	end
end

if msgcontains(msg, 'trade') or msgcontains(msg, 'offer') then
	openShopWindow(cid, trade, onBuy, onSell)
	selfSay("It's my offer.", cid)
end
 

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: B??d przy kupowaniu itemk?w.

A przepraszam bardzo, gdzie to wklei? ?
 

Arts18

Signed...
Joined
May 7, 2009
Messages
2,888
Reaction score
231
Age
33
Odp: B??d przy kupowaniu itemk?w.

@up

Dodaj to w data/npc/scripts. Podmie? skrypt na ten i sprawdzimy.
 
Z

Zbizu

Guest
Odp: B??d przy kupowaniu itemk?w.

moim zdaniem b??d jest bardziej przyziemny.
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'wand of cosmic energy'}, 2189, 1, 10000, 'wand of cosmic energy')
W niekt?rych miejscach masz poprzestawian? ilo?? z kosztem

Pozdrawiam.
 

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: B??d przy kupowaniu itemk?w.

@up

Nic nie da?o.

@Oskar

Po zamianie skryptu na tw?j w konsoli wyskakuje co? takiego :

beztytuujua.png


npc.lua :

Code:
[COLOR="Red"]local a, b = message:lower():find(keyword:lower())[/COLOR]
	if(a ~= nil and b ~= nil) then
		return true
 
Last edited:

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: B??d przy kupowaniu itemk?w.

Refresh.. Nikt nie wie co jest nie tak? :(
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: B??d przy kupowaniu itemk?w.

PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
function creatureSayCallback(cid, type, msg)
        if(not npcHandler:isFocused(cid)) then
                return false
        end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
local trade = {
                {id=2187, buy=15000, sell=3000, name="wand of inferno"},
                {id=2189, buy=10000, sell=2500, name="wand of cosmic energy"}
                }

local items = {}
for _, item in ipairs(trade) do
    items[item.id] = {storage = item.storage, item_id = item.id, buyPrice = item.buy, sellPrice = item.sell, subType = 0, realName = item.name}
end

local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
    if items[item].buyPrice ~= 0 then
        doPlayerRemoveMoney(cid, amount * items[item].buyPrice)
        for i = 1, amount do
            doPlayerAddItem(cid, items[item].item_id, amount)
        end
        doNPCTalkALot(cid, 200, {"You bought "..amount.." "..items[item].realName.." for "..items[item].buyPrice * amount.." gold coins."})
    end
end
 
local onSell = function(cid, item, subType, amount, ignoreCap, inBackpacks)
    if items[item].sellPrice ~= 0 then
        doPlayerAddMoney(cid, items[item].sellPrice * amount)
        doPlayerRemoveItem(cid, items[item].item_id, amount)
        doNPCTalkALot(cid, 200, {"You sell "..amount.." "..items[item].realName.." for "..items[item].sellPrice * amount.." gold coins."})
    end
end

if msgcontains(msg, 'trade') or msgcontains(msg, 'offer') then
    openShopWindow(cid, trade, onBuy, onSell)
    selfSay("It's my offer.", cid)
end  
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
To NPC, nie funkcja.
 

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: B??d przy kupowaniu itemk?w.

Wszystko ok tylko wyskakuj? b??d w funkcji :
Code:
doNPCTalkALot

Code:
attempt to call global 'doNPCTalkALot' < a ani value>
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: B??d przy kupowaniu itemk?w.

W data/NPC/lib znajd? npc.lua i wklej:
PHP:
function doNPCTalkALot(cid,delay,messages)
		for i = 1,#messages do
			addEvent(doCreatureSay,delay * i, getNpcCid(), messages[i], TALKTYPE_PRIVATE_NP, false, cid)
		end
end

Notka moderatorska:
OT Expert, + 1pkt
 
Last edited by a moderator:

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: B??d przy kupowaniu itemk?w.

Ehh zazdroszcz? Ci tych umiej?tno?ci :> Rep++ Wszystko dzia?a
 
Status
Not open for further replies.
Top