Ir para conteúdo

[Encerrado] [Pokemon] Dúvidas? - Pda


lucashgas

Posts Recomendados

Dúvido muito que esse StyloMaldoso saiba algo de script, ele não sabe nem escrever...

e esse "SYSTEMA" não adiciona nenhuma vantagem ao player, dai fica pra vocês descobrirem como faz ;P

e esse sistema nem é de vocês, creio que seja do CleberAdm, cade os créditos?

Link para o comentário
Compartilhar em outros sites

@Zerefshirou

Precisa não ja dei meu jeito naquele erro, to com outros erros aqui que não consigo arrumar.

 

@ALL

Gostaria de pedir ajuda nos erros que está aparecendo em meu console, por favor.

1º Erro:

 

 

[11/07/2012 18:06:14] [Error - TalkAction Interface]

[11/07/2012 18:06:14] In a timer event called from:

[11/07/2012 18:06:14] data/talkactions/scripts/move1.lua:onSay

[11/07/2012 18:06:14] Description:

[11/07/2012 18:06:14] (luaHasItemProperty) Item not found

 

 

2º Erro:

 

 

[11/07/2012 17:57:26] [Error - Spell Interface]

[11/07/2012 17:57:26] data/spells/scripts/ps/Mud Shot.lua:onCastSpell

[11/07/2012 17:57:26] Description:

[11/07/2012 17:57:26] (luaDoTargetCombatHealth) Creature not found

 

 

Esses erros aparecem quando um atack vai parar na água ou algo do tipo.

Também não consegui entender este aqui:

3º Erro:

 

 

[11/07/2012 18:04:19] [Error - Action Interface]

[11/07/2012 18:04:19] data/actions/scripts/evolution.lua:onUse

[11/07/2012 18:04:19] Description:

[11/07/2012 18:04:19] data/actions/scripts/evolution.lua:595: attempt to index field '?' (a nil value)

[11/07/2012 18:04:19] stack traceback:

[11/07/2012 18:04:19] data/actions/scripts/evolution.lua:595: in function <data/actions/scripts/evolution.lua:40>

 

 

4º Erro:

 

 

[11/07/2012 20:00:20] [Error - MoveEvent::executeStep] Call stack overflow.

 

 

 

Sei que a maioria desses problemas ja foram resolvidos mais gostaria que me ajudassem aqui, estou tentando arrumar um servidor aqui de PDA e deixalo muito bom para poder posta-lo pra geral aqui, quero retirar logo todos os bugs. Em momento são muitos mais estou retirando a maior parte de pouco a pouco.

Se ajudarem, Meu REP+worriedsmiley.gif

Editado por Kurobisu
Link para o comentário
Compartilhar em outros sites

@ZerefShirou

 

 

[10/07/2012 17:56:08] [Error - CreatureScript Interface]

[10/07/2012 17:56:08] data/creaturescripts/scripts/look.lua:onLook

[10/07/2012 17:56:08] Description:

[10/07/2012 17:56:08] data/creaturescripts/scripts/look.lua:46: bad argument #1 to 'floor' (number expected, got nil)

[10/07/2012 17:56:08] stack traceback:

[10/07/2012 17:56:08] [C]: in function 'floor'

[10/07/2012 17:56:08] data/creaturescripts/scripts/look.lua:46: in function <data/creaturescripts/scripts/look.lua:1>

 

[01/07/2012 16:01:52] [Error - CreatureScript Interface]

[01/07/2012 16:01:52] data/creaturescripts/scripts/look.lua:onLook

[01/07/2012 16:01:52] Description:

[01/07/2012 16:01:52] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value)

[01/07/2012 16:01:52] stack traceback:

[01/07/2012 16:01:52] data/lib/050-function.lua:107: in function 'getArticle'

[01/07/2012 16:01:52] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1>

 

 

deve ser esses dois aki:

 

function.lua

 

function doPlayerGiveItem(cid, itemid, amount, subType)

local item = 0

if(isItemStackable(itemid)) then

item = doCreateItemEx(itemid, amount)

if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then

return false

end

else

for i = 1, amount do

item = doCreateItemEx(itemid, subType)

if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then

return false

end

end

end

 

return true

end

 

function doPlayerGiveItemContainer(cid, containerid, itemid, amount, subType)

for i = 1, amount do

local container = doCreateItemEx(containerid, 1)

for x = 1, getContainerCapById(containerid) do

doAddContainerItem(container, itemid, subType)

end

 

if(doPlayerAddItemEx(cid, container, true) ~= RETURNVALUE_NOERROR) then

return false

end

end

 

return true

end

 

function doPlayerTakeItem(cid, itemid, amount)

return getPlayerItemCount(cid, itemid) >= amount and doPlayerRemoveItem(cid, itemid, amount)

end

 

function doPlayerBuyItem(cid, itemid, count, cost, charges)

return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItem(cid, itemid, count, charges)

end

 

function doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)

return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItemContainer(cid, containerid, itemid, count, charges)

end

 

function doPlayerSellItem(cid, itemid, count, cost)

if(not doPlayerTakeItem(cid, itemid, count)) then

return false

end

 

if(not doPlayerAddMoney(cid, cost)) then

error('[doPlayerSellItem] Could not add money to: ' .. getPlayerName(cid) .. ' (' .. cost .. 'gp).')

end

 

return true

end

 

function doPlayerWithdrawMoney(cid, amount)

if(not getBooleanFromString(getConfigInfo('bankSystem'))) then

return false

end

 

local balance = getPlayerBalance(cid)

if(amount > balance or not doPlayerAddMoney(cid, amount)) then

return false

end

 

doPlayerSetBalance(cid, balance - amount)

return true

end

 

function doPlayerDepositMoney(cid, amount)

if(not getBooleanFromString(getConfigInfo('bankSystem'))) then

return false

end

 

if(not doPlayerRemoveMoney(cid, amount)) then

return false

end

 

doPlayerSetBalance(cid, getPlayerBalance(cid) + amount)

return true

end

 

function isPremium(cid)

return (isPlayer(cid) and (getPlayerPremiumDays(cid) > 0 or getBooleanFromString(getConfigInfo('freePremium'))))

end

 

function getMonthDayEnding(day)

if(day == "01" or day == "21" or day == "31") then

return "st"

elseif(day == "02" or day == "22") then

return "nd"

elseif(day == "03" or day == "23") then

return "rd"

