Ir para conteúdo

Nurse Nao heala Icons


Aberos

Posts Recomendados

Galera to dando uma mechida aki no Pfield Project feito pelo smix e nele ta com um bug em que a nurse nao heala os pokes com o icon system ativado , se der pra algeum da uma ajuda ae

aki esta o script

 

 

local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
local talkState = {}
local states = {'1', '2', '3', '4', '5', '6'}
local store = {1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151}
local unlock = {}
local pokeballs = {'2222', '2224'}
local ultraballs = {'2220', '2227'}
local greatballs = {'2651', '2657'}
local superballs = {'2653', '2658'}
local saffariballs = {'2655', '2659'}
local loveballs = {'11623', '11621'}
local dark = {'11620', '11618'}
local golden = {'11626','11624'}
local frase = {'11629', '11627'}
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye sir!')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then
if #getCreatureSummons(cid) == 1 then
selfSay('Sorry, puch your pokémon for pokeball.')
return true
end
if getPlayerStorageValue(cid, 230) >= 1 then
return selfSay('Wait a moment.')
end
setPlayerStorageValue(cid, 230, 1)
addEvent(setPlayerStorageValue, 2000, cid, 230, 0)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
doSendMagicEffect(getThingPos(cid), 132)
if isInArray(pokeballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 2222)
doCureAllStatus(feet.uid)
end
if isInArray(ultraballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 2220)
doCureAllStatus(feet.uid)
end
if isInArray(greatballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 2651)
doCureAllStatus(feet.uid)
end
if isInArray(superballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 2653)
doCureAllStatus(feet.uid)
end
if isInArray(saffariballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 2655)
doCureAllStatus(feet.uid)
end
if isInArray(loveballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 11621)
doCureAllStatus(feet.uid)
end
if isInArray(dark, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 11618)
doCureAllStatus(feet.uid)
end
if isInArray(golden, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 11624)
doCureAllStatus(feet.uid)
end
if isInArray(frash, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doTransformItem(feet.uid, 11627)
doCureAllStatus(feet.uid)
end
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
local items = getItemsInContainerById(bp.uid, 2224)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
doTransformItem(uid, 2222)
doCureAllStatus(uid)
end
local items = getItemsInContainerById(bp.uid, 2227)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
doTransformItem(uid, 2220)
doCureAllStatus(uid)
end
local items = getItemsInContainerById(bp.uid, 2657)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
doTransformItem(uid, 2651)
doCureAllStatus(uid)
end
local items = getItemsInContainerById(bp.uid, 2658)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
doTransformItem(uid, 2653)
doCureAllStatus(uid)
end
local items = getItemsInContainerById(bp.uid, 2659)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
doTransformItem(uid, 2655)
doCureAllStatus(uid)
end
local items = getItemsInContainerById(bp.uid, 2222)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 2220)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 2651)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 2653)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
------------ Novas balls
local items = getItemsInContainerById(bp.uid, 11623) -- Love
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 11621) -- Love
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 11620) -- dark
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 11618)-- dark
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 11626)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 11624)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 11629)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
local items = getItemsInContainerById(bp.uid, 11627)
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
end
selfSay('There you go! You and your pokemons are healthy again.')
end
end
function onThink()
if focus ~= 0 then
a, b, c = selfGetPosition()
if c ~= getThingPos(focus).z then
focus = 0
end
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 3 then
focus = 0
end
end
return true
end

vlw ae a todos
Editado por Aberos
Link para o comentário
Compartilhar em outros sites

Amigo, esse pfield foi a base usada para fazer o "DarkXpoke" (DxP), qualquer erro pega no server dxp ou entao se mata tentando arrumar esse ai o dxp ja ta avançado sem esses bugs seria mas prático usar ele, o erro q causa lag, no dxp q foi o motivo do smix parar eu ja descobri e ja passei pro Snix q falou q talvez poste denovo o server sem o erro critico!!!

Link para o comentário
Compartilhar em outros sites

Podem fecha o topic ja consegui arrumar , pra quem quiser o heal funcionando com o icon system ta ae

