TFS 0.X bless script problem

Discussion in 'Support' started by vexler222, Oct 2, 2018.

  1. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
    Hi, i have problem with bless command, cuz if i die with bless, my level going down to 1 ;/

    Code (Text):
    1.  
    2. --- Created for otsmateria.com (c)----
    3.  
    4. -- !bless by Piotrek1447
    5. -- edited by Kleksu
    6. local bless = {1, 2, 3, 4, 5}
    7. local cost = 100000 -- Cost in gp.
    8. function onSay(cid, words, param)
    9. if(not checkExhausted(cid, 646, 6)) then
    10.     return true
    11. end
    12.     for i = 1, table.maxn(bless) do
    13.         if(getPlayerBlessing(cid, bless[i])) then
    14.             doPlayerSendCancel(cid, "You have already all blessings.")
    15.             return TRUE
    16.         end
    17.     end
    18.     if(doPlayerRemoveMoney(cid, cost) == TRUE) then
    19.         for i = 1, table.maxn(bless) do
    20.             doPlayerAddBlessing(cid, bless[i])
    21.         end
    22.         doPlayerSendTextMessage(cid,24, "You bought all blessing.")
    23.         doSendMagicEffect(getPlayerPosition(cid), 39)
    24.     else
    25.         doPlayerSendCancel(cid, "You don't have enough money.")
    26.     end
    27.     return TRUE
    28. end
     
  2. Sarah Wesker

    Sarah Wesker ค∂vαηcε รүηтαx ❤

    Joined:
    Mar 16, 2017
    Messages:
    313
    Likes Received:
    142
    Best Answers:
    22
    .1) change the configuration of the variable
    Code (Text):
    1. deathLosePercent
    on config.lua
     
  3. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
    i have "0" in this variable deathLostPercent = 0
    so i must change it for what?
     
  4. Sarah Wesker

    Sarah Wesker ค∂vαηcε รүηтαx ❤

    Joined:
    Mar 16, 2017
    Messages:
    313
    Likes Received:
    142
    Best Answers:
    22
    test with (10) or (-1)
     
  5. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
    not work, and now i have it in console

    Code (Text):
    1.  
    2. mysql_real_query(): UPDATE `players` SET `lastlogin` = 1538510523, `lastip` = 400010605, `level` = 15, `group_id` = 1, `health` = 255, `healthmax` = 255, `experience` = 39000, `lookbody` = 68, `lookfeet` = 76, `lookhead` = 78, `looklegs` = 58, `looktype` = 128, `lookaddons` = 0, `maglevel` = 0, `mana` = 210, `manamax` = 210, `manaspent` = 1600, `soul` = 99, `town_id` = 1, `posx` = 1053, `posy` = 1092, `posz` = 7, `cap` = 610, `sex` = 1, `balance` = 0, `stamina` = 151200000, `skull` = 0, `skulltime` = 0, `promotion` = 0, `conditions` = '\0 \0\0������\0\Z\0\0\0\00\0\0\[email protected]\0\0\0\0\0�\0\0\0\0\0�\0\0\0����<s\0\0\Z\0\0\0\00\0\0\0�\0\0�\0����0u\0\0\Z\0\0\0\00\0\0\0�\[email protected]\0\0������\0\Z\0\0\0\00\0\0\0\0\0\0��\0�', `loss_experience` = 4294967286, `loss_mana` = 0, `loss_skills` = 0, `loss_containers` = 100, `loss_items` = 100, `lastlogout` = 1538494900, `blessings` = 0, `marriage` = 0, `guildnick` = '', `rank_id` = 0, `vocation` = 3 WHERE `id` = 8 LIMIT 1; - MYSQL ERROR: Out of range value for column 'loss_experience' at row 1 (1264)
    3. [22:2:35.625] mysql_real_query(): UPDATE `players` SET `lastlogin` = 1538510523, `lastip` = 400010605, `level` = 15, `group_id` = 1, `health` = 255, `healthmax` = 255, `experience` = 39000, `lookbody` = 68, `lookfeet` = 76, `lookhead` = 78, `looklegs` = 58, `looktype` = 128, `lookaddons` = 0, `maglevel` = 1, `mana` = 150, `manamax` = 210, `manaspent` = 0, `soul` = 99, `town_id` = 1, `posx` = 1246, `posy` = 1127, `posz` = 6, `cap` = 610, `sex` = 1, `balance` = 0, `stamina` = 151185500, `skull` = 0, `skulltime` = 0, `promotion` = 0, `conditions` = '\0 \0\0����8�\0\Z\0\0\0\00\0\0\[email protected]\0\0\0\0\0�\0\0\0\0\0�\0\0\0�����<\0\0\Z\0\0\0\00\0\0\0�\0\0�\0�����<\0\0\Z\0\0\0\00\0\0\0�\[email protected]\0\0�����p\0\Z\0\0\0\00\0\0\0\0\0\0��\0�\0\0\0�����\0\0\Z\0\0\0\0\0\0\0�\0\0 \0�����\0\0\Z\0\0\0\00\0\0\0�\0\0\0�����\0\0\Z\0\0\0\0\0\0\0�', `loss_experience` = 4294967286, `loss_mana` = 0, `loss_skills` = 0, `loss_containers` = 100, `loss_items` = 100, `lastlogout` = 1538494900, `blessings` = 0, `marriage` = 0, `guildnick` = '', `rank_id` = 0, `vocation` = 3 WHERE `id` = 8 LIMIT 1; - MYSQL ERROR: Out of range value for column 'loss_experience' at row 1 (1264)
    4. [22:2:35.626] mysql_real_query(): UPDATE `players` SET `lastlogin` = 1538510523, `lastip` = 400010605, `level` = 15, `group_id` = 1, `health` = 255, `healthmax` = 255, `experience` = 39000, `lookbody` = 68, `lookfeet` = 76, `lookhead` = 78, `looklegs` = 58, `looktype` = 128, `lookaddons` = 0, `maglevel` = 2, `mana` = 150, `manamax` = 210, `manaspent` = 0, `soul` = 99, `town_id` = 1, `posx` = 1246, `posy` = 1127, `posz` = 6, `cap` = 610, `sex` = 1, `balance` = 0, `stamina` = 151185500, `skull` = 0, `skulltime` = 0, `promotion` = 0, `conditions` = '\0 \0\0����8�\0\Z\0\0\0\00\0\0\[email protected]\0\0\0\0\0�\0\0\0\0\0�\0\0\0�����<\0\0\Z\0\0\0\00\0\0\0�\0\0�\0�����<\0\0\Z\0\0\0\00\0\0\0�\[email protected]\0\0�����p\0\Z\0\0\0\00\0\0\0\0\0\0��\0�\0\0\0�����\0\0\Z\0\0\0\0\0\0\0�\0\0 \0�����\0\0\Z\0\0\0\00\0\0\0�\0\0\0�����\0\0\Z\0\0\0\0\0\0\0�', `loss_experience` = 4294967286, `loss_mana` = 0, `loss_skills` = 0, `loss_containers` = 100, `loss_items` = 100, `lastlogout` = 1538494900, `blessings` = 0, `marriage` = 0, `guildnick` = '', `rank_id` = 0, `vocation` = 3 WHERE `id` = 8 LIMIT 1; - MYSQL ERROR: Out of range value for column 'loss_experience' at row 1 (1264)
    5.  

    i tested with -1, 10, 100 and everytime, console print this error
     
  6. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
  7. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
  8. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
  9. SkeybaOTS

    SkeybaOTS New Member

    Joined:
    Oct 1, 2018
    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    function onSay(cid, words, param)

    if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then

    doPlayerSendCancel(cid,'You aleready have bless!')

    else

    if doPlayerRemoveMoney(cid, 50000) == TRUE then

    doPlayerAddBlessing(cid, 1)

    doPlayerAddBlessing(cid, 2)

    doPlayerAddBlessing(cid, 3)

    doPlayerAddBlessing(cid, 4)

    doPlayerAddBlessing(cid, 5)

    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)

    doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,''You has been blessed by gods.')

    else

    doPlayerSendCancel(cid, "You need 50k to get blessed!")

    end

    end

    return 1

    end
     
  10. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
    not work ;/ still i get first level
     
  11. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
  12. Bogart

    Bogart ...has super panda powers

    Joined:
    Jun 21, 2009
    Messages:
    8,001
    Likes Received:
    546
    Best Answers:
    23
  13. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
  14. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
  15. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
  16. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2
  17. vexler222

    vexler222 Member

    Joined:
    Apr 22, 2012
    Messages:
    258
    Likes Received:
    4
    Best Answers:
    2

Share This Page

Loading...