Ir para conteúdo

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


lucashgas

Posts Recomendados

@shadon2012

por enquanto nao deu mais erro vamo ver.

 

Tipow um player em meu ot logou em cima de um dragonite e agora ele nao consegue entrar mais no char, aparece esse erro no console:

 

 

[18/07/2012 00:13:35] [Error - CreatureScript Interface]

[18/07/2012 00:13:35] data/creaturescripts/scripts/login.lua:onLogin

[18/07/2012 00:13:35] Description:

[18/07/2012 00:13:35] data/creaturescripts/scripts/login.lua:212: attempt to index field '?' (a nil value)

[18/07/2012 00:13:35] stack traceback:

[18/07/2012 00:13:35] data/creaturescripts/scripts/login.lua:212: in function <data/creaturescripts/scripts/login.lua:123>

 

Como posso arrumar isso? rep+

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

@shadon2012

por enquanto nao deu mais erro vamo ver.

 

Tipow um player em meu ot logou em cima de um dragonite e agora ele nao consegue entrar mais no char, aparece esse erro no console:

 

 

[18/07/2012 00:13:35] [Error - CreatureScript Interface]

[18/07/2012 00:13:35] data/creaturescripts/scripts/login.lua:onLogin

[18/07/2012 00:13:35] Description:

[18/07/2012 00:13:35] data/creaturescripts/scripts/login.lua:212: attempt to index field '?' (a nil value)

[18/07/2012 00:13:35] stack traceback:

[18/07/2012 00:13:35] data/creaturescripts/scripts/login.lua:212: in function <data/creaturescripts/scripts/login.lua:123>

 

Como posso arrumar isso? rep+

verifique em

data\creaturescripts\scripts\login.lua

na parte dos fly se tem Dragonite

["Dragonite"] = {221, 1300},-- nite

ou é shiny dragonite

["Shiny Dragonite"] = {1020, 1300},

 

 

edit

qual quer coisa posta seu login pra mim da uma olhada

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

Olá galera, queria saber:

 

Por que que quando eu tento dar catch em um aerodactyl o server cai?

 

Obrigado"

 

testei aqui , aqui não da esse bug não ja tento baixa de novo o ot acho que vc deve ta com versão antiga :)

Link para o comentário
Compartilhar em outros sites

@Taiger

 

tenta usar o meu login.lua so a parte em negrito. ( ou se quiser tenta usa o script todo )

 

 

local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

 

local flys = {

["Moltres"] = {229, 2300}, -- moltres

["Articuno"] = {230, 2100}, -- artic

["Zapdos"] = {224, 2600}, -- zapdos

["Mew"] = {232, 2200}, -- 1000

["Mewtwo"] = {233, 2200},-- two

["Dragonite"] = {221, 1300},-- nite

["Pidgeot"] = {222, 900}, -- geot

["Fearow"] = {226, 800}, -- fearow

["Aerodactyl"] = {227, 1100}, -- aero

["Charizard"] = {216, 1000}, -- chari

["Porygon"] = {316, 600}, -- porygon

["Shiny Moltres"] = {229, 2300}, -- Shiny moltres

["Shiny Articuno"] = {1018, 2100}, -- Shiny artic

["Shiny Zapdos"] = {1019, 2600}, -- Shiny zapdos

["Shiny Mew"] = {1022, 2200}, -- Shiny 1000

["Shiny Mewtwo"] = {1021, 2200},-- Shiny two

["Shiny Dragonite"] = {1020, 1300},-- Shiny nite

["Shiny Pidgeot"] = {996, 900}, -- Shiny geot

["Shiny Fearow"] = {1048, 800}, -- Shiny fearow

["Shiny Aerodactyl"] = {1017, 1100}, -- Shiny aero

["Shiny Charizard"] = {295, 1000}, -- Shiny chari

["Shiny Porygon"] = {1016, 600}, -- Shiny porygon

["Porygon2"] = {648, 890}, -- 2

["Skarmory"] = {649, 1000}, -- skarmory

["Crobat"] = {652, 1190}, -- crobat

}

 