heal.lua

 

 

pokeballs = {
[1] = {effect = 10, on = 2222, use = 2223, off = 2224, all = {2222, 2223, 2224}},
[2] = {effect = 191, on = 2220, use = 2221, off = 2227, all = {2220, 2221, 2227}},
[3] = {effect = 190, on = 2653, use = 2654, off = 2658, all = {2653, 2654, 2658}},
[4] = {effect = 189, on = 2651, use = 2652, off = 2657, all = {2651, 2652, 2657}},
[5] = {effect = 195, on = 2655, use = 2656, off = 2659, all = {2655, 2656, 2659}},
[6] = {effect = 10, on = 7854, use = 7855, off = 7856, all = {7854, 7855, 7856}},
[7] = {effect = 189, on = 7860, use = 7861, off = 7862, all = {7860, 7861, 7862}},
[8] = {effect = 190, on = 7863, use = 7864, off = 7865, all = {7863, 7864, 7865}},
[9] = {effect = 191, on = 7857, use = 7858, off = 7859, all = {7857, 7858, 7859}},
[10] = {effect = 192, on = 11624, use = 11625, off = 11626, all = {11624, 11625, 11626}},
[11] ={effect = 193, on = 11627, use = 11628, off = 11629, all = {11627, 11628, 11629}},
[12] = {effect = 194, on = 11621, use = 11622, off = 11623, all = {11621, 11622, 11623}},
[13] = {effect = 196, on = 11618, use = 11619, off = 11620, all = {11618, 11619, 11620}},
[14] = {effect = 194, on = 7866, use = 7867, off = 7868, all = {7866, 7867, 7868}},
[15] = {effect = 193, on = 7869, use = 7870, off = 7871, all = {7869, 7870, 7871}},
[16] = {effect = 195, on = 7872, use = 7873, off = 7874, all = {7872, 7873, 7874}},
[17] = {effect = 192, on = 7875, use = 7876, off = 7877, all = {7875, 7876, 7877}},
[18] = {effect = 196, on = 7878, use = 7879, off = 7880, all = {7878, 7879, 7880}},
[19] = {effect = 196, on = 7881, use = 7882, off = 7883, all = {7881, 7882, 7883}},
[20] = {effect = 196, on = 11642, use = 11643, off = 11644, all = {11642, 11643, 11644}},
[21] = {effect = 196, on = 11645, use = 11646, off = 11647, all = {11645, 11646, 11647}},
[22] = {effect = 196, on = 11648, use = 11649, off = 11650, all = {11648, 11649, 11650}},
[23] = {effect = 196, on = 11651, use = 11652, off = 11653, all = {11651, 11652, 11653}},
[24] = {effect = 196, on = 11654, use = 11655, off = 11656, all = {11654, 11655, 11656}},
[25] = {effect = 196, on = 11657, use = 11658, off = 11659, all = {11657, 11658, 11659}},
[26] = {effect = 196, on = 11660, use = 11661, off = 11662, all = {11660, 11661, 11662}},
[27] = {effect = 196, on = 11663, use = 11664, off = 11665, all = {11663, 11664, 11665}},
[28] = {effect = 196, on = 11666, use = 11667, off = 11668, all = {11666, 11667, 11668}},
[29] = {effect = 196, on = 11669, use = 11670, off = 11671, all = {11669, 11670, 11671}},
[30] = {effect = 196, on = 11672, use = 11673, off = 11674, all = {11672, 11673, 11674}},
[31] = {effect = 196, on = 11675, use = 11676, off = 11677, all = {11675, 11676, 11677}},
[32] = {effect = 196, on = 11678, use = 11679, off = 11680, all = {11678, 11679, 11680}},
[33] = {effect = 196, on = 11681, use = 11682, off = 11683, all = {11681, 11682, 11683}},
[34] = {effect = 196, on = 11684, use = 11685, off = 11686, all = {11684, 11685, 11686}},
[35] = {effect = 196, on = 11687, use = 11688, off = 11689, all = {11687, 11688, 11689}},
[36] = {effect = 196, on = 11690, use = 11691, off = 11692, all = {11690, 11691, 11692}},
[37] = {effect = 196, on = 11693, use = 11694, off = 11695, all = {11693, 11694, 11695}},
[38] = {effect = 196, on = 11696, use = 11697, off = 11698, all = {11696, 11697, 11698}},
[39] = {effect = 196, on = 11699, use = 11700, off = 11701, all = {11699, 11700, 11701}},
[40] = {effect = 196, on = 11702, use = 11703, off = 11704, all = {11702, 11703, 11704}},
[41] = {effect = 196, on = 11705, use = 11706, off = 11707, all = {11705, 11706, 11707}},
[42] = {effect = 196, on = 11708, use = 11709, off = 11710, all = {11708, 11709, 11710}},
[43] = {effect = 196, on = 11711, use = 11712, off = 11713, all = {11711, 11712, 11713}},
[44] = {effect = 196, on = 11717, use = 11718, off = 11719, all = {11717, 11718, 11719}},
[45] = {effect = 196, on = 11720, use = 11721, off = 11722, all = {11720, 11721, 11722}},
[46] = {effect = 196, on = 11723, use = 11724, off = 11725, all = {11723, 11724, 11725}},
[47] = {effect = 196, on = 11726, use = 11727, off = 11728, all = {11726, 11727, 11728}},
[48] = {effect = 196, on = 11729, use = 11730, off = 11731, all = {11729, 11730, 11731}},
[49] = {effect = 196, on = 11732, use = 11733, off = 11734, all = {11732, 11733, 11734}},
[50] = {effect = 196, on = 11735, use = 11736, off = 11737, all = {11735, 11736, 11737}},
[51] = {effect = 196, on = 11738, use = 11739, off = 11740, all = {11738, 11739, 11740}},
[52] = {effect = 196, on = 11741, use = 11742, off = 11743, all = {11741, 11742, 11743}},
[53] = {effect = 196, on = 11744, use = 11745, off = 11746, all = {11744, 11745, 11746}},
[54] = {effect = 196, on = 11747, use = 11748, off = 11749, all = {11747, 11748, 11749}},
[55] = {effect = 196, on = 11750, use = 11751, off = 11752, all = {11750, 11751, 11752}},
[56] = {effect = 196, on = 11753, use = 11754, off = 11755, all = {11753, 11754, 11755}},
[57] = {effect = 196, on = 11756, use = 11757, off = 11758, all = {11756, 11757, 11758}},
[58] = {effect = 196, on = 11759, use = 11760, off = 11761, all = {11759, 11760, 11761}},
[59] = {effect = 196, on = 11762, use = 11763, off = 11764, all = {11762, 11763, 11764}},
[60] = {effect = 196, on = 11765, use = 11766, off = 11767, all = {11765, 11766, 11767}},
[61] = {effect = 196, on = 11768, use = 11769, off = 11770, all = {11768, 11769, 11770}},
[62] = {effect = 196, on = 11771, use = 11772, off = 11773, all = {11771, 11772, 11773}},
[63] = {effect = 196, on = 11774, use = 11775, off = 11776, all = {11774, 11775, 11776}},
[64] = {effect = 196, on = 11777, use = 11778, off = 11779, all = {11777, 11778, 11779}},
[65] = {effect = 196, on = 11780, use = 11781, off = 11782, all = {11780, 11781, 11782}},
[66] = {effect = 196, on = 11783, use = 11784, off = 11785, all = {11783, 11784, 11785}},
[67] = {effect = 196, on = 11786, use = 11787, off = 11788, all = {11786, 11787, 11788}},
[68] = {effect = 196, on = 11789, use = 11790, off = 11791, all = {11789, 11790, 11791}},
[69] = {effect = 196, on = 11792, use = 11793, off = 11794, all = {11792, 11793, 11794}},
[70] = {effect = 196, on = 11795, use = 11796, off = 11797, all = {11795, 11796, 11797}},
[71] = {effect = 196, on = 11798, use = 11799, off = 11800, all = {11798, 11799, 11800}},
[72] = {effect = 196, on = 11801, use = 11802, off = 11803, all = {11801, 11802, 11803}},
[73] = {effect = 196, on = 11804, use = 11805, off = 11806, all = {11804, 11805, 11806}},
[74] = {effect = 196, on = 11807, use = 11808, off = 11809, all = {11807, 11808, 11809}},
[75] = {effect = 196, on = 11810, use = 11811, off = 11812, all = {11810, 11811, 11812}},
[76] = {effect = 196, on = 11813, use = 11814, off = 11815, all = {11813, 11814, 11815}},
[77] = {effect = 196, on = 11816, use = 11817, off = 11818, all = {11816, 11817, 11818}},
[78] = {effect = 196, on = 11819, use = 11820, off = 11821, all = {11819, 11820, 11821}},
[79] = {effect = 196, on = 11822, use = 11823, off = 11824, all = {11822, 11823, 11824}},
[80] = {effect = 196, on = 11825, use = 11826, off = 11827, all = {11825, 11826, 11827}},
[81] = {effect = 196, on = 11828, use = 11829, off = 11830, all = {11828, 11829, 11830}},
[82] = {effect = 196, on = 11831, use = 11832, off = 11833, all = {11831, 11832, 11833}},
[83] = {effect = 196, on = 11834, use = 11835, off = 11836, all = {11834, 11835, 11836}},
[84] = {effect = 196, on = 11837, use = 11838, off = 11839, all = {11837, 11838, 11839}},
[85] = {effect = 196, on = 11840, use = 11841, off = 11842, all = {11840, 11841, 11842}},
[86] = {effect = 196, on = 11843, use = 11844, off = 11845, all = {11843, 11844, 11845}},
[87] = {effect = 196, on = 11846, use = 11847, off = 11848, all = {11846, 11847, 11848}},
[88] = {effect = 196, on = 11849, use = 11850, off = 11851, all = {11849, 11850, 11851}},
[89] = {effect = 196, on = 11852, use = 11853, off = 11854, all = {11852, 11853, 11854}},
[90] = {effect = 196, on = 11855, use = 11856, off = 11857, all = {11855, 11856, 11857}},
[91] = {effect = 196, on = 11858, use = 11859, off = 11860, all = {11858, 11859, 11860}},
[92] = {effect = 196, on = 11861, use = 11862, off = 11863, all = {11861, 11862, 11863}},
[93] = {effect = 196, on = 11864, use = 11865, off = 11866, all = {11864, 11865, 11866}},
[94] = {effect = 196, on = 11867, use = 11868, off = 11869, all = {11867, 11868, 11869}},
[95] = {effect = 196, on = 11870, use = 11871, off = 11872, all = {11870, 11871, 11872}},
[96] = {effect = 196, on = 11873, use = 11874, off = 11875, all = {11873, 11874, 11875}},
[97] = {effect = 196, on = 11876, use = 11877, off = 11878, all = {11876, 11877, 11878}},
[98] = {effect = 196, on = 11879, use = 11880, off = 11881, all = {11879, 11880, 11881}},
[99] = {effect = 196, on = 11882, use = 11883, off = 11884, all = {11882, 11883, 11884}},
[100] = {effect = 196, on = 11885, use = 11886, off = 11887, all = {11885, 11886, 11887}},
[101] = {effect = 196, on = 11888, use = 11889, off = 11890, all = {11888, 11889, 11890}},
[102] = {effect = 196, on = 11891, use = 11892, off = 11893, all = {11891, 11892, 11893}},
[103] = {effect = 196, on = 11894, use = 11895, off = 11896, all = {11894, 11895, 11896}},
[104] = {effect = 196, on = 11897, use = 11898, off = 11899, all = {11897, 11898, 11899}},
[105] = {effect = 196, on = 11900, use = 11901, off = 11902, all = {11900, 11901, 11902}},
[106] = {effect = 196, on = 11903, use = 11904, off = 11905, all = {11903, 11904, 11905}},
[107] = {effect = 196, on = 11906, use = 11907, off = 11908, all = {11906, 11907, 11908}},
[108] = {effect = 196, on = 11909, use = 11910, off = 11911, all = {11909, 11910, 11911}},
[109] = {effect = 196, on = 11912, use = 11913, off = 11914, all = {11912, 11913, 11914}},
[110] = {effect = 196, on = 11915, use = 11916, off = 11917, all = {11915, 11916, 11917}},
[111] = {effect = 196, on = 11918, use = 11919, off = 11920, all = {11918, 11919, 11920}},
[112] = {effect = 196, on = 11921, use = 11922, off = 11923, all = {11921, 11922, 11923}},
[113] = {effect = 196, on = 11924, use = 11925, off = 11926, all = {11924, 11925, 11926}},
[114] = {effect = 196, on = 11927, use = 11928, off = 11929, all = {11927, 11928, 11929}},
[115] = {effect = 196, on = 11930, use = 11931, off = 11932, all = {11930, 11931, 11932}},
[116] = {effect = 196, on = 11933, use = 11934, off = 11935, all = {11933, 11934, 11935}},
[117] = {effect = 196, on = 11936, use = 11937, off = 11938, all = {11936, 11937, 11938}},
[118] = {effect = 196, on = 11939, use = 11940, off = 11941, all = {11939, 11940, 11941}},
[119] = {effect = 196, on = 11942, use = 11943, off = 11944, all = {11942, 11943, 11944}},
[120] = {effect = 196, on = 11945, use = 11946, off = 11947, all = {11945, 11946, 11947}},
[121] = {effect = 196, on = 11948, use = 11949, off = 11950, all = {11948, 11949, 11950}},
[122] = {effect = 196, on = 11951, use = 11952, off = 11953, all = {11951, 11952, 11953}},
[123] = {effect = 196, on = 11954, use = 11955, off = 11956, all = {11954, 11955, 11956}},
[124] = {effect = 196, on = 11957, use = 11958, off = 11959, all = {11957, 11958, 11959}},
[125] = {effect = 196, on = 11960, use = 11961, off = 11962, all = {11960, 11961, 11962}},
[126] = {effect = 196, on = 11963, use = 11964, off = 11965, all = {11963, 11964, 11965}},
[127] = {effect = 196, on = 11966, use = 11967, off = 11968, all = {11966, 11967, 11968}},
[128] = {effect = 196, on = 11969, use = 11970, off = 11971, all = {11969, 11970, 11971}},
[129] = {effect = 196, on = 11972, use = 11973, off = 11974, all = {11972, 11973, 11974}},
[130] = {effect = 196, on = 11975, use = 11976, off = 11977, all = {11975, 11976, 11977}},
[131] = {effect = 196, on = 11978, use = 11979, off = 11980, all = {11978, 11979, 11980}},
[132] = {effect = 196, on = 11981, use = 11982, off = 11983, all = {11981, 11982, 11983}},
[133] = {effect = 196, on = 11984, use = 11985, off = 11986, all = {11984, 11985, 11986}},
[134] = {effect = 196, on = 11987, use = 11988, off = 11989, all = {11987, 11988, 11989}},
[135] = {effect = 196, on = 11990, use = 11991, off = 11992, all = {11990, 11991, 11992}},
[136] = {effect = 196, on = 11993, use = 11994, off = 11995, all = {11993, 11994, 11995}},
[137] = {effect = 196, on = 11996, use = 11997, off = 11998, all = {11996, 11997, 11998}},
[138] = {effect = 196, on = 11999, use = 12000, off = 12001, all = {11999, 12000, 12001}},
[139] = {effect = 196, on = 12002, use = 12003, off = 12004, all = {12002, 12003, 12004}},
[140] = {effect = 196, on = 12005, use = 12006, off = 12007, all = {12005, 12006, 12007}},
[141] = {effect = 196, on = 12008, use = 12009, off = 12010, all = {12008, 12009, 12010}},
[142] = {effect = 196, on = 12011, use = 12012, off = 12013, all = {12011, 12012, 12013}},
[143] = {effect = 196, on = 12014, use = 12015, off = 12016, all = {12014, 12015, 12016}},
[144] = {effect = 196, on = 12017, use = 12018, off = 12019, all = {12017, 12018, 12019}},
[145] = {effect = 196, on = 12020, use = 12021, off = 12022, all = {12020, 12021, 12022}},
[146] = {effect = 196, on = 12023, use = 12024, off = 12025, all = {12023, 12024, 12025}},
[147] = {effect = 196, on = 12026, use = 12027, off = 12028, all = {12026, 12027, 12028}},
[148] = {effect = 196, on = 12029, use = 12030, off = 12031, all = {12029, 12030, 12031}},
[149] = {effect = 196, on = 12032, use = 12033, off = 12034, all = {12032, 12033, 12034}},
[150] = {effect = 196, on = 12035, use = 12036, off = 12037, all = {12035, 12036, 12037}},
[151] = {effect = 196, on = 12038, use = 12039, off = 12040, all = {12038, 12039, 12040}},
[152] = {effect = 196, on = 12041, use = 12042, off = 12043, all = {12041, 12042, 12043}},
[153] = {effect = 196, on = 12044, use = 12045, off = 12046, all = {12044, 12045, 12046}},
[154] = {effect = 196, on = 12047, use = 12048, off = 12049, all = {12047, 12048, 12049}},
[155] = {effect = 196, on = 12050, use = 12051, off = 12052, all = {12050, 12051, 12052}},
[156] = {effect = 196, on = 12053, use = 12054, off = 12055, all = {12053, 12054, 12055}},
[157] = {effect = 196, on = 12056, use = 12057, off = 12058, all = {12056, 12057, 12058}},
[158] = {effect = 196, on = 12059, use = 12060, off = 12061, all = {12059, 12060, 12061}},
[159] = {effect = 196, on = 12062, use = 12063, off = 12064, all = {12062, 12063, 12064}},
[160] = {effect = 196, on = 12065, use = 12066, off = 12067, all = {12065, 12066, 12067}},
[161] = {effect = 196, on = 12068, use = 12069, off = 12070, all = {12068, 12069, 12070}},
[162] = {effect = 196, on = 12071, use = 12072, off = 12073, all = {12071, 12072, 12073}},
[163] = {effect = 196, on = 12074, use = 12075, off = 12076, all = {12074, 12075, 12076}},
[164] = {effect = 196, on = 12077, use = 12078, off = 12079, all = {12077, 12078, 12079}},
[165] = {effect = 196, on = 12080, use = 12081, off = 12082, all = {12080, 12081, 12082}},
[166] = {effect = 196, on = 12083, use = 12084, off = 12085, all = {12083, 12084, 12085}},
[167] = {effect = 196, on = 12086, use = 12087, off = 12088, all = {12086, 12087, 12088}},
[168] = {effect = 196, on = 12089, use = 12090, off = 12091, all = {12089, 12090, 12091}},
[169] = {effect = 196, on = 12092, use = 12093, off = 12094, all = {12092, 12093, 12094}},
[170] = {effect = 196, on = 12095, use = 12096, off = 12097, all = {12095, 12096, 12097}},
[171] = {effect = 196, on = 12098, use = 12099, off = 12100, all = {12098, 12099, 12100}},
[172] = {effect = 196, on = 12101, use = 12102, off = 12103, all = {12101, 12102, 12103}},
[173] = {effect = 196, on = 12104, use = 12105, off = 12106, all = {12104, 12105, 12106}},
[174] = {effect = 196, on = 12107, use = 12108, off = 12109, all = {12107, 12108, 12109}},
[175] = {effect = 196, on = 12110, use = 12111, off = 12112, all = {12110, 12111, 12112}},
[176] = {effect = 196, on = 12113, use = 12114, off = 12115, all = {12113, 12114, 12115}},
[177] = {effect = 196, on = 12116, use = 12117, off = 12118, all = {12116, 12117, 12118}},
[178] = {effect = 196, on = 12119, use = 12120, off = 12121, all = {12119, 12120, 12121}},
[179] = {effect = 196, on = 12122, use = 12123, off = 12124, all = {12122, 12123, 12124}},
[180] = {effect = 196, on = 12125, use = 12126, off = 12127, all = {12125, 12126, 12127}},
[181] = {effect = 196, on = 12128, use = 12129, off = 12130, all = {12128, 12129, 12130}},
[182] = {effect = 196, on = 12131, use = 12132, off = 12133, all = {12131, 12132, 12133}},
[183] = {effect = 196, on = 12134, use = 12135, off = 12136, all = {12134, 12135, 12136}},
[184] = {effect = 196, on = 12137, use = 12138, off = 12139, all = {12137, 12138, 12139}},
[185] = {effect = 196, on = 12140, use = 12141, off = 12142, all = {12140, 12141, 12142}},
[186] = {effect = 196, on = 12143, use = 12144, off = 12145, all = {12143, 12144, 12145}},
[187] = {effect = 196, on = 12146, use = 12147, off = 12148, all = {12146, 12147, 12148}},
[188] = {effect = 196, on = 12149, use = 12150, off = 12151, all = {12149, 12150, 12151}},
[189] = {effect = 196, on = 12152, use = 12153, off = 12154, all = {12152, 12153, 12154}},
[190] = {effect = 196, on = 12155, use = 12156, off = 12157, all = {12155, 12156, 12157}},
[191] = {effect = 196, on = 12158, use = 12159, off = 12160, all = {12158, 12159, 12160}},
[192] = {effect = 196, on = 12161, use = 12162, off = 12163, all = {12161, 12162, 12163}},
[193] = {effect = 196, on = 12164, use = 12165, off = 12166, all = {12164, 12165, 12166}},
[194] = {effect = 196, on = 12167, use = 12168, off = 12169, all = {12167, 12168, 12169}},
[195] = {effect = 196, on = 12170, use = 12171, off = 12172, all = {12170, 12171, 12172}},
[196] = {effect = 196, on = 12173, use = 12174, off = 12175, all = {12173, 12174, 12175}},
[197] = {effect = 196, on = 12176, use = 12177, off = 12178, all = {12176, 12177, 12178}},
[198] = {effect = 196, on = 12179, use = 12180, off = 12181, all = {12179, 12180, 12181}},
[199] = {effect = 196, on = 12182, use = 12183, off = 12184, all = {12182, 12183, 12184}},
[200] = {effect = 196, on = 12185, use = 12186, off = 12187, all = {12185, 12186, 12187}},
[201] = {effect = 196, on = 12188, use = 12189, off = 12190, all = {12188, 12189, 12190}},
[202] = {effect = 196, on = 12191, use = 12192, off = 12193, all = {12191, 12192, 12193}},
}
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye sir!')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then
if exhaustion.get(cid, 9211) then
selfSay('Please wait a few moment before asking me to heal your pokemons again!')
return true
end
if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then
selfSay("Please, get inside the pokémon center to heal your pokemons!")
return true
end
exhaustion.set(cid, 9211, 5)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
doSendMagicEffect(getThingPos(cid), 132)
local mypb = getPlayerSlotItem(cid, 8)
if #getCreatureSummons(cid) >= 1 then
local s = getCreatureSummons(cid)[1]
doCreatureAddHealth(s, getCreatureMaxHealth(s))
doSendMagicEffect(getThingPos(s), 13)
else
if mypb.itemid >= 1 then
doItemSetAttribute(mypb.uid, "aid", 1)
for a, b in pairs (pokeballs) do
if isInArray(b.all, mypb.itemid) then
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]"))
doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/")))
doCureAllStatus(feet.uid)
doTransformItem(mypb.uid, b.all[1])
end
end
end
end
end
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
for balls = 1, 202 do --editar a qntdade de balls da tabela ali decima...
for times = 1, 3 do
local items = getItemsInContainerById(bp.uid, pokeballs[balls].all[times])
if #items >= 1 then
for _, uid in pairs(items) do
local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]"))
doCureAllStatus(uid)
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
doTransformItem(uid, pokeballs[balls].on)
end
end
end
end
selfSay('There you go! You and your pokemons are healthy again.')
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...