end

 

return "th"

end

 

function getMonthString(m)

return os.date("%B", os.time{year = 1970, month = m, day = 1})

end

 

function getArticle(str)

return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a"

end

 

function isNumber(str)

return tonumber(str) ~= nil

end

 

function doPlayerAddAddons(cid, addon)

for i = 0, table.maxn(maleOutfits) do

doPlayerAddOutfit(cid, maleOutfits, addon)

end

 

for i = 0, table.maxn(femaleOutfits) do

doPlayerAddOutfit(cid, femaleOutfits, addon)

end

end

 

function doPlayerWithdrawAllMoney(cid)

return doPlayerWithdrawMoney(cid, getPlayerBalance(cid))

end

 

function doPlayerDepositAllMoney(cid)

return doPlayerDepositMoney(cid, getPlayerMoney(cid))

end

 

function doPlayerTransferAllMoneyTo(cid, target)

return doPlayerTransferMoneyTo(cid, target, getPlayerBalance(cid))

end

 

function playerExists(name)

return getPlayerGUIDByName(name) ~= 0

end

 

function getTibiaTime()

local minutes = getWorldTime()

local hours = 0

while (minutes > 60) do

hours = hours + 1

minutes = minutes - 60

end

 

return {hours = hours, minutes = minutes}

end

 

function doWriteLogFile(file, text)

local f = io.open(file, "a+")

if(not f) then

return false

end

 

f:write("[" .. os.date("%d/%m/%Y %H:%M:%S") .. "] " .. text .. "\n")

f:close()

return true

end

 

function getExperienceForLevel(lv)

lv = lv - 1

return ((50 * lv * lv * lv) - (150 * lv * lv) + (400 * lv)) / 3

end

 

function doMutePlayer(cid, time)

local condition = createConditionObject(CONDITION_MUTED)

setConditionParam(condition, CONDITION_PARAM_TICKS, time * 1000)

return doAddCondition(cid, condition)

end

 

function getPlayerGroupName(cid)

return getGroupInfo(getPlayerGroupId(cid)).name

end

 

function getPlayerVocationName(cid)

return getVocationInfo(getPlayerVocation(cid)).name

end

 

function getPromotedVocation(vid)

return getVocationInfo(vid).promotedVocation

end

 

function doPlayerRemovePremiumDays(cid, days)

return doPlayerAddPremiumDays(cid, -days)

end

 

function getPlayerMasterPos(cid)

return getTownTemplePosition(getPlayerTown(cid))

end

 

function getHouseOwner(houseId)

return getHouseInfo(houseId).owner

end

 

function getHouseName(houseId)

return getHouseInfo(houseId).name

end

 

function getHouseEntry(houseId)

return getHouseInfo(houseId).entry

end

 

function getHouseRent(houseId)

return getHouseInfo(houseId).rent

end

 

function getHousePrice(houseId)

return getHouseInfo(houseId).price

end

 

function getHouseTown(houseId)

return getHouseInfo(houseId).town

end

 

function getHouseTilesCount(houseId)

return getHouseInfo(houseId).tiles

end

 

function getItemNameById(itemid)

return getItemDescriptionsById(itemid).name

end

 

function getItemPluralNameById(itemid)

return getItemDescriptionsById(itemid).plural

end

 

function getItemArticleById(itemid)

return getItemDescriptionsById(itemid).article

end

 

function getItemName(uid)

return getItemDescriptions(uid).name

end

 

function getItemPluralName(uid)

return getItemDescriptions(uid).plural

end

 

function getItemArticle(uid)

return getItemDescriptions(uid).article

end

 

function getItemText(uid)

return getItemDescriptions(uid).text

end

 

function getItemSpecialDescription(uid)

return getItemDescriptions(uid).special

end

 

function getItemWriter(uid)

return getItemDescriptions(uid).writer

end

 

function getItemDate(uid)

return getItemDescriptions(uid).date

end

 

function getTilePzInfo(pos)

return getTileInfo(pos).protection

end

 

function getTileZoneInfo(pos)

local tmp = getTileInfo(pos)

if(tmp.pvp) then

return 2

end

 

if(tmp.nopvp) then

return 1

end

 

return 0

end

 

function doShutdown()

return doSetGameState(GAMESTATE_SHUTDOWN)

end

 

function doSummonCreature(name, pos, displayError)

local displayError, cid = displayError or true, doCreateMonster(name, pos, displayError)

if(not cid) then

cid = doCreateNpc(name, pos, displayError)

end

 

return cid

end

 

function getOnlinePlayers()

local tmp = getPlayersOnline()

local players = {}

for i, cid in ipairs(tmp) do

table.insert(players, getCreatureName(cid))

end

 

return players

end

 

function getPlayerByName(name)

local cid = getCreatureByName(name)

return isPlayer(cid) and cid or nil

end

 

function isPlayer(cid)

return isCreature(cid) and cid >= AUTOID_PLAYERS and cid < AUTOID_MONSTERS

end

 

function isPlayerGhost(cid)

if(not isPlayer(cid)) then

return false

end

 

return getCreatureCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) or getPlayerFlagValue(cid, PLAYERFLAG_CANNOTBESEEN)

end

 

function isMonster(cid)

return isCreature(cid) and cid >= AUTOID_MONSTERS and cid < AUTOID_NPCS

end

 

function isNpc(cid)

return isCreature(cid) and cid >= AUTOID_NPCS

end

 

function doPlayerSetExperienceRate(cid, value)

return doPlayerSetRate(cid, SKILL__LEVEL, value)

end

 

function doPlayerSetMagicRate(cid, value)

return doPlayerSetRate(cid, SKILL__MAGLEVEL, value)

end

 

function doPlayerAddLevel(cid, amount, round)

local experience, level = 0, getPlayerLevel(cid)

if(amount > 0) then

experience = getExperienceForLevel(level + amount) - (round and getPlayerExperience(cid) or getExperienceForLevel(level))

else

experience = -((round and getPlayerExperience(cid) or getExperienceForLevel(level)) - getExperienceForLevel(level + amount))

end

 

return doPlayerAddExperience(cid, experience)

end

 

function doPlayerAddMagLevel(cid, amount)

for i = 1, amount do

doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid)) / getConfigInfo('rateMagic'))

end

return true

end

 

function doPlayerAddSkill(cid, skill, amount, round)

if(skill == SKILL__LEVEL) then

