Quantcast
Channel: Tibia.net.pl - welcome to OpenTibia community
Viewing full articles (3598 articles)
Browse article index
↧

Skrypty & Kody Błąd z creaturescripts

$
0
0
Witajcie!

Mam problem z jednym skryptem:

Kod Lua:
  1. local config = {
  2. ['xxx'] = {amount = 1, storage = 190700}, ----- write name of monster and any empty storage
  3. ['xxx'] = {amount = 1, storage = 19001} ---- same here
  4. }
  5. local Reward_boss = {2280,2278,2263,2275,2646,2272,2160} -- put here id of most items to be won
  6. function onKill(cid, target)
  7. local monster = config[getCreatureName(target):lower()]
  8. if isPlayer(target) or not monster or isSummon(target) then
  9. return true
  10. end
  11. local Reward = Reward_boss[math.random(1, #Reward_boss)]
  12. if (getPlayerStorageValue(cid, monster.storage)+1) < monster.amount then
  13. setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
  14. end
  15. if (getPlayerStorageValue(cid, monster.storage)+1) == monster.amount then
  16. doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations, you have killed '..getCreatureName(target)..' and received '..getItemNameById(Reward)..'.')
  17. doPlayerAddItem(cid, Reward,1)
  18. end
  19. return true
  20. end


Po ubiciu dostaję taki error:

[10:15:11.532] [Error - CreatureScript Interface]
[10:15:11.532] data/creaturescripts/scripts/caps.lua:eek:nKill
[10:15:11.532] Description:
[10:15:11.532] data/creaturescripts/scripts/caps.lua:8: attempt to call global 'isSummon' (a nil value)
[10:15:11.532] stack traceback:
[10:15:11.532] data/creaturescripts/scripts/caps.lua:8: in function <data/creaturescripts/scripts/caps.lua:6>
↧

Viewing full articles (3598 articles)
Browse article index

Latest Images

ABW, Herr Donald, Ĺťurek.

ABW, Herr Donald, Ĺťurek.

Weekendownik - pogrypnik

Weekendownik - pogrypnik

Weekendownik - pogrypnik

Weekendownik - pogrypnik

Pinsa z figami

Pinsa z figami

Pinsa z figami

Pinsa z figami

Pinsa z figami

Pinsa z figami

Ciasto marchewkowe - najlepsze

Ciasto marchewkowe - najlepsze

Ciasto marchewkowe - najlepsze

Ciasto marchewkowe - najlepsze

Kurczak z dynią i pieczarkami

Kurczak z dynią i pieczarkami



Latest Images

ABW, Herr Donald, Ĺťurek.

ABW, Herr Donald, Ĺťurek.

Weekendownik - pogrypnik

Weekendownik - pogrypnik

Weekendownik - pogrypnik

Weekendownik - pogrypnik

Pinsa z figami

Pinsa z figami

Pinsa z figami

Pinsa z figami

Pinsa z figami

Pinsa z figami

Ciasto marchewkowe - najlepsze

Ciasto marchewkowe - najlepsze

Ciasto marchewkowe - najlepsze

Ciasto marchewkowe - najlepsze

Kurczak z dynią i pieczarkami

Kurczak z dynią i pieczarkami