local rides = {

["Tauros"] = {128, 580}, -- tauros

["Ninetales"] = {129, 800}, -- kyuubi

["Rapidash"] = {130, 800}, -- rapid

["Ponyta"] = {131, 410}, -- ponyta

["Rhyhorn"] = {132, 400}, -- rhyhorn

["Arcanine"] = {12, 900}, -- arcan

["Onix"] = {126, 450}, -- onix

["Venusaur"] = {134, 390}, -- venu

["Dodrio"] = {133, 750}, -- dodrio

["Doduo"] = {135, 420}, -- doduo

["Shiny Tauros"] = {1024, 580}, -- tauros

["Shiny Ninetales"] = {999, 800}, -- kyuubi

["Shiny Rapidash"] = {1005, 800}, -- rapid

["Shiny Ponyta"] = {1004, 410}, -- ponyta

["Shiny Rhyhorn"] = {1023, 400}, -- rhyhorn

["Shiny Arcanine"] = {492, 900}, -- arcan

["Shiny Onix"] = {126, 450}, -- onix

["Shiny Venusaur"] = {494, 390}, -- venu

["Shiny Dodrio"] = {1007, 750}, -- dodrio

["Shiny Doduo"] = {1006, 420}, -- doduo

["Crystal Onix"] = {293, 480}, -- cristal onix

["Steelix"] = {646, 750}, -- steelix

["Meganium"] = {685, 720}, -- meganium

["Bayleef"] = {686, 555}, -- bayleef

["Stantler"] = {687, 595}, -- stantler

["Houndoom"] = {647, 820}, -- houndoom

["Piloswine"] = {689, 450}, -- piloswine

["Mareep"] = {688, 400}, -- marip

}

 

local surf = {

["Poliwag"] = {lookType=278, speed = 320},

["Poliwhirl"] = {lookType=137, speed = 480},

["Seaking"] = {lookType=269, speed = 520},

["Dewgong"] = {lookType=183, speed = 700},

["Blastoise"] = {lookType=184, speed = 850},

["Tentacruel"] = {lookType=185, speed = 750},

["Lapras"] = {lookType=186, speed = 960},

["Gyarados"] = {lookType=187, speed = 1050},

["Omastar"] = {lookType=188, speed = 680},

["Kabutops"] = {lookType=189, speed = 840},

["Poliwrath"] = {lookType=190, speed = 680},

["Vaporeon"] = {lookType=191, speed = 800},

["Staryu"] = {lookType=266, speed = 385},

["Starmie"] = {lookType=267, speed = 685},

["Goldeen"] = {lookType=268, speed = 355},

["Seadra"] = {lookType=270, speed = 655},

["Golduck"] = {lookType=271, speed = 760},

["Squirtle"] = {lookType=273, speed = 365},

["Wartortle"] = {lookType=275, speed = 605},

["Tentacool"] = {lookType=277, speed = 340},

["Snorlax"] = {lookType=300, speed = 500},

 

["Shiny Poliwag"] = {lookType=1010, speed = 320},

["Shiny Poliwhirl"] = {lookType=1011, speed = 480},

["Shiny Seaking"] = {lookType=1027, speed = 520},

["Shiny Dewgong"] = {lookType=1015, speed = 700},

["Shiny Blastoise"] = {lookType=658, speed = 850},

["Shiny Tentacruel"] = {lookType=490, speed = 750},

["Shiny Lapras"] = {lookType=1031, speed = 960},

["Shiny Gyarados"] = {lookType=529, speed = 1050},

["Shiny Omastar"] = {lookType=1033, speed = 680},

["Shiny Kabutops"] = {lookType=1034, speed = 840},

["Shiny Poliwrath"] = {lookType=1012, speed = 680},

["Shiny Vaporeon"] = {lookType=1032, speed = 800},

["Shiny Staryu"] = {lookType=1028, speed = 385},

["Shiny Starmie"] = {lookType=1029, speed = 685},

["Shiny Goldeen"] = {lookType=1026, speed = 355},

["Shiny Seadra"] = {lookType=522, speed = 655},

["Shiny Golduck"] = {lookType=1009, speed = 760},

["Shiny Squirtle"] = {lookType=1000, speed = 365},

["Shiny Wartortle"] = {lookType=1001, speed = 605},

["Shiny Tentacool"] = {lookType=503, speed = 340},

["Shiny Snorlax"] = {lookType=1035, speed = 500},

 

["Mantine"] = {lookType=636, speed = 820},

["Totodile"] = {lookType=637, speed = 360},

["Croconow"] = {lookType=638, speed = 590},

["Feraligatr"] = {lookType=645, speed = 900},

["Marill"] = {lookType=639, speed = 340},

["Azumarill"] = {lookType=642, speed = 680},

["Quagsire"] = {lookType=643, speed = 740},

["Kingdra"] = {lookType=644, speed = 1020},

["Octillery"] = {lookType=641, speed = 600},

["Wooper"] = {lookType=640, speed = 315},

}

 