return doPlayerAddLevel(cid, amount, round)

elseif(skill == SKILL__MAGLEVEL) then

return doPlayerAddMagLevel(cid, amount)

end

 

return doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill'))

end

 

function getPartyLeader(cid)

local party = getPartyMembers(cid)

if(type(party) ~= 'table') then

return 0

end

 

return party[1]

end

 

function isInParty(cid)

return type(getPartyMembers(cid)) == 'table'

end

 

function isPrivateChannel(channelId)

return channelId >= CHANNEL_PRIVATE

end

 

function doPlayerResetIdleTime(cid)

return doPlayerSetIdleTime(cid, 0)

end

 

function doBroadcastMessage(text, class)

local class = class or MESSAGE_STATUS_WARNING

if(type(class) == 'string') then

local className = MESSAGE_TYPES[class]

if(className == nil) then

return false

end

 

class = className

elseif(class < MESSAGE_FIRST or class > MESSAGE_LAST) then

return false

end

 

local players = getPlayersOnline()

for _, pid in ipairs(players) do

doPlayerSendTextMessage(pid, class, text)

end

 

print("> Broadcasted message: \"" .. text .. "\".")

return true

end

 

function doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost)

local checkFlag, ghost, class = checkFlag or true, ghost or false, class or TALKTYPE_BROADCAST

if(checkFlag and not getPlayerFlagValue(cid, PLAYERFLAG_CANBROADCAST)) then

return false

end

 

if(type(class) == 'string') then

local className = TALKTYPE_TYPES[class]

if(className == nil) then

return false

end

 

class = className

elseif(class < TALKTYPE_FIRST or class > TALKTYPE_LAST) then

return false

end

 

local players = getPlayersOnline()

for _, pid in ipairs(players) do

doCreatureSay(cid, text, class, ghost, pid)

end

 

print("> " .. getCreatureName(cid) .. " broadcasted message: \"" .. text .. "\".")

return true

end

 

function getBooleanFromString(input)

local tmp = type(input)

if(tmp == 'boolean') then

return input

end

 

if(tmp == 'number') then

return input > 0

end

 

local str = string.lower(tostring(input))

return (str == "yes" or str == "true" or (tonumber(str) ~= nil and tonumber(str) > 0))

end

 

function doCopyItem(item, attributes)

local attributes = attributes or false

 

local ret = doCreateItemEx(item.itemid, item.type)

if(attributes) then

if(item.actionid > 0) then

doItemSetAttribute(ret, "aid", item.actionid)

end

end

 

if(isContainer(item.uid)) then

for i = (getContainerSize(item.uid) - 1), 0, -1 do

local tmp = getContainerItem(item.uid, i)

if(tmp.itemid > 0) then

doAddContainerItemEx(ret, doCopyItem(tmp, true).uid)

end

end

end

 

return getThing(ret)

end

 

function doRemoveThing(uid)

if(isCreature(uid)) then

return doRemoveCreature(uid)

end

 

return doRemoveItem(uid)

end

 

function setAttackFormula(combat, type, minl, maxl, minm, maxm, min, max)

local min, max = min or 0, max or 0

return setCombatFormula(combat, type, -1, 0, -1, 0, minl, maxl, minm, maxm, min, max)

end

 

function setHealingFormula(combat, type, minl, maxl, minm, maxm, min, max)

local min, max = min or 0, max or 0

return setCombatFormula(combat, type, 1, 0, 1, 0, minl, maxl, minm, maxm, min, max)

end

 

function doChangeTypeItem(uid, subtype)

local thing = getThing(uid)

if(thing.itemid < 100) then

return false

end

 

local subtype = subtype or 1

return doTransformItem(thing.uid, thing.itemid, subtype)

end

 

function doSetItemText(uid, text, writer, date)

local thing = getThing(uid)

if(thing.itemid < 100) then

return false

end

 

doItemSetAttribute(uid, "text", text)

if(writer ~= nil) then

doItemSetAttribute(uid, "writer", tostring(writer))

if(date ~= nil) then

doItemSetAttribute(uid, "date", tonumber(date))

end

end

 

return true

end

 

function getFluidSourceType(itemid)

local item = getItemInfo(itemid)

return item and item.fluidSource or false

end

 

function getDepotId(uid)

return getItemAttribute(uid, "depotid") or false

end

 

function getItemDescriptions(uid)

local thing = getThing(uid)

if(thing.itemid < 100) then

return false

end

 

local item = getItemInfo(thing.itemid)

return {

name = getItemAttribute(uid, "name") or item.name,

plural = getItemAttribute(uid, "pluralname") or item.plural,

article = getItemAttribute(uid, "article") or item.article,

special = getItemAttribute(uid, "description") or "",

text = getItemAttribute(uid, "text") or "",

writer = getItemAttribute(uid, "writer") or "",

date = getItemAttribute(uid, "date") or 0

}

end

 

function getItemWeightById(itemid, count, precision)

local item, count, precision = getItemInfo(itemid), count or 1, precision or false

if(not item) then

return false

end

 

if(count > 100) then

-- print a warning, as its impossible to have more than 100 stackable items without "cheating" the count

print('[Warning] getItemWeightById', 'Calculating weight for more than 100 items!')

end

 

local weight = item.weight * count

--[[if(precision) then

return weight

end

 

local t = string.explode(tostring(weight), ".")

if(table.maxn(t) == 2) then

return tonumber(t[1] .. "." .. string.sub(t[2], 1, 2))

end]]--

 

return weight

end

 

function getItemWeaponType(uid)

local thing = getThing(uid)

if(thing.itemid < 100) then

return false

end

 

return getItemInfo(thing.itemid).weaponType

end

 

function getItemRWInfo(uid)

local thing = getThing(uid)

if(thing.itemid < 100) then

return false

end

 

local item, flags = getItemInfo(thing.itemid), 0

if(item.readable) then

flags = 1

end

 

if(item.writable) then

flags = flags + 2

end

 

return flags

end

 

function getItemLevelDoor(itemid)

local item = getItemInfo(itemid)

return item and item.levelDoor or false

end

 

function isItemStackable(itemid)

local item = getItemInfo(itemid)

return item and item.stackable or false

end

 

function isItemRune(itemid)

local item = getItemInfo(itemid)

return item and item.clientCharges or false

end

 

function isItemDoor(itemid)

local item = getItemInfo(itemid)

return item and item.type == 5 or false

