Quantcast
Channel: Tibia.net.pl - welcome to OpenTibia community
Viewing all articles
Browse latest Browse all 3598

Skrypty & Kody Creaturescripts problem

$
0
0
Próbowałem napisać skrypt ale nic się nie dzieje Skrypt jest pod TFS 1.2 (10.90) jestem w tym nowicjusz straszny od razu mowie
Skrypt wygląda tak :

Kod Lua:
  1. local config =
  2. {
  3. [2] = {x = {
  4. efe= 2,
  5. hp= 25,
  6. mn= 12,
  7. efesum= 2
  8. }
  9. },
  10. [31] = {x = {
  11. efe= 14,
  12. hp= 30,
  13. mn= 20,
  14. efesum= 16
  15. }
  16. },
  17. }
  18.  
  19. function onThink(cid, interval)
  20. summon = config[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType]
  21.  
  22. if creature:isPlayer() then
  23. creature:getPosition():sendMagicEffect(summon.x.ef e)
  24. creature:addHealth(summon.x.hp)
  25. creature:addMana(summon.x.mn)
  26. player:addManaSpent(player:getVocation():getRequir edManaSpent(player:getBaseMagicLevel() + summon.x.mp) - player:getManaSpent())
  27. local summons = creature:getSummons()
  28. for i = 1, #summons do
  29. summons[i]:getPosition():sendMagicEffect(summon.x.efesum)
  30. end
  31. end
  32. return true
  33. end


Mógł by ktoś to naprawić i napisać z wyjaśnieniem dla czego tak ma być był bym wdzięczny :)

Viewing all articles
Browse latest Browse all 3598