function onLogin(cid)

 

doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 50)

doCreatureSetDropLoot(cid, false)

 

local accountManager = getPlayerAccountManager(cid)

 

if(accountManager == MANAGER_NONE) then

local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage

if(lastLogin > 0) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."

else

str = str

end

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

 

elseif(accountManager == MANAGER_NAMELOCK) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")

elseif(accountManager == MANAGER_ACCOUNT) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")

end

 

if getCreatureName(cid) == "Account Manager" then

doSetCreatureOutfit(cid, {lookType = 304}, -1)

return true

end

 

if(not isPlayerGhost(cid)) then

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)

end

 

local outfit = {}

 

if getPlayerVocation(cid) == 0 then

doPlayerSetMaxCapacity(cid, 0)

doPlayerSetVocation(cid, 1)

setCreatureMaxMana(cid, 6)

doPlayerAddSoul(cid, -getPlayerSoul(cid))

setPlayerStorageValue(cid, 19898, 0)

if getCreatureOutfit(cid).lookType == 128 then

outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}

elseif getCreatureOutfit(cid).lookType == 136 then

outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}

end

doCreatureChangeOutfit(cid, outfit)

end

 

registerCreatureEvent(cid, "WatchTv")

registerCreatureEvent(cid, "task_count")

registerCreatureEvent(cid, "StopWatchingTv")

registerCreatureEvent(cid, "WalkTv")

registerCreatureEvent(cid, "RecordTv")

--registerCreatureEvent(cid, "Death")

registerCreatureEvent(cid, "PlayerLogout")

registerCreatureEvent(cid, "WildAttack")

registerCreatureEvent(cid, "Idle")

registerCreatureEvent(cid, "PokemonIdle")

registerCreatureEvent(cid, "EffectOnAdvance")

registerCreatureEvent(cid, "GeneralConfiguration")

registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, "LookSystem")

registerCreatureEvent(cid, "T1")

registerCreatureEvent(cid, "T2")

registerCreatureEvent(cid, "AuraBoost")

 

if getPlayerStorageValue(cid, 99284) == 1 then

setPlayerStorageValue(cid, 99284, -1)

end

 

doChangeSpeed(cid, -(getCreatureSpeed(cid)))

 

if getPlayerStorageValue(cid, 17000) >= 1 then -- fly

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

doRemoveCondition(cid, CONDITION_OUTFIT)

doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)

 

local apos = getFlyingMarkedPos(cid)

apos.stackpos = 0

if getTileThingByPos(apos).itemid <= 2 then

doCombatAreaHealth(cid, 0, apos, 0, 0, 0, CONST_ME_NONE)

doCreateItem(460, 1, apos)

end

 