end

 

function isItemContainer(itemid)

local item = getItemInfo(itemid)

return item and item.group == 2 or false

end

 

function isItemFluidContainer(itemid)

local item = getItemInfo(itemid)

return item and item.group == 12 or false

end

 

function isItemMovable(itemid)

local item = getItemInfo(itemid)

return item and item.movable or false

end

 

function isCorpse(uid)

local thing = getThing(uid)

if(thing.itemid < 100) then

return false

end

 

local item = getItemInfo(thing.itemid)

return item and item.corpseType ~= 0 or false

end

 

function getContainerCapById(itemid)

local item = getItemInfo(itemid)

if(not item or item.group ~= 2) then

return false

end

 

return item.maxItems

end

 

function getMonsterAttackSpells(name)

local monster = getMonsterInfo(name)

return monster and monster.attacks or false

end

 

function getMonsterHealingSpells(name)

local monster = getMonsterInfo(name)

return monster and monster.defenses or false

end

 

function getMonsterLootList(name)

local monster = getMonsterInfo(name)

return monster and monster.loot or false

end

 

function getMonsterSummonList(name)

local monster = getMonsterInfo(name)

return monster and monster.summons or false

end

 

 

 

 

e o look.lua

 

 

function onLook(cid, thing, position, lookDistance)

 

local str = ""

 

if not isCreature(thing.uid) then

 

local iname = getItemInfo(thing.itemid)

 

if isPokeball(thing.itemid) then

 

local owner = getItemAttribute(thing.uid, "firstpoke")

 

local pokename = getItemAttribute(thing.uid, "poke")

local item = getItemInfo(thing.itemid)

str = "You see "..item.article.." "..item.name..".\n"

str = str.."It contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n"

 

if owner and owner ~= getCreatureName(cid) then

str = str.."It belongs to "..owner..".\nIt is an unique item."

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

end

 

local boost = getItemAttribute(thing.uid, "boost") or 0

local boostshow = ""

 

if boost > 0 then

str = str.."Boost level: +"..boost..".\n"

end

 

if getItemAttribute(thing.uid, "nick") then

str = str.."It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n"

end

 

if getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."It is male."

elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

 

str = str.."\n--- Status ---"

str = str.."\nOffense: "..math.floor(getItemAttribute(thing.uid, "offense")).." Defense: "..math.floor(getItemAttribute(thing.uid, "defense")).."\n"

str = str.."Agility: "..math.floor(getItemAttribute(thing.uid, "speed")).." Sp. Attack: "..math.floor(getItemAttribute(thing.uid, "specialattack")).."\n"

str = str.."Vitality: "..math.floor(getItemAttribute(thing.uid, "vitality"))..""

 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

 

return false

 

elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then

 

str = "You see a "..string.lower(iname.name).." ["..getItemAttribute(thing.uid, "level").."].\n"

 

if getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."It is male."

elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

 

return false

 

else

 

return true

 

end

end

 

local npcname = getCreatureName(thing.uid)

local l = string.len(npcname)

if not isPlayer(thing.uid) and not isMonster(thing.uid) then

--string.sub(npcname, l - 1, l) == " " then

local article = getPlayerStorageValue(thing.uid, 9891) == 1 and "He is" or "She is"

local nname = string.sub(npcname, 1, l - 2)

if nname == getCreatureName(cid) then

nname = "yourself"

article = "You are"

end

str = "You see "..nname..". "..article.." a pokemon trainer."

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

end

 

if not isMonster(thing.uid) then

return true

end

 

if getCreatureName(thing.uid) == "Evolution" then return false end

 

if not isSummon(thing.uid) then

local str = "You see a wild "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(thing.uid).."].\n"

if getPokemonGender(thing.uid) == SEX_MALE then

str = str.."It is male."

elseif getPokemonGender(thing.uid) == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

elseif isSummon(thing.uid) and not isPlayer(thing.uid) then

 

local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0

local boostshow = " + "..boostlevel.."]"

 

if showBoostSeparated then

boostshow = "] [+"..boostlevel.."]"

end

 

local levelinfo = "["..getPokemonLevel(thing.uid)..""..boostshow..""

 

if getCreatureMaster(thing.uid) == cid then

local myball = getPlayerSlotItem(cid, 8).uid

local nexp = getItemAttribute(myball, "nextlevelexp")

 

local string = "You see your "..string.lower(getCreatureName(thing.uid)).." "..levelinfo.."."

string = string.."\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."."

string = string.."\n"..getPokemonHappinessDescription(thing.uid)

if getItemAttribute(myball, "level") <= 99 then

string = string.."\nExperience needed to level up: "..nexp.."."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")

end

 

 

return false

end

 

return true

end

 

 

Link para o comentário
Compartilhar em outros sites

@CabritenhO

Não mexo com source para mim tem futuro :D

 

@Kurobisu

1º erro, só vendo com slicer mas é um pouco dificil de consertar, porque tem que achar da onde vem isso e talz

 

2º erro, parece que o mud shot esta sendo usado sem alvo, porisso da erro, coloque com alvo e não dará (como diz lá, erro ao encontrar o alvo, criatura nao encontrada)

 

3º erro, só vendo no script, mas parece que tem algum valor nulo na linha 595 do evolution.lua

 

4º erro, pelo que eu pude entender com ajuda do google tradutor, parece que tem muito item no mesmo lugar trazendo erro em algum movement esse é bem chato de achar, mude o mapa e ve se da isso ainda :D

 

Não ofereça REP, é uma coisa inutil

 

@shadow2012

Coloque isso no look.lua e teste

 

 

function onLook(cid, thing, position, lookDistance)

 

local str = ""

 

if not isCreature(thing.uid) then

 

local iname = getItemInfo(thing.itemid)

 

if isPokeball(thing.itemid) then

 

local owner = getItemAttribute(thing.uid, "firstpoke")

 

local pokename = getItemAttribute(thing.uid, "poke")

local item = getItemInfo(thing.itemid)

if getItemAttribute(thing.uid, "offense") == nil or getItemAttribute(thing.uid, "offense") < 0 then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a bugged ball.\nReport this for Administration of the Game.")

print(""..getCreatureName(cid).." have a bugged ball.")

return false

end

str = "You see "..item.article.." "..item.name..".\n"

str = str.."It contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n"

 

if owner and owner ~= getCreatureName(cid) then

