Ir para conteúdo
  • 0

erro creaturescript


Lordfireot

Pergunta

[08/04/2013 09:51:27] [Error - CreatureScript Interface]

[08/04/2013 09:51:27] data/creaturescripts/scripts/login.lua:onLogin

[08/04/2013 09:51:27] Description:

[08/04/2013 09:51:27] data/creaturescripts/scripts/login.lua:224: attempt to index field '?' (a nil value)

[08/04/2013 09:51:27] stack traceback:

[08/04/2013 09:51:27] data/creaturescripts/scripts/login.lua:224: in function <data/creaturescripts/scripts/login.lua:94>

 

meu data/creaturescripts/scripts/login

 

 

local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

 

function onCooldown (cid)

setPlayerStorageValue(cid, 50100, -1)

return TRUE

end

 

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

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

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

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

["Cloned Fearow"] = {694, 900}, -- cloned fearow

["Cloned Pidgeot"] = {674, 1000}, -- cloned pidgeot

["Elder Charizard"] = {295, 1200}, -- cloned pidgeot

}

 

 

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

["Cloned Arcanine"] = {494, 1000}, -- cloned arcanine

["Cloned Venusaur"] = {496, 420}, -- cloned venusaur

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

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

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

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

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

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

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

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

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

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

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

["Mareep"] = {671, 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},

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

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

["Croconaw"] = {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},

["Cloned Snorlax"] = {lookType=729, speed = 500},

["Cloned Tentacruel"] = {lookType=492, speed = 750},

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

["Red Gyarados"] = {lookType=531, speed = 850},

["Elite Blastoise"] = {lookType=525, speed = 850},

}

 

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

----------------------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid, 171833) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can fish now")

setPlayerStorageValue(cid, 171833, -1)

end

 

if getPlayerStorageValue(cid, 30005) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can release your pokemons now")

setPlayerStorageValue(cid, 30005, -1)

end

 

if getPlayerStorageValue(cid, 61001) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You are under the GameMaster curse, if you die you lost level.')

end

 

if getPlayerStorageValue(cid, 50100) >= 1 then

addEvent(onCooldown,120000)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Logout TM Warning: Now you need to wait 120 seconds in order to use any Tecnical Move again.")

end

 

if getPlayerStorageValue(cid, 50002) >= 1 then

local bag = getPlayerItemById(cid, false, 1988).uid

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Badges Updated.')

doAddContainerItem(bag, 10991, 1)

doAddContainerItem(bag, 10993, 1)

doAddContainerItem(bag, 10995, 1)

doAddContainerItem(bag, 10997, 1)

doAddContainerItem(bag, 10999, 1)

doAddContainerItem(bag, 11001, 1)

doAddContainerItem(bag, 11003, 1)

doAddContainerItem(bag, 11005, 1)

setPlayerStorageValue(cid, 50002, -1)

end

----------------------------------------------------------------------------------------------------------------------------------------------------

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

doPlayerSendCancel(cid, "12&,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,")

doCreatureExecuteTalkAction(cid, "/pokeread")

 

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, "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, "PvPSystem")

registerCreatureEvent(cid, "ALoot")

registerCreatureEvent(cid, "PLook")

registerCreatureEvent(cid, "TradeLogs")

registerCreatureEvent(cid, "EPkill")

registerCreatureEvent(cid, "task_count")

 

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)

 

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

 

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

 

-- [ Acro Bike System ] --

elseif getPlayerStorageValue(cid, 20012) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20012, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.5

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 1108 or 1107

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20013))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Acro Bike System ] --

-- [ Mach Bike System ] --

elseif getPlayerStorageValue(cid, 20014) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20014, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.5

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 1080 or 1081

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20015))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Mach Bike System ] --

-- [ Bike System ] --

elseif getPlayerStorageValue(cid, 20010) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20010, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.2

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 344 or 345

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20011))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Bike System ] --

-- [ Dive System ] --

elseif getPlayerStorageValue(cid, 13008) >= 1 then

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 = 1093, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)

else

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

end

doChangeSpeed(cid, 800)

-- [ End Dive System ] --

 

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

 

Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0

Tentar trocá-lo por:

 

 