doTeleportThing(cid, apos, false)

 

elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

 

if not isInArray({4820, 4821, 4822, 4823, 4824, 4825}, getTileInfo(getThingPos(cid)).itemid) then

setPlayerStorageValue(cid, 63215, -1)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

doSetCreatureOutfit(cid, {lookType = surf[poke].lookType + 351}, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

 

elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

if rides[poke] then

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

doRemoveCondition(cid, CONDITION_OUTFIT)

doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)

else

setPlayerStorageValue(cid, 17001, -1)

doChangeSpeed(cid, PlayerSpeed)

end

 

elseif getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 7 then

doChangeSpeed(cid, 140*getPlayerGroupId(cid))

else

doChangeSpeed(cid, PlayerSpeed)

end

 

return true

end

 

 

Alguem poderia me ajudar com o sistema de addons '-'

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

@notle2012

 

ta ai meu login.lua:

 

local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

 

local flys = {

["Moltres"] = {229, 2300}, -- moltres

["Articuno"] = {230, 2100}, -- artic

["Zapdos"] = {224, 2600}, -- zapdos

["Mew"] = {232, 2200}, -- 1000

["Mewtwo"] = {233, 2200},-- two

["Dragonite"] = {221, 1300},-- nite

["Pidgeot"] = {222, 900}, -- geot

["Fearow"] = {226, 800}, -- fearow

["Aerodactyl"] = {227, 1100}, -- aero

["Charizard"] = {216, 1000}, -- chari

["Porygon"] = {316, 600}, -- porygon

["Shiny Moltres"] = {229, 2300}, -- Shiny moltres

["Shiny Articuno"] = {1018, 2100}, -- Shiny artic

["Shiny Zapdos"] = {1019, 2600}, -- Shiny zapdos

["Shiny Mew"] = {1022, 2200}, -- Shiny 1000

["Shiny Mewtwo"] = {1021, 2200},-- Shiny two

["Shiny Dragonite"] = {1020, 1300},-- Shiny nite

["Shiny Pidgeot"] = {996, 900}, -- Shiny geot

["Shiny Fearow"] = {997, 800}, -- Shiny fearow

["Shiny Aerodactyl"] = {1017, 1100}, -- Shiny aero

["Shiny Charizard"] = {995, 1000}, -- Shiny chari

["Shiny Porygon"] = {1016, 600}, -- Shiny porygon

["Porygon2"] = {648, 890}, -- 2

["Skarmory"] = {649, 1000}, -- skarmory

["Crobat"] = {652, 1190}, -- crobat

}

 

 

local rides = {

["Tauros"] = {128, 580}, -- tauros

["Ninetales"] = {129, 800}, -- kyuubi

["Rapidash"] = {130, 800}, -- rapid

["Ponyta"] = {131, 410}, -- ponyta

["Rhyhorn"] = {132, 400}, -- rhyhorn

["Arcanine"] = {12, 900}, -- arcan

["Onix"] = {126, 450}, -- onix

["Venusaur"] = {134, 390}, -- venu

["Dodrio"] = {133, 750}, -- dodrio

["Doduo"] = {135, 420}, -- doduo

["Shiny Tauros"] = {1024, 580}, -- tauros

["Shiny Ninetales"] = {999, 800}, -- kyuubi

["Shiny Rapidash"] = {1005, 800}, -- rapid

["Shiny Ponyta"] = {1004, 410}, -- ponyta

["Shiny Rhyhorn"] = {1023, 400}, -- rhyhorn

["Shiny Arcanine"] = {1003, 900}, -- arcan

["Shiny Onix"] = {126, 450}, -- onix

["Shiny Venusaur"] = {1040, 390}, -- venu

["Shiny Dodrio"] = {1007, 750}, -- dodrio

["Shiny Doduo"] = {1006, 420}, -- doduo

["Crystal Onix"] = {293, 480}, -- cristal onix

["Steelix"] = {646, 750}, -- steelix

["Meganium"] = {685, 720}, -- meganium

["Bayleef"] = {686, 555}, -- bayleef

["Stantler"] = {687, 595}, -- stantler

["Houndoom"] = {647, 820}, -- houndoom

["Piloswine"] = {689, 450}, -- piloswine

["Mareep"] = {688, 400}, -- marip

}

 