str = str.."It belongs to "..owner..".\nIt is an unique item."

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

end

 

local boost = getItemAttribute(thing.uid, "boost") or 0

local boostshow = ""

 

if boost > 0 then

str = str.."Boost level: +"..boost..".\n"

end

 

if getItemAttribute(thing.uid, "nick") then

str = str.."It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n"

end

 

if getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."It is male."

elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

 

str = str.."\n--- Status ---"

str = str.."\nOffense: "..math.floor(getItemAttribute(thing.uid, "offense")).." Defense: "..math.floor(getItemAttribute(thing.uid, "defense")).."\n"

str = str.."Agility: "..math.floor(getItemAttribute(thing.uid, "speed")).." Sp. Attack: "..math.floor(getItemAttribute(thing.uid, "specialattack")).."\n"

str = str.."Vitality: "..math.floor(getItemAttribute(thing.uid, "vitality"))..""

 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

 

return false

 

elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then

 

str = "You see a "..string.lower(iname.name).." ["..getItemAttribute(thing.uid, "level").."].\n"

 

if getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."It is male."

elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

 

return false

 

else

 

return true

 

end

end

 

local npcname = getCreatureName(thing.uid)

local l = string.len(npcname)

if not isPlayer(thing.uid) and not isMonster(thing.uid) then

--string.sub(npcname, l - 1, l) == " " then

local article = getPlayerStorageValue(thing.uid, 9891) == 1 and "He is" or "She is"

local nname = string.sub(npcname, 1, l - 2)

if nname == getCreatureName(cid) then

nname = "yourself"

article = "You are"

end

str = "You see "..nname..". "..article.." a pokemon trainer."

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

end

 

if not isMonster(thing.uid) then

return true

end

 

if getCreatureName(thing.uid) == "Evolution" then return false end

 

if not isSummon(thing.uid) then

local str = "You see a wild "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(thing.uid).."].\n"

if getPokemonGender(thing.uid) == SEX_MALE then

str = str.."It is male."

elseif getPokemonGender(thing.uid) == SEX_FEMALE then

str = str.."It is female."

else

str = str.."It is genderless."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)

return false

elseif isSummon(thing.uid) and not isPlayer(thing.uid) then

 

local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0

local boostshow = " + "..boostlevel.."]"

 

if showBoostSeparated then

boostshow = "] [+"..boostlevel.."]"

end

 

local levelinfo = "["..getPokemonLevel(thing.uid)..""..boostshow..""

 

if getCreatureMaster(thing.uid) == cid then

local myball = getPlayerSlotItem(cid, 8).uid

local nexp = getItemAttribute(myball, "nextlevelexp")

 

local string = "You see your "..string.lower(getCreatureName(thing.uid)).." "..levelinfo.."."

string = string.."\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."."

string = string.."\n"..getPokemonHappinessDescription(thing.uid)

if getItemAttribute(myball, "level") <= 99 then

string = string.."\nExperience needed to level up: "..nexp.."."

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")

end

 

 

return false

end

 

return true

end

 

Link para o comentário
Compartilhar em outros sites

@ZerefShirou

 

acho que arrumou pelo menos agora a ball bugada da pra dar look olha ai:

 

00:45 You see a bugged ball.

Report this for Administration of the Game.

 

E segundo os mlk que jogam no server esse bug aconteçe quando o server aki trava meu pc e da erro exe

 

Mais vlw a ajudar ta ai seu REP+

Link para o comentário
Compartilhar em outros sites

galera por favor alguem pode me dizer onde eu encontro a source mais atualizada q soltaram ate agora? quero começar um projeto do zero e gostaria de ajuda. meu rep+ pra qm ajudar. valeu

 

@zerefShirou

 

vc q ta sempre ajudando a galera, pode me ajudar por favor?

Editado por southron
Link para o comentário
Compartilhar em outros sites

ta dando esse erro comigo;

 

 

[12/07/2012 02:39:32] [Error - TalkAction Interface]

[12/07/2012 02:39:32] In a timer event called from:

[12/07/2012 02:39:32] data/talkactions/scripts/move1.lua:onSay

[12/07/2012 02:39:32] Description:

[12/07/2012 02:39:32] (luaHasItemProperty) Item not found

 

 

[12/07/2012 10:44:28] [Error - CreatureScript Interface]

[12/07/2012 10:44:28] data/creaturescripts/scripts/pokeexp.lua:onDeath

[12/07/2012 10:44:28] Description:

[12/07/2012 10:44:28] (luaGetCreatureMaxHealth) Creature not found

 

[12/07/2012 10:44:28] [Error - CreatureScript Interface]

[12/07/2012 10:44:29] data/creaturescripts/scripts/pokeexp.lua:onDeath

[12/07/2012 10:44:29] Description:

[12/07/2012 10:44:29] (luaDoCreatureAddHealth) Creature not found

 

 

[12/07/2012 10:41:43] [Error - Spell Interface]

[12/07/2012 10:41:43] data/spells/scripts/ps/Sand Attack.lua:onCastSpell

[12/07/2012 10:41:43] Description:

[12/07/2012 10:41:43] (luaGetThingFromPos) Tile not found

 

[12/07/2012 10:43:55] [Error - Spell Interface]

[12/07/2012 10:43:55] In a timer event called from:

[12/07/2012 10:43:55] data/spells/scripts/ps/Earthquake.lua:onCastSpell

[12/07/2012 10:43:55] Description:

[12/07/2012 10:43:55] (luaHasItemProperty) Item not found

Editado por Taiger
Link para o comentário
Compartilhar em outros sites

Obrigado Zerefshirou.

Mais eu não consegui entender o como concertar, vou postar algumas coisas aqui.

 

Mud Shot.lua:

 

 

function onCastSpell(cid, var)

 

if isSummon(cid) then return true end

 

docastspell(cid, "Mud Shot")

 

return true

end

 

 

 

Evolution.lua:

 

 

 

local special = specialevo