local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

 

function onCooldown (cid)

setPlayerStorageValue(cid, 50100, -1)

return TRUE

end

 

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

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

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

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

["Cloned Fearow"] = {694, 900}, -- cloned fearow

["Cloned Pidgeot"] = {674, 1000}, -- cloned pidgeot

["Elder Charizard"] = {295, 1200}, -- cloned pidgeot

}

 

 

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

["Cloned Arcanine"] = {494, 1000}, -- cloned arcanine

["Cloned Venusaur"] = {496, 420}, -- cloned venusaur

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

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

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

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

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

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

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

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

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

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

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

["Mareep"] = {671, 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},

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

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

["Croconaw"] = {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},

["Cloned Snorlax"] = {lookType=729, speed = 500},

["Cloned Tentacruel"] = {lookType=492, speed = 750},

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

["Red Gyarados"] = {lookType=531, speed = 850},

["Elite Blastoise"] = {lookType=525, speed = 850},

}

 

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

----------------------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid, 171833) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can fish now")

setPlayerStorageValue(cid, 171833, -1)

end

 

if getPlayerStorageValue(cid, 30005) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can release your pokemons now")

setPlayerStorageValue(cid, 30005, -1)

end

 

if getPlayerStorageValue(cid, 61001) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You are under the GameMaster curse, if you die you lost level.')

end

 

if getPlayerStorageValue(cid, 50100) >= 1 then

addEvent(onCooldown,120000)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Logout TM Warning: Now you need to wait 120 seconds in order to use any Tecnical Move again.")

end

 

if getPlayerStorageValue(cid, 50002) >= 1 then

local bag = getPlayerItemById(cid, false, 1988).uid

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Badges Updated.')

doAddContainerItem(bag, 10991, 1)

doAddContainerItem(bag, 10993, 1)

doAddContainerItem(bag, 10995, 1)

doAddContainerItem(bag, 10997, 1)

doAddContainerItem(bag, 10999, 1)

doAddContainerItem(bag, 11001, 1)

doAddContainerItem(bag, 11003, 1)

doAddContainerItem(bag, 11005, 1)

setPlayerStorageValue(cid, 50002, -1)

end

----------------------------------------------------------------------------------------------------------------------------------------------------

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

doPlayerSendCancel(cid, "12&,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,")

doCreatureExecuteTalkAction(cid, "/pokeread")

 

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, "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, "PvPSystem")

registerCreatureEvent(cid, "ALoot")

registerCreatureEvent(cid, "PLook")

registerCreatureEvent(cid, "TradeLogs")

registerCreatureEvent(cid, "EPkill")

registerCreatureEvent(cid, "task_count")

 

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)

 

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

 

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

 

-- [ Acro Bike System ] --

elseif getPlayerStorageValue(cid, 20012) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20012, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.5

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 1108 or 1107

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20013))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Acro Bike System ] --

-- [ Mach Bike System ] --

elseif getPlayerStorageValue(cid, 20014) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20014, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.5

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 1080 or 1081

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20015))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Mach Bike System ] --

-- [ Bike System ] --

elseif getPlayerStorageValue(cid, 20010) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20010, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.2

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 344 or 345

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20011))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Bike System ] --

-- [ Dive System ] --

elseif getPlayerStorageValue(cid, 13008) >= 1 then

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 = 1093, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)

else

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

end

doChangeSpeed(cid, 800)

-- [ End Dive System ] --

 

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

 

 

Reinicie o servidor para ter alterações.

Link para o comentário
Compartilhar em outros sites

  • 0

tipo agora deu mais assim na conta do adm do meu servidor tem 2 tipos de adm 1 adm entra normal mais o outro ja n entra ai aparece isso

 

 

[08/04/2013 13:50:49] [Error - CreatureScript Interface]

[08/04/2013 13:50:49] data/creaturescripts/scripts/login.lua:onLogin

[08/04/2013 13:50:49] Description:

[08/04/2013 13:50:49] data/creaturescripts/scripts/login.lua:224: attempt to perform arithmetic on field '?' (a nil value)

[08/04/2013 13:50:49] stack traceback:

[08/04/2013 13:50:49] data/creaturescripts/scripts/login.lua:224: in function <data/creaturescripts/scripts/login.lua:94>

Link para o comentário
Compartilhar em outros sites

  • 0

Ve ae:

 

 

local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

 

function onCooldown (cid)

setPlayerStorageValue(cid, 50100, -1)

return TRUE

end

 

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

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

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

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

["Cloned Fearow"] = {694, 900}, -- cloned fearow

["Cloned Pidgeot"] = {674, 1000}, -- cloned pidgeot

["Elder Charizard"] = {295, 1200}, -- cloned pidgeot

}

 

 

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

["Cloned Arcanine"] = {494, 1000}, -- cloned arcanine

["Cloned Venusaur"] = {496, 420}, -- cloned venusaur

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

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

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

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

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

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

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

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

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

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

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

["Mareep"] = {671, 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},

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

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

["Croconaw"] = {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},

["Cloned Snorlax"] = {lookType=729, speed = 500},

["Cloned Tentacruel"] = {lookType=492, speed = 750},

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

["Red Gyarados"] = {lookType=531, speed = 850},

["Elite Blastoise"] = {lookType=525, speed = 850},

}

 

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

----------------------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid, 171833) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can fish now")

setPlayerStorageValue(cid, 171833, -1)

end

 

if getPlayerStorageValue(cid, 30005) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can release your pokemons now")

setPlayerStorageValue(cid, 30005, -1)

end

 

if getPlayerStorageValue(cid, 61001) >= 1 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You are under the GameMaster curse, if you die you lost level.')

end

 

if getPlayerStorageValue(cid, 50100) >= 1 then

addEvent(onCooldown,120000)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Logout TM Warning: Now you need to wait 120 seconds in order to use any Tecnical Move again.")

end

 

if getPlayerStorageValue(cid, 50002) >= 1 then

local bag = getPlayerItemById(cid, false, 1988).uid

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Badges Updated.')

doAddContainerItem(bag, 10991, 1)

doAddContainerItem(bag, 10993, 1)

doAddContainerItem(bag, 10995, 1)

doAddContainerItem(bag, 10997, 1)

doAddContainerItem(bag, 10999, 1)

doAddContainerItem(bag, 11001, 1)

doAddContainerItem(bag, 11003, 1)

doAddContainerItem(bag, 11005, 1)

setPlayerStorageValue(cid, 50002, -1)

end

----------------------------------------------------------------------------------------------------------------------------------------------------

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

doPlayerSendCancel(cid, "12&,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,N/N,")

doCreatureExecuteTalkAction(cid, "/pokeread")

 

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, "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, "PvPSystem")

registerCreatureEvent(cid, "ALoot")

registerCreatureEvent(cid, "PLook")

registerCreatureEvent(cid, "TradeLogs")

registerCreatureEvent(cid, "EPkill")

registerCreatureEvent(cid, "task_count")

 

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)

 

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)

 

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

 

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

 

-- [ Acro Bike System ] --

elseif getPlayerStorageValue(cid, 20012) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20012, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.5

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 1108 or 1107

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20013))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Acro Bike System ] --

-- [ Mach Bike System ] --

elseif getPlayerStorageValue(cid, 20014) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20014, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.5

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 1080 or 1081

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20015))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Mach Bike System ] --

-- [ Bike System ] --

elseif getPlayerStorageValue(cid, 20010) >=1 then

if getThingPos(cid).z ~= 7 then

setPlayerStorageValue(cid, 20010, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

local outfit = {lookType = 0, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} -- outfit con el que saldra

local speedbonus = 1.2

local pSex = getPlayerSex(cid)

outfit.lookType = pSex == PLAYERSEX_FEMALE and 344 or 345

 

doSetCreatureOutfit(cid, outfit, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 20011))

doPlayerSay(cid, "Let's Ride!", TALKTYPE_MONSTER)

-- [ End Bike System ] --

-- [ Dive System ] --

elseif getPlayerStorageValue(cid, 13008) >= 1 then

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 = 1093, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)

else

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

end

doChangeSpeed(cid, 800)

-- [ End Dive System ] --

 

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

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...