local surf = {

["Poliwag"] = {lookType=278, speed = 320},

["Poliwhirl"] = {lookType=137, speed = 480},

["Seaking"] = {lookType=269, speed = 520},

["Dewgong"] = {lookType=183, speed = 700},

["Blastoise"] = {lookType=184, speed = 850},

["Tentacruel"] = {lookType=185, speed = 750},

["Lapras"] = {lookType=186, speed = 960},

["Gyarados"] = {lookType=187, speed = 1050},

["Omastar"] = {lookType=188, speed = 680},

["Kabutops"] = {lookType=189, speed = 840},

["Poliwrath"] = {lookType=190, speed = 680},

["Vaporeon"] = {lookType=191, speed = 800},

["Staryu"] = {lookType=266, speed = 385},

["Starmie"] = {lookType=267, speed = 685},

["Goldeen"] = {lookType=268, speed = 355},

["Seadra"] = {lookType=270, speed = 655},

["Golduck"] = {lookType=271, speed = 760},

["Squirtle"] = {lookType=273, speed = 365},

["Wartortle"] = {lookType=275, speed = 605},

["Tentacool"] = {lookType=277, speed = 340},

["Snorlax"] = {lookType=300, speed = 500},

 

["Shiny Poliwag"] = {lookType=1010, speed = 320},

["Shiny Poliwhirl"] = {lookType=1011, speed = 480},

["Shiny Seaking"] = {lookType=1027, speed = 520},

["Shiny Dewgong"] = {lookType=1015, speed = 700},

["Shiny Blastoise"] = {lookType=1002, speed = 850},

["Shiny Tentacruel"] = {lookType=1014, speed = 750},

["Shiny Lapras"] = {lookType=1031, speed = 960},

["Shiny Gyarados"] = {lookType=1030, speed = 1050},

["Shiny Omastar"] = {lookType=1033, speed = 680},

["Shiny Kabutops"] = {lookType=1034, speed = 840},

["Shiny Poliwrath"] = {lookType=1012, speed = 680},

["Shiny Vaporeon"] = {lookType=1032, speed = 800},

["Shiny Staryu"] = {lookType=1028, speed = 385},

["Shiny Starmie"] = {lookType=1029, speed = 685},

["Shiny Goldeen"] = {lookType=1026, speed = 355},

["Shiny Seadra"] = {lookType=1025, speed = 655},

["Shiny Golduck"] = {lookType=1009, speed = 760},

["Shiny Squirtle"] = {lookType=1000, speed = 365},

["Shiny Wartortle"] = {lookType=1001, speed = 605},

["Shiny Tentacool"] = {lookType=1013, speed = 340},

["Shiny Snorlax"] = {lookType=1035, speed = 500},

 

["Mantine"] = {lookType=636, speed = 820},

["Totodile"] = {lookType=637, speed = 360},

["Croconow"] = {lookType=638, speed = 590},

["Feraligatr"] = {lookType=645, speed = 900},

["Marill"] = {lookType=639, speed = 340},

["Azumarill"] = {lookType=642, speed = 680},

["Quagsire"] = {lookType=643, speed = 740},

["Kingdra"] = {lookType=644, speed = 1020},

["Octillery"] = {lookType=641, speed = 600},

["Wooper"] = {lookType=640, speed = 315},

}

 

function onLogin(cid)

 

doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 100)

doCreatureSetDropLoot(cid, false)

 

local accountManager = getPlayerAccountManager(cid)

 

if(accountManager == MANAGER_NONE) then

local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage

if(lastLogin > 0) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."

else

str = str

end

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

 