local types = {

[leaf] = {"Bulbasaur", "Ivysaur", "Oddish", "Gloom", "Bellsprout", "Weepinbell", "Exeggcute", "Chikorita", "Bayleef", "Hoppip", "Skiploom", "Sunkern"},

[water] = {"Squirtle", "Wartortle", "Horsea", "Goldeen", "Magikarp", "Psyduck", "Poliwag", "Poliwhirl", "Tentacool", "Krabby", "Staryu", "Omanyte", "Eevee", "Totodile", "Croconow", "Chinchou", "Marill", "Wooper", "Slowpoke", "Remoraid", "Seadra"},

[venom] = {"Zubat", "Ekans", "Nidoran male", "Nidoran female", "Nidorino", "Nidorina", "Gloom", "Venonat", "Tentacool", "Grimer", "Koffing", "Spinarak", "Golbat"},

[thunder] = {"Magnemite", "Pikachu", "Voltorb", "Eevee", "Chinchou", "Pichu", "Mareep", "Flaaffy", "Elekid"},

[rock] = {"Geodude", "Graveler", "Rhyhorn", "Kabuto", "Slugma", "Pupitar"},

[punch] = {"Machop", "Machoke", "Mankey", "Poliwhirl", "Tyrogue"},

[fire] = {"Charmander", "Charmeleon", "Vulpix", "Growlithe", "Ponyta", "Eevee", "Cyndaquil", "Quilava", "Slugma", "Houndour", "Magby"},

[coccon] = {"Caterpie", "Metapod", "Weedle", "Kakuna", "Paras", "Venonat", "Scyther", "Ledyba", "Spinarak", "Pineco"},

[crystal] = {"Dratini", "Dragonair", "Magikarp", "Omanyte", "Kabuto", "Seadra"},

[dark] = {"Gastly", "Haunter", "Eevee", "Houndour", "Pupitar"},

[earth] = {"Cubone", "Sandshrew", "Nidorino", "Nidorina", "Diglett", "Onix", "Rhyhorn", "Wooper", "Swinub", "Phanpy", "Larvitar"},

[enigma] = {"Abra", "Kadabra", "Psyduck", "Slowpoke", "Drowzee", "Eevee", "Natu", "Smoochum"},

[heart] = {"Rattata", "Pidgey", "Pidgeotto", "Spearow", "Clefairy", "Jigglypuff", "Meowth", "Doduo", "Porygon", "Chansey", "Sentret", "Hoothoot", "Cleffa", "Igglybuff", "Togepi", "Snubull", "Teddiursa"},

[ice] = {"Seel", "Shellder", "Smoochum", "Swinub"},

[king] = {"Slowpoke", "Poliwhirl"},

[metal] = {"Onix", "Scyther"},

[dragon] = {"Seadra"},

[upgrade] = {"Porygon"},

[sun] = {"Sunkern", "Gloom"},

--[sfire] = {"Shiny Charmander", "Shiny Charmeleon", "Shiny Vulpix", "Shiny Growlithe", "Shiny Ponyta", "Shiny Eevee"},

[swater] = {"Shiny Squirtle", "Shiny Wartortle", "Shiny Horsea", "Shiny Goldeen", "Shiny Magikarp", "Shiny Psyduck", "Shiny Poliwag", "Shiny Poliwhirl", "Shiny Tentacool", "Shiny Krabby", "Shiny Staryu", "Shiny Omanyte", "Shiny Eevee"},

[sleaf] = {"Shiny Bulbasaur", "Shiny Ivysaur", "Shiny Oddish", "Shiny Gloom", "Shiny Bellsprout", "Shiny Weepinbell", "Shiny Exeggcute"},

[sheart] = {"Shiny Rattata", "Shiny Pidgey", "Shiny Pidgeotto", "Shiny Spearow", "Shiny Clefairy", "Shiny Jigglypuff", "Shiny Meowth", "Shiny Doduo", "Shiny Porygon", "Shiny Chansey"},

[senigma] = {"Shiny Abra", "Shiny Kadabra", "Shiny Psyduck", "Shiny Slowpoke", "Shiny Drowzee", "Shiny Eevee"},

[srock] = {"Shiny Geodude", "Shiny Graveler", "Shiny Rhyhorn", "Shiny Kabuto"},

[svenom] = {"Shiny Zubat", "Shiny Ekans", "Shiny Nidoran male", "Shiny Nidoran female", "Shiny Nidorino", "Shiny Nidorina", "Shiny Gloom", "Shiny Venonat", "Shiny Tentacool", "Shiny Grimer", "Shiny Koffing"},

[sice] = {"Shiny Seel", "Shiny Shellder"},

[sthunder] = {"Shiny Magnemite", "Shiny Pikachu", "Shiny Voltorb", "Shiny Eevee"},

[scrystal] = {"Shiny Dratini", "Shiny Dragonair", "Shiny Magikarp", "Shiny Omanyte", "Shiny Kabuto"},

[scoccon] = {"Shiny Caterpie", "Shiny Metapod", "Shiny Weedle", "Shiny Kakuna", "Shiny Paras", "Shiny Venonat", "Shiny Scyther"},

[sdarkness] = {"Shiny Gastly", "Shiny Haunter", "Shiny Eevee"},

[spunch] = {"Shiny Machop", "Shiny Machoke", "Shiny Mankey", "Shiny Poliwhirl"},

[searth] = {"Shiny Cubone", "Shiny Sandshrew", "Shiny Nidorino", "Shiny Nidorina", "Shiny Diglett", "Shiny Onix", "Shiny Rhyhorn"}

}

function onUse(cid, item, frompos, item2, topos)

local pokeball = getPlayerSlotItem(cid, 8)

if not isMonster(item2.uid) or not isSummon(item2.uid) then

return true

end

if getCreatureCondition(item2.uid, CONDITION_INVISIBLE) then return true end

local pevo = poevo[getCreatureName(item2.uid)]

if not isInArray(specialevo, getCreatureName(item2.uid)) then

if not pevo then

doPlayerSendCancel(cid, "This pokemon can't evolve.")

return true

end

if pevo.level ~= 1 and not allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "This pokemon doesn't evolve using stones.")

return true

end

if not isPlayer(getCreatureMaster(item2.uid)) or getCreatureMaster(item2.uid) ~= cid then

doPlayerSendCancel(cid, "You can only use stones on pokemons you own.")

return true

end

if pevo.stoneid ~= item.itemid and pevo.stoneid2 ~= item.itemid then

doPlayerSendCancel(cid, "This isn't the needed stone to evolve this pokemon.")

return true

end

end

local minlevel = 0

 

if getPokemonName(item2.uid) == "Eevee" then

local eevee = ""

if item.itemid == thunder then

eevee = "Jolteon"

elseif item.itemid == water then

eevee = "Vaporeon"

elseif item.itemid == fire then

eevee = "Flareon"

