• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Request PokeRus Virus Script.

ssewok

New Member
Joined
Oct 1, 2011
Messages
29
Reaction score
0
Hi,

Can somebody make a script of the PokeRus virus.

The script must do: When the player heals his pokemon there is a chance of 0,001% that the PokeRus Virus will appear on the first pokemon in the main slot. The nurse will say first:

"Your Pokémon appear to have tiny life forms stuck to them.
Your Pokémon are healthy and seem to be fine.
But we can't tell you anything more at a Pokémon Center."


The pokemon will gain a atk boost and 1,5x EXP gain for 1/2 days.
If you need any script to make it just say it ill try to post it. ;)
I hope somebody can make such a script.

Thanks,
Ewok
PS: My english is not verry good.
*Edit: Here you will find info about the PokeRus Virus: http://bulbapedia.bulbagarden.net/wiki/Pokérus
 
Here is our Healing script:
local pokeballs = {
[1] = {effect = 188, on = 11826, use = 11827, off = 11828, all = {11826, 11827, 11828}},
[2] = {effect = 191, on = 11829, use = 11830, off = 11831, all = {11829, 11830, 11831}},
[3] = {effect = 190, on = 11835, use = 11836, off = 11837, all = {11835, 11836, 11837}},
[4] = {effect = 189, on = 11832, use = 11833, off = 11834, all = {11832, 11833, 11834}},
[5] = {effect = 188, on = 11737, use = 11738, off = 11739, all = {11737, 11738, 11739}},
[6] = {effect = 189, on = 11740, use = 11741, off = 11742, all = {11740, 11741, 11742}},
[7] = {effect = 190, on = 11743, use = 11744, off = 11745, all = {11743, 11744, 11745}},
[8] = {effect = 191, on = 11746, use = 11747, off = 11748, all = {11746, 11747, 11748}},
}

function onThingMove(creature, thing, oldpos, oldstackpos)
end

function onCreatureAppear(creature)
end

function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye sir!')
focus = 0
talk_start = 0
end
end

function onCreatureTurn(creature)
end

function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

for a, b in pairs(gobackmsgs) do
local gm = string.gsub(b.go, "doka!", "")
local bm = string.gsub(b.back, "doka!", "")
if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then
return true
end
end

if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then

if exhaustion.get(cid, 9211) then
selfSay('Please wait a few moment before asking me to heal your pokemons again!')
return true
end

if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then
selfSay("Please, get inside the pokémon center to heal your pokemons!")
return true
end

exhaustion.set(cid, 9211, 5)

doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
doCureStatus(cid, "all", true)
doSendMagicEffect(getThingPos(cid), 132)

local mypb = getPlayerSlotItem(cid, 8)


if #getCreatureSummons(cid) >= 1 then

if not nurseHealsPokemonOut then
selfSay("Please, return your pokemon to his ball!")
return true
end

local s = getCreatureSummons(cid)[1]
doCreatureAddHealth(s, getCreatureMaxHealth(s))
doSendMagicEffect(getThingPos(s), 13)
doCureStatus(s, "all", false)
if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then
setPlayerStorageValue(s, 1008, baseNurseryHappiness)
end
if getPlayerStorageValue(s, 1009) > baseNurseryHunger then
setPlayerStorageValue(s, 1009, baseNurseryHunger)
end
else
if mypb.itemid > 0 and isPokeball(mypb.itemid) then
doItemSetAttribute(mypb.uid, "hp", 1)
if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then
doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger)
end
for c = 1, 15 do
local str = "move"..c
setCD(mypb.uid, str, 0)
end
if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then
doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness)
end
if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then
for a, b in pairs (pokeballs) do
if isInArray(b.all, mypb.itemid) then
doTransformItem(mypb.uid, b.on)
end
end
end
end
end

local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)

for balls = 1, 8 do
for times = 1, 3 do
local items = getItemsInContainerById(bp.uid, pokeballs[balls].all[times])
if #items >= 1 then
for _, uid in pairs(items) do
doItemSetAttribute(uid, "hp", 1)
doTransformItem(uid, pokeballs[balls].on)
for c = 1, 15 do
local str = "move"..c
setCD(uid, str, 0)
end
if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then
doItemSetAttribute(uid, "hunger", baseNurseryHunger)
end
if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then
doItemSetAttribute(uid, "happy", baseNurseryHappiness)
end
end
end
end
end


selfSay('There you go! You and your pokemons are healthy again.')

end
end
 
Lua:
local chance = math.random(1, 100000)
if chance == 1 then
  doItemSetAttribute(uid, "virus", 1)
end

Then all you have to do is set it in the damage and experience scripts that this pokemon gets 1.5x exp and higher base damage.
Very simple... yet a very boring way to make the PokeRus Virus.
 
How do i put the Exp bonus and dmg bonus in the script?
Srry im new with Lua and want to learn it realy much.
And if i tried to put the exp boost in it it says:
[17/05/2013 21:19:26] [Error - Npc interface]
[17/05/2013 21:19:26] data/npc/scripts/heal.lua:eek:nCreatureSay
[17/05/2013 21:19:26] Description:
[17/05/2013 21:19:27] (luaDoItemSetAttribute) Item not found
 
Back
Top