elseif(accountManager == MANAGER_NAMELOCK) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")

elseif(accountManager == MANAGER_ACCOUNT) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")

end

 

if getCreatureName(cid) == "Account Manager" then

local outfit = {}

if accountManagerRandomPokemonOutfit then

outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}

else

outfit = accountManagerOutfit

end

 

doSetCreatureOutfit(cid, outfit, -1)

return true

end

 

if(not isPlayerGhost(cid)) then

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)

end

 

local outfit = {}

 

if getPlayerVocation(cid) == 0 then

doPlayerSetMaxCapacity(cid, 0)

doPlayerSetVocation(cid, 1)

setPlayerStorageValue(cid, 86228, 0)

setPlayerStorageValue(cid, 862281, 0)

setCreatureMaxMana(cid, 6)

doPlayerAddSoul(cid, -getPlayerSoul(cid))

setPlayerStorageValue(cid, 19898, 0)

if getCreatureOutfit(cid).lookType == 128 then

outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}

elseif getCreatureOutfit(cid).lookType == 136 then

outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}

end

doCreatureChangeOutfit(cid, outfit)

end

 

registerCreatureEvent(cid, "WatchTv")

registerCreatureEvent(cid, "StopWatchingTv")

registerCreatureEvent(cid, "WalkTv")

registerCreatureEvent(cid, "RecordTv")

--registerCreatureEvent(cid, "deadd")

--registerCreatureEvent(cid, "Death")

registerCreatureEvent(cid, "PlayerLogout")

registerCreatureEvent(cid, "WildAttack")

registerCreatureEvent(cid, "Idle")

registerCreatureEvent(cid, "PokemonIdle")

registerCreatureEvent(cid, "EffectOnAdvance")

registerCreatureEvent(cid, "GeneralConfiguration")

registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, "LookSystem")

registerCreatureEvent(cid, "T1")

registerCreatureEvent(cid, "T2")

 

if getPlayerStorageValue(cid, 99284) == 1 then

setPlayerStorageValue(cid, 99284, -1)

end

 

doChangeSpeed(cid, -(getCreatureSpeed(cid)))

 

if getPlayerStorageValue(cid, 17000) >= 1 then -- fly

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

doRemoveCondition(cid, CONDITION_OUTFIT)

doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)

 

local apos = getFlyingMarkedPos(cid)

apos.stackpos = 0

 

if getTileThingByPos(apos).itemid <= 2 then

doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)

doCreateItem(460, 1, getFlyingMarkedPos(cid))

end

 

doTeleportThing(cid, apos, false)

 

local posicao = getTownTemplePosition(getPlayerTown(cid))

markFlyingPos(cid, posicao)

 

elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

doSetCreatureOutfit(cid, {lookType = surf[poke].lookType + 351}, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

 

elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

 

 

if rides[poke] then

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

doRemoveCondition(cid, CONDITION_OUTFIT)

doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)

else

setPlayerStorageValue(cid, 17001, -1)

doChangeSpeed(cid, PlayerSpeed)

end

 

local posicao2 = getTownTemplePosition(getPlayerTown(cid))

markFlyingPos(cid, posicao2)

 

elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive

if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then

setPlayerStorageValue(cid, 13008, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

if getPlayerSex(cid) == 1 then

doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)

else

doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)

end

doChangeSpeed(cid, 800)

 

elseif getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 7 then

doChangeSpeed(cid, 140*getPlayerGroupId(cid))

else

doChangeSpeed(cid, PlayerSpeed)

end

return true

end