elseif item.itemid == enigma and allEvolutionsCanBeInduzedByStone then

eevee = "Espeon"

elseif item.itemid == dark and allEvolutionsCanBeInduzedByStone then

eevee = "Umbreon"

else

doPlayerSendCancel(cid, "This isn't the required stone to evolve this pokemon.")

return true

end

minlevel = pokes[eevee].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPokemonLevel(item2.uid) < 20 then

return doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (20).")

end

doRemoveItem(item.uid, 1)

doEvolvePokemon(cid, item2, eevee, 0, 0)

return true

end

if getPokemonName(item2.uid) == "Shiny Eevee" then

local eevee = ""

if item.itemid == sthunder then

eevee = "Shiny Jolteon"

elseif item.itemid == swater then

eevee = "Shiny Vaporeon"

elseif item.itemid == sfire then

eevee = "Shiny Flareon"

else

doPlayerSendCancel(cid, "This isn't the required stone to evolve this pokemon.")

return true

end

minlevel = pokes[eevee].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPokemonLevel(item2.uid) < 20 then

return doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (20).")

end

doRemoveItem(item.uid, 1)

doEvolvePokemon(cid, item2, eevee, 0, 0)

return true

end

 

if isInArray(specialevo, getPokemonName(item2.uid)) then

if getPokemonName(item2.uid) == "Poliwhirl" then

local evolution = 0

local theevo = ""

local nlevel = 45

if item.itemid == water then

if getPokemonLevel(item2.uid) >= 36 and getPlayerItemCount(cid, king) >= 1 then

evolution = king

theevo = "Politoed"

elseif getPokemonLevel(item2.uid) >= 36 and getPlayerItemCount(cid, punch) >= 1 and allEvolutionsCanBeInduzedByStone then

evolution = punch

theevo = "Poliwrath"

else

if getPokemonLevel(item2.uid) < 36 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (36).")

return true

end

if allEvolutionsCanBeInduzedByStone then

if getPlayerItemCount(cid, king) <= 0 and getPlayerItemCount(cid, punch) <= 0 then

doPlayerSendCancel(cid, "You need a water stone and a punch stone (Poliwrath) or a King's Rock (Politoed) to evolve this pokemon.")

return true

end

else

if getPlayerItemCount(cid, king) <= 0 then

doPlayerSendCancel(cid, "You need a Water Stone and a King's Rock to evolve this pokemon to a Politoed.")

return true

end

end

end

minlevel = pokes[theevo].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if theevo == "Poliwrath" and getPokemonLevel(item2.uid) < 36 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (36).")

return true

end

if getPlayerItemCount(cid, punch) >= 1 and getPlayerItemCount(cid, king) >= 1 and allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "Please, use your Punch Stone to evolve this pokemon to a Poliwrath, or a King's Rock to a Politoed.")

return true

end

if evolution == 0 then

if allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "You need at least one Water Stone, and a Punch Stone (Poliwrath) or a King's Rock (Politoed) to evolve this pokemon.")

else

doPlayerSendCancel(cid, "You need at least one Water Stone and a King's Rock to evolve this pokemon.")

end

return true

end

if evolution ~= 0 then

doEvolvePokemon(cid, item2, theevo, evolution, water)

return true

end

elseif item.itemid == punch then

minlevel = pokes["Poliwrath"].level

if not allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "This is not the required stone to evolve this pokemon.")

return true

end

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPokemonLevel(item2.uid) < 36 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (45).")

return true

end

if getPlayerItemCount(cid, water) <= 0 then

doPlayerSendCancel(cid, "You need at least one Punch Stone and one Water Stone to evolve this pokemon.")

return true

end

local theevo = "Poliwrath"

doEvolvePokemon(cid, item2, theevo, water, punch)

 

elseif item.itemid == king then

minlevel = pokes["Politoed"].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPlayerItemCount(cid, water) <= 0 then

doPlayerSendCancel(cid, "You need at least one Punch Stone and one King's Rock to evolve this pokemon.")

return true

end

local theevo = "Politoed"

doEvolvePokemon(cid, item2, theevo, water, king)

end

elseif getPokemonName(item2.uid) == "Shiny Poliwhirl" then

local evolution = 0

local theevo = ""

local nlevel = 45

if item.itemid == swater then

if getPokemonLevel(item2.uid) >= 36 and getPlayerItemCount(cid, punch) >= 1 and allEvolutionsCanBeInduzedByStone then

evolution = spunch

theevo = "Shiny Poliwrath"

else

if getPokemonLevel(item2.uid) < 36 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (36).")

return true

end

if allEvolutionsCanBeInduzedByStone then

if getPlayerItemCount(cid, punch) <= 0 then

doPlayerSendCancel(cid, "You need a shining water stone and a shining punch stone Shiny Poliwrath to evolve this pokemon.")

return true

end

else

 

end

end

minlevel = pokes[theevo].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if theevo == "Shiny Poliwrath" and getPokemonLevel(item2.uid) < 36 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (36).")

return true

end

if getPlayerItemCount(cid, spunch) >= 1 and allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "Please, use your shining Punch Stone to evolve this pokemon to a Poliwrath.")

return true

end

if evolution == 0 then

if allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "You need at least one shining Water Stone and a shining Punch Stone ,Shiny Poliwrath to evolve this pokemon.")

else

doPlayerSendCancel(cid, "You need at least one shining Water Stone evolve this pokemon.")

end

return true

end

if evolution ~= 0 then

doEvolvePokemon(cid, item2, theevo, evolution, swater)

return true

end

elseif item.itemid == spunch then

minlevel = pokes["Shiny Poliwrath"].level

if not allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "This is not the required shining stone to evolve this pokemon.")

return true

end

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPokemonLevel(item2.uid) < 36 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (45).")

return true

end

if getPlayerItemCount(cid, swater) <= 0 then

doPlayerSendCancel(cid, "You need at least one shining Punch Stone and one shining Water Stone to evolve this pokemon.")

return true

end

local theevo = "Shiny Poliwrath"

doEvolvePokemon(cid, item2, theevo, swater, spunch)

 

end

elseif getPokemonName(item2.uid) == "Gloom" then

if getPokemonLevel(item2.uid) < 31 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (31).")

return true

end

if item.itemid == leaf then

local theevo = ""

local evolution = 0

if getPlayerItemCount(cid, venom) >= 1 and getPlayerItemCount(cid, sun) >= 1 then