alguem me fala como colocar isso no spoiler pq nao consegui.:(

 

@shadow2012

 

Vou testar aqui despois respondo se funcionou.

 

tenho mais algumas duvidas:

 

1° como diminuir a chance de dar respaw de shinys?

2°como colocar bike sistem?

3°como colocar o sistema na entrada do zard valey, quando o player pisar no tile do portao ele é teleportado para o outro lado do portao?

4°alguem tem o item editor para poketibia?

5°preciso de um site ou sistema de shop para o website poketibia 2.0

 

Obrigado e desculpa pela má formatação, sou péssimo nisso.

Obrigado tb a todos que estão me ajudando, sempre que posso dou rep+

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

@Taiger

1° va em data/creaturescript/scripts/ e em spawn.lua procure essa parte.

 

transform = math.random(1, 100) --8% chance %= e a chance de aparecer shiny quanto menor o numero da % menor vai ser a chance do poke se transformar.

 

2° na sign desse cara tem bike sistema FlamesAdmin.

 

3° n sei

 

http://www.4shared.com/rar/HqgLmYBl/otitemeditor_854.html

 

5° na area de website no xtibia tem varios tutoriais de sistema de shop php acho que vc acha algum la pro website.

 

e o bug do fly agora entendi oq e conteceu comigo e quando o player desloga de fly ou e forçado a sair do jogo e o pokemon fica bugado no slot principal e por isso o poke buga na portrait e n tem como logar o unico jeito que eu acho e deletar o char e coloca no script do login.lua pra n deslogar de fly.

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

@taiger

 

1 - Em data/creaturescripts/scripts/spawn.lua procure por:

 

if isInArray(shinys, getCreatureName(cid)) then
transform = math.random(1, 100) --1% chance
elseif isInArray(raros, getCreatureName(cid)) then
transform = math.random(1, 1000) --0.1% chance[/color]
[color=#696969]

Ai você só muda a chance ali no (1, 100) se deixar (50, 100), vai ter 50% de chance de dar spawn de algum shiny. E ali no (1, 1000) é a chance de dar respaw de shinys raros.

 

2 - tem vários sistemas de Bike aqui no tópico só usar a ferramenta "Search". Se tu tiver usando o servidor do Slicer acho que já tem o sistema de bike.

 

4 - tu pode usar qualquer ot item editor.

 

 

Edit sobre como usar spoiler:

 

[.spoiler]Contéudo[./spoiler]

 

Sem os pontos.

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

@Taiger: edita seu post ae, o spoiler ta errado.

 

qual codigo coloco para concertar o epoiler?

 

Só você trocar as possições do fechamento e abertura do spoiler

 

assim, abertura = [.spoiler]

fechamento = [./spoiler]

 

 

Sem os pontos

 

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

Para aqueles que acham que ta com algum erro no ( caught ) está errado, ví algumas pessoas reclamando aqui mais fui ver aqui no meu Ot e tava normal.

 

 

caughtr.jpg

 

 

alí onde tem os soul points está contando os pokémons capturados, seria legal se ficasse o nome (caught) envez de ( soul ).

Caso alguém ainda esteja com erro nisto, re-baixe o serv. Pois não tem erro.

________________________________________________________________________________________________________________________________

Mais uma coisa, alguém ta com o erro de que quando o pokémon do player morre e o pokémon selvagem vem lhe atackar. Não está retirando nenhum (hit) do player, tipo a imagem abaixo.

 

 

caughtf.jpg

 

 

E se issu acontece, aparece isso no console?

[18/07/2012 19:44:03] [Error - CreatureScript Interface]

[18/07/2012 19:44:03] data/creaturescripts/scripts/exp.lua:onStatsChange

[18/07/2012 19:44:03] Description:

[18/07/2012 19:44:03] data/creaturescripts/scripts/exp.lua:221: attempt to call global 'canAttackOther' (a nil value)

[18/07/2012 19:44:03] stack traceback:

[18/07/2012 19:44:03] data/creaturescripts/scripts/exp.lua:221: in function <data/creaturescripts/scripts/exp.lua:128>

Caso isto não aconteça em seu Ot, teria como passar seu exp.lua?

E se você utiliza o patch do nibelins no move (String Shot) da um bug no console.

[18/07/2012 19:50:46] [Error - Spell Interface]

[18/07/2012 19:50:46] data/spells/scripts/ps/String Shot.lua:onCastSpell

[18/07/2012 19:50:46] Description:

[18/07/2012 19:50:46] data/lib/pokemon moves.lua:479: attempt to call global 'doAdvancedBlind' (a nil value)

[18/07/2012 19:50:47] stack traceback:

[18/07/2012 19:50:47] data/lib/pokemon moves.lua:479: in function 'docastspell'

[18/07/2012 19:50:47] data/spells/scripts/ps/String Shot.lua:5: in function <data/spells/scripts/ps/String Shot.lua:1>

Caso este erro não aconteca com você, teria como passar seu (String Shot.lua) e o (pokemon moves.lua)

String Shot.lua: ( data/spells/scripts/ps/String Shot.lua )

pokemon moves.lua: ( data/lib/pokemon moves.lua )

Link para o comentário
Compartilhar em outros sites

Postando Bike system...se alguem souber arrumar o sexo posta aqui..se não qnd char female usar bike ficara com sprite de male

 

Cria um arquivo chamado bike.lua em data/sctions/script e cole isso dentro

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

 

local sBike = 5701

 

local t = {

[2542] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition},

}

 

function BikeSpeedOn(cid,nSpeed)

setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid))

doChangeSpeed(cid,-getCreatureSpeed(cid))

doChangeSpeed(cid,nSpeed)

end

function BikeSpeedOff(cid)

doChangeSpeed(cid,-getCreatureSpeed(cid))

doChangeSpeed(cid,getPlayerStorageValue(cid,sBike))

end

 

 

local v, r = getCreaturePosition(cid), t[item.itemid]

local s = r.s

local pos = {x = v.x, y = v.y, z = v.z}

if r then

if getPlayerStorageValue(cid, 25000) == 5 then

return

end

if getPlayerStorageValue(cid, 23000) == 5 then

return

end

 

 

if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then

doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.")

return true

end

if getPlayerStorageValue(cid, s) <= 0 then

doCreatureSay(cid, r.text, 19)

setPlayerStorageValue(cid, s, 1)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')

BikeSpeedOn(cid,500)

if getPlayerSex(cid) == 1 then

doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)

else

doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)

end

 

 

elseif getPlayerStorageValue(cid, s) == 1 then

doCreatureSay(cid, r.dtext, 19)

setPlayerStorageValue(cid, s, 0)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted ' .. r.article .. ' '.. r.name .. '.')

BikeSpeedOff(cid)

return doRemoveCondition(cid, CONDITION_OUTFIT)

else

return doPlayerSendCancel(cid, 'You can\'t do this.')

end

else

return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.')

end

 

end

 

 

agora va em data/actions/action.xml e add essa função

 

 

<action itemid="ID do ITEM a ser usado para receber OUTFIT" event="script" value="bike.lua"/>

Para configurar troque 2547 pelo id do item q vc pois no action

 

Manow tem como mudar para usar a bike ba bag? pq do geito que ta pede para colocar ela na mao do player.

Link para o comentário
Compartilhar em outros sites

@Kurosibu: se você usa o PDA comum e tiver adicionado o pokemon moves.lua do Slicer vai dar esse erro msm, usa o do PDA comum se estiver usando o pokemon moves.lua do Slicer

1º Ta mano fala sério, escreve meu nome direito. Chega me deicho triste, meu nome é facil pra caramba.

2º Explica certo, o cara escrevendo assim intendi sómente issu: se eu usar o pokemon moves.lua do Slicer no PDA comum vai dar erro.

Cara você leu direito oque eu postei ali? Porque deu pra intender nada doque você postou.

Vo tentar dessifrar, se eu usar o pokemon moves.lua do Slicer no PDA comum (Que pda comum?) irá da esse erro. e se ao contrario ou seilá to confusão.

Explica direito que entendi foi (NADA)

Link para o comentário
Compartilhar em outros sites

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