doPlayerSendCancel(cid, "Please, use your Venom Stone to evolve this pokemon to a Vileplume, or a Sun Stone to a Bellossom.")

return true

end

if getPlayerItemCount(cid, venom) <= 0 and getPlayerItemCount(cid, sun) <= 0 then

doPlayerSendCancel(cid, "You need at least one Leaf Stone, and a Sun Stone (Bellossom) or a Venom Stone (Vileplume) to evolve this pokemon.")

return true

end

if getPlayerItemCount(cid, venom) >= 1 then

theevo = "Vileplume"

evolution = venom

elseif getPlayerItemCount(cid, sun) >= 1 then

theevo = "Bellossom"

evolution = sun

end

minlevel = pokes[theevo].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

doEvolvePokemon(cid, item2, theevo, evolution, leaf)

elseif item.itemid == venom then

minlevel = pokes["Vileplume"].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPlayerItemCount(cid, leaf) <= 0 then

doPlayerSendCancel(cid, "You need at least one Leaf Stone and one Venom Stone to evolve this pokemon.")

return true

end

doEvolvePokemon(cid, item2, "Vileplume", venom, leaf)

elseif item.itemid == sun then

minlevel = pokes["Bellossom"].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPlayerItemCount(cid, leaf) <= 0 then

doPlayerSendCancel(cid, "You need at least one Leaf Stone and one Sun Stone to evolve this pokemon.")

return true

end

doEvolvePokemon(cid, item2, "Bellossom", sun, leaf)

end

elseif getPokemonName(item2.uid) == "Shiny Gloom" then

if getPokemonLevel(item2.uid) < 31 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (31).")

return true

end

if item.itemid == sleaf then

local theevo = ""

local evolution = 0

if getPlayerItemCount(cid, svenom) >= 1 then

doPlayerSendCancel(cid, "Please, use your shining Venom Stone to evolve this pokemon to a Shiny Vileplume.")

return true

end

if getPlayerItemCount(cid, svenom) <= 0 then

doPlayerSendCancel(cid, "You need at least one shining Leaf Stone or a shining Venom Stone (Shiny Vileplume) to evolve this pokemon.")

return true

end

if getPlayerItemCount(cid, svenom) >= 1 then

theevo = "Shiny Vileplume"

evolution = svenom

end

minlevel = pokes[theevo].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

doEvolvePokemon(cid, item2, theevo, evolution, sleaf)

elseif item.itemid == svenom then

minlevel = pokes["Shiny Vileplume"].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPlayerItemCount(cid, sleaf) <= 0 then

doPlayerSendCancel(cid, "You need at least one Leaf Stone and one shining Venom Stone to evolve this pokemon.")

return true

end

doEvolvePokemon(cid, item2, "Shiny Vileplume", svenom, sleaf)

end

elseif getPokemonName(item2.uid) == "Slowpoke" then

if getPokemonLevel(item2.uid) < 28 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (28).")

return true

end

if item.itemid == enigma then

if not allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "This is not the required stone to evolve this pokemon.")

return true

end

minlevel = pokes["Slowbro"].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

doEvolvePokemon(cid, item2, "Slowbro", enigma, 0)

elseif item.itemid == king then

minlevel = pokes["Slowking"].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

doEvolvePokemon(cid, item2, "Slowking", king, 0)

end

 

elseif getPokemonName(item2.uid) == "Shiny Slowpoke" then

if getPokemonLevel(item2.uid) < 28 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (28).")

return true

end

if item.itemid == senigma then

if not allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "This is not the required stone to evolve this pokemon.")

return true

end

minlevel = pokes["Shiny Slowbro"].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

doEvolvePokemon(cid, item2, "Shiny Slowbro", senigma, 0)

end

 

elseif getPokemonName(item2.uid) == "Tyrogue" then

if getPokemonLevel(item2.uid) < 20 then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (20).")

return true

end

if not allEvolutionsCanBeInduzedByStone then

doPlayerSendCancel(cid, "This pokemon doesn't evolve using stones.")

return true

end

local evolution = ""

if getOffense(item2.uid) == getDefense(item2.uid) then

evolution = "Hitmontop"

elseif getOffense(item2.uid) > getDefense(item2.uid) then

evolution = "Hitmonlee"

else

evolution = "Hitmonchan"

end

minlevel = pokes[evolution].level

if getPlayerLevel(cid) < minlevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

doEvolvePokemon(cid, item2, evolution, punch, 0)

end

return true

end

local count = poevo[getPokemonName(item2.uid)].count

local stnid = poevo[getPokemonName(item2.uid)].stoneid

local stnid2 = poevo[getPokemonName(item2.uid)].stoneid2

local evo = poevo[getPokemonName(item2.uid)].evolution

local nlevel = poevo[getPokemonName(item2.uid)].level

local count = poevo[getPokemonName(item2.uid)].count

local stnid = poevo[getPokemonName(item2.uid)].stoneid

local stnid2 = poevo[getPokemonName(item2.uid)].stoneid2

local evo = poevo[getPokemonName(item2.uid)].evolution

local nlevel = poevo[getPokemonName(item2.uid)].level

 

if stnid2 > 1 and (getPlayerItemCount(cid, stnid2) < count or getPlayerItemCount(cid, stnid) < count) then

doPlayerSendCancel(cid, "You need at least one "..getItemNameById(stnid).." and one "..getItemNameById(stnid2).." to evolve this pokemon!")

return true

end

if getPlayerItemCount(cid, stnid) < count then

local str = ""

if count >= 2 then

str = "s"

end

return doPlayerSendCancel(cid, "You need at least "..count.." "..getItemNameById(stnid)..""..str.." to evolve this pokemon!")

end

minlevel = pokes[evo].level

if getPlayerLevel(cid) < minlevel and evolutionByStoneRequireLevel then

doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")

return true

end

if getPokemonLevel(item2.uid) < nlevel and evolutionByStoneRequireLevel then

doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve ("..nlevel..").")

return true

end

if count >= 2 then

stnid2 = stnid

end

doEvolvePokemon(cid, item2, evo, stnid, stnid2)

return TRUE

end

 

 

 

 

Quanto ao mapa ele é quase proprio, peguei o KPDO E editei ele pra ficar Compativel com o PDA, ele ta 98% Sem bugs, só tem o bug de Johto que estou fazendo ainda.

Editado por Kurobisu
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...