PDA

View Full Version : [Essentials script] Ho-oh 112's Mystery gift system


Ho-oh 112
January 5th, 2012, 06:43 PM
Right, It's been a while SOOOOOOO I gave a new update + re-did my post...

HOW TO USE:
make a text file like this (text.txt or something)
REMEMBER TO USE NEW LINES
write in it:
Message (Hello this is a message)
Type (0 pokemon, 1 egg, 2 item, 3 none)
Pokemon/item (depends on it)
level
form
shiny (0 normal, 1 shiny, 2 shadow, 3 both)
move1
move2
move3
move4
ot (Owner Name)
id (id CAN'T START WITH 0, 5 numbers long)
nature
ability (0, 1, 2 Hidden)
item (0 for none)
ribbon (0 for none)
gender (0 male, 1 female)
ivs (1 HP, 2 ATK, 3 DEF, 4 SPEED, 5 SPEC. ATK, 6 SPEC. DEF) (0-5) SERPERATE LINES FOR ALL OF THEM!
varswitch ("Switch" if a switch "Var" or "Variable" if a Variable)
varswutchnum (number of the switch/var)
varswitchvalue (var/switch value)
OK NOW I RECOMEND USING WEBS.COM TO MAKE A SITE FOR YOUR GAME THEN UPLOAD GIFT THERE AS YOU CAN CHANGE TEXT DOCUMENTS WITHOUT REUPLOADING.
=end
To load a gift: pbMysteryGift



def pbMysteryGift
message=nil
type=nil
species=nil
level=nil
form=nil
shiny=nil
move1=nil
move2=nil
move3=nil
move4=nil
ot=nil
id=nil
nature=nil
abillity=nil
item=nil
ribbon=nil
iv1=nil
iv2=nil
iv3=nil
iv4=nil
iv5=nil
iv6=nil
switchvar = "Switch" # Var/Variable if it's a variable
switchvarnum = 50 # switch/var number
switchvarvalue = false
#second value: If a var it can be string/number/ or bool switches only bool
badgecount = 0 # Number of badges needed to get pokemon
link="http://rmxpmysterygift.webs.com/Gifts/Gift.txt"
code=pbDownloadToString(link)
if code == ""
return false
end
file = File.open('text.txt', 'wb'){|f|
f.write(code)
}
array = IO.readlines('text.txt')
message=array[0]
type=array[1]
type = type.to_i + 1 - 1
if type == 3
Kernel.pbMessage(_INTL("There are no gifts avaible."))
return true
else
Kernel.pbMessage(_INTL("A gift was found!"))
if $game_variables[6] == message && $DEBUG == false
Kernel.pbMessage(_INTL("You already got the gift!"))
return true
end
end
Kernel.pbMessage(_INTL(message)) # displays custom message
$game_variables[6] = message # The "detection code"
switchvar=array[23]
switchvarvalue=[array[24],array[25]]
badgecount=array[26]
badgecount=badgecount.to_i
pbNextCheck(switchvar,switchvarvalue,badgecount)
species=array[2]
species = species.to_i + 1 - 1
if type == 2
Kernel.pbReceiveItem(species)
$game_variables[1] = PBItems.getName(species)
return true
end
if $Trainer.party.length == 6
Kernel.pbMessage(_INTL("Your party is full!"))
$game_variables[1] = 0
return true
end
$game_variables[1] = PBSpecies.getName(species)
if type == 1
pbGenerateEgg(species)
$game_variables[1] = "Mystery Egg"
return true
end
level=array[3]
level = level.to_i + 1 - 1
form=array[4]
form = form.to_i + 1 - 1
shiny=array[5]
shiny = shiny.to_i + 1 - 1
move1=array[6]
move1 = move1.to_i + 1 - 1
move2=array[7]
move2 = move2.to_i + 1 - 1
move3=array[8]
move3 = move3.to_i + 1 - 1
move4=array[9]
move4 = move4.to_i + 1 - 1
ot=array[10]
id=array[11]
id = id.to_i + 1 - 1
nature=array[12]
nature = nature.to_i + 1 - 1
ability=array[13]
ability = ability.to_i + 1 - 1
item=array[14]
item = item.to_i + 1 - 1
ribbon=array[15]
ribbon = ribbon.to_i + 1 - 1
gender=array[16]
gender = gender.to_i + 1 - 1
iv1=array[17]
iv1 = iv1.to_i + 1 - 1
iv2=array[18]
iv2 = iv2.to_i + 1 - 1
iv3=array[19]
iv3 = iv3.to_i + 1 - 1
iv4=array[20]
iv4 = iv4.to_i + 1 - 1
iv5=array[21]
iv5 = iv5.to_i + 1 - 1
iv6=array[22]
iv6 = iv6.to_i + 1 - 1
iv = [iv1, iv2, iv3, iv4, iv5, iv6]
moves=[move1, move2, move3, move4]
# Checks badge count if it's more than 0 if not it ignores this...
if badgecount > 0
if $Trainer.badges[badgecount] != true
Kernel.pbMessage(_INTL("You do not have enough badges to get this gift. badges required: {1}", badgecount))
return
end
end
if switchvar == "Switch"
$game_switches[switchvarvalue[0]] = switchvarvalue[1]
elsif switchvar == "Variable" or switchvar == "Var"
$game_variables[switchvarvalue[0]] = switchvarvalue[1]
end
if species == nil
return false
end
if level == nil
return false
end
gift = PokeBattle_Pokemon.new(species,level)
gift.trainerID = id
gift.ot = ot
gift.form = form
gift.ballused = pbGetBallType(:CHERISHBALL) # All Pokemon are in these.
if shiny == 1
gift.makeShiny
elsif shiny == 2
gift.makeShadow
elsif shiny == 3
gift.makeShiny
gift.makeShadow
end
if ribbon > 0
gift.setRibbon(ribbon)
end
if item > 0
gift.item = item
end
gift.setNature(nature)
gift.abilityflag=ability
# Teaches moves
for i in 0..3
gift.moves[i]=PBMove.new(moves[i])
end
pbAddToPartySilent(gift)
pbSave
rescue
Kernel.pbMessage(_INTL("The gift is corrupted"))
return
end

def pbNextCheck(var1,var2,badge)
# Checks badge count if it's more than 0 if not it ignores this...
if badge > 0
if $Trainer.badges[badge] != true
Kernel.pbMessage(_INTL("You do not have enough badges to get this gift. badges required: {1}", badgecount))
return
end
end
if var1 == "Switch"
var2[1].to_b
$game_switches[var2[0]] = var2[1]
elsif var1 == "Variable" or var1 == "Var"
$game_variables[var2[0]] = var2[1]
end
end


Whats New:
Removed the mySql thing because it didn't work....
Added badge counter (not tested but should work)
Added Var/Switch setting (not tested....)

Todo:
None as of now

Bugs:
None as of now

IceGod64
January 5th, 2012, 06:49 PM
I'll definitely try using this once it expands a bit more and I actually have a game to test it on.

Ho-oh 112
January 5th, 2012, 06:51 PM
Right, I'm currently test this code.
@@+4605TetHello1000000=@@

Pharetra
January 6th, 2012, 04:43 AM
Heh, this is going to make the DLC in my game so much easier :3
Small question though, what am I supposed to put in the Gifts folder and in Gifts.txt?

Excuse me, I am not an experienced scripter (yet).

Ho-oh 112
January 6th, 2012, 06:01 AM
Heh, this is going to make the DLC in my game so much easier :3
Small question though, what am I supposed to put in the Gifts folder and in Gifts.txt?

Excuse me, I am not an experienced scripter (yet).


Auto creates it for you, you just make the gifts folder in project.

Pharetra
January 6th, 2012, 07:06 AM
Auto creates it for you, you just make the gifts folder in project.
Ok, but how do I create a gift?

Ho-oh 112
January 6th, 2012, 08:05 AM
Ok, but how do I create a gift?


write in a script or conditional branch: pbWriteGift
to load one use: pbLoadMGift
I'm sure it says that near the top of the post...

Pharetra
January 6th, 2012, 09:18 AM
write in a script or conditional branch: pbWriteGift
to load one use: pbLoadMGift
I'm sure it says that near the top of the post...
I actually meant the gift the player obtains, the Pokémon.

Ho-oh 112
January 6th, 2012, 09:30 AM
I actually meant the gift the player obtains, the Pokémon.


open an event, look for something called "script" write: pbWriteGift

activate event and follow steps.

to load the event

open an event, look for something called "script" write: pbLoadMGift

activate event and test it.

MAKE SURE TO HAVE PLACED THE SCRIPT INTO THE SCRIPT EDITOR.

Pharetra
January 6th, 2012, 10:36 AM
open an event, look for something called "script" write: pbWriteGift

activate event and follow steps.

to load the event

open an event, look for something called "script" write: pbLoadMGift

activate event and test it.

MAKE SURE TO HAVE PLACED THE SCRIPT INTO THE SCRIPT EDITOR.

I think you've misunderstood me and thought I am completely new to RMXP. I wanted to know how to create the Pokemon the player obtains, the gift. I have figured it out by myself now. I am not used to the way this script works, it is completely different from most scripts I've seen. This doesn't make it a bad script though, it's pretty good for what I've seen as of now.

Ho-oh 112
January 6th, 2012, 10:52 AM
I think you've misunderstood me and thought I am completely new to RMXP. I wanted to know how to create the Pokemon the player obtains, the gift. I have figured it out by myself now. I am not used to the way this script works, it is completely different from most scripts I've seen. This doesn't make it a bad script though, it's pretty good for what I've seen as of now.


I then have no idea what you mean by "create the Pokemon" because I thought you meant create the gift or loading it... anyways good thing you figured it out.

Pharetra
January 9th, 2012, 08:09 AM
I love this new update, it's great. It all works well, except for the items and the eggs. When I set a gift's type to 1 or 2, it keeps giving me the Pokémon I'd get when type was set to 0. It's like the Type field is completely ignored. If you want the text file of the Item:

Test.
2
1
1
0
1
1
2
3
4
TEST
98765
4
1
1
1
0
5
5
5
5
5
5

I don't think they work yet, but that aside, this is a fantastic script. I'm definitely using this.

Ho-oh 112
January 9th, 2012, 10:05 AM
I love this new update, it's great. It all works well, except for the items and the eggs. When I set a gift's type to 1 or 2, it keeps giving me the Pokémon I'd get when type was set to 0. It's like the Type field is completely ignored. If you want the text file of the Item:

Test.
2
1
1
0
1
1
2
3
4
TEST
98765
4
1
1
1
0
5
5
5
5
5
5

I don't think they work yet, but that aside, this is a fantastic script. I'm definitely using this.


Fixed (I think)
added:
type = type.to_i + 1 - 1

which will change it to an integer...

Pharetra
January 9th, 2012, 11:05 AM
Fixed (I think)
added:
type = type.to_i + 1 - 1

which will change it to an integer...
Ok, it works. I am able to obtain multiple copies of the item and the egg though, so you might want to fix that ;)

Ho-oh 112
January 9th, 2012, 11:38 AM
Ok, ummmmm easy, where it says pbReceiveItem put this down:
$game_variables[6] == message

Ok, it works. I am able to obtain multiple copies of the item and the egg though, so you might want to fix that ;)



Alright, fixed... (I can't believe I missed SO MANY ERRORS!!!!)

ultimatewolf
January 11th, 2012, 09:47 AM
yeah a system that gives mistery gift that is just what i needed

Ho-oh 112
January 11th, 2012, 11:24 AM
yeah a system that gives mistery gift that is just what i needed


Thanks, I'm working on a trade system too...

Pharetra
January 12th, 2012, 10:32 AM
I've found a new problem, the script keeps telling me the gift is corrupt while it isn't. I've used the gift.txt I've used succesfully a few days ago, before your last update, and your own gift.txt . None of them work.

Ho-oh 112
January 12th, 2012, 12:04 PM
Really, were you connected to the internet?

Works fine for me....

EDIT: I saw your problem, my post tried putting everything on 1 line.....

Nyndyll
January 12th, 2012, 01:15 PM
k, i'm having trouble myself...
like P-Sign i cant get this script to work...
can you just give me a full out tutorial???

Ho-oh 112
January 12th, 2012, 01:51 PM
HOW TO USE:
make a text file like this (text.txt or something)
REMEMBER TO USE NEW LINES
write in it:
Message (Hello this is a message)
Type (0 pokemon, 1 egg, 2 item, 3 none)
Pokemon/item (depends on it)
level
form
shiny (0 normal, 1 shiny, 2 shadow, 3 both)
move1
move2
move3
move4
ot (Owner Name)
id (id CAN'T START WITH 0, 5 numbers long)
nature
ability (0, 1, 2 Hidden)
item (0 for none)
ribbon (0 for none)
gender (0 male, 1 female)
ivs (1 HP, 2 ATK, 3 DEF, 4 SPEED, 5 SPEC. ATK, 6 SPEC. DEF) (0-5) SERPERATE LINES
FOR ALL OF THEM!
OK NOW I RECOMEND USING WEBS.COM (http://webs.com/) TO MAKE A SITE FOR YOUR GAME THEN UPLOAD GIFT THERE AS YOU CAN CHANGE TEXT DOCUMENTS WITHOUT REUPLOADING.


NOT THAT HARD!

Nyndyll
January 12th, 2012, 03:01 PM
Well, sorry... tried aint working...

---------------------------
Pokemon: Distant Realms
---------------------------
Exception: RuntimeError

Message: Script error within event 12, map 25 (Pokecademy):

Exception: NameError

Message: (eval):1:in `pbExecuteScript'undefined local variable or method `pbLoadMGift' for #<Interpreter:0x956d6d8>

***Full script:

pbLoadMGift


Interpreter:243:in `pbExecuteScript'

Interpreter:1592:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1592:in `command_355'

Interpreter:493:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'

Scene_Map:101:in `loop'



Interpreter:275:in `pbExecuteScript'

Interpreter:1592:in `command_355'

Interpreter:493:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'

Scene_Map:101:in `loop'

Scene_Map:114:in `update'

Scene_Map:68:in `main'



This exception was logged in

C:\Users\****\Saved Games/Pokemon_ Distant Realms/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------

Ho-oh 112
January 12th, 2012, 03:03 PM
Well, sorry... tried aint working...

EDIT: 1 last time follow those instructions
TO CALL USE: pbMysteryGift : INSIDE AN EVENT
Make sure to edit the link

EDIT2: Ok, you were using the old version and updated.... use pbMysteryGift to call

Nyndyll
January 12th, 2012, 03:35 PM
Thank ya -- you da best!
(working now. just gotta work at the event [what you said the first time])

Ho-oh 112
January 12th, 2012, 03:38 PM
Thank ya -- you da best!
(working now. just gotta work at the event [what you said the first time])


Lol, I thought it was an error I made, if you brought that up faster, sorry for the hastle : p

Nyndyll
January 12th, 2012, 03:43 PM
working-ish every gift is corrupt...

Ho-oh 112
January 12th, 2012, 03:49 PM
Try this link: http://rmxpmysterygift.webs.com/Gifts/Gift.txt
if that doesn't work then it's my stytem.

line 47: add a $ before game_variables

or just get the fixed version.

Nyndyll
January 13th, 2012, 12:13 PM
working 410% now...
Thanks! U da best!

Ho-oh 112
January 13th, 2012, 01:03 PM
working 410% now...
Thanks! U da best!

Right, glad to know it works now.

FL
January 15th, 2012, 05:28 AM
Mystery Gift is a feature that charge between generations, so put more descriptions that you system do in the topic. After a look I realized that this script can make the player to receive an egg/item/pokémon. Anyway, good script.
Idea: Maybe you can put a variable to be compared in the txt for each entry before give the pokémon.
Example: Player can only get one level 20 pokémon after this variable be 8 or greater, thing that occurs when the player reach at the sixth city, for other in the level 30 this variable need to be 13, and so on.
If someone don't like to use this feature, just made this optional making by default to this variable being -1 and all pokémon this line entry being 0, making the game to ignore when this variable is negative.

A Note to developers: It's no good to give a Victini lv5 at start of the game, so use this system moderately. maybe unlock after some game progress.

Ho-oh 112
January 18th, 2012, 11:36 AM
Mystery Gift is a feature that charge between generations, so put more descriptions that you system do in the topic. After a look I realized that this script can make the player to receive an egg/item/pokémon. Anyway, good script.
Idea: Maybe you can put a variable to be compared in the txt for each entry before give the pokémon.
Example: Player can only get one level 20 pokémon after this variable be 8 or greater, thing that occurs when the player reach at the sixth city, for other in the level 30 this variable need to be 13, and so on.
If someone don't like to use this feature, just made this optional making by default to this variable being -1 and all pokémon this line entry being 0, making the game to ignore when this variable is negative.

A Note to developers: It's no good to give a Victini lv5 at start of the game, so use this system moderately. maybe unlock after some game progress.


I'll add to the next release, when I get my new laptop....

tylerab01
January 19th, 2012, 03:55 PM
I'm sorry, but this is Pokemon Raptor's Mystery Gift code too. If you want to learn how to script that is now how to do it and you are not an Advanced Scripter. I know more about scripting than you do, and I have barely even made a dent I RGSS knowledge.

salva123
January 19th, 2012, 07:07 PM
Thanks a lot this will work for my game.

Ho-oh 112
January 31st, 2012, 07:52 PM
I'm sorry, but this is Pokemon Raptor's Mystery Gift code too. If you want to learn how to script that is now how to do it and you are not an Advanced Scripter. I know more about scripting than you do, and I have barely even made a dent I RGSS knowledge.



LOOK AT RAPTOR'S SCRIPT CAREFULLY AND SEE IT'S VERY DIFFERENT, A MOD OPENED IT UP, BESIDES WHEN I GET A NEW LAPTOP I'LL CHANGE THIS COMPLETELY.

seeker
January 31st, 2012, 08:00 PM
Guys, if you believe that any script is fake or belongs to someone else PM me or Cilerba with the proof. Now please do not continue speaking about that within this thread. Please keep on topic. Thank you.

Ho-oh 112
February 6th, 2012, 08:36 AM
I feel like Re-inventing my script using MySQL.... It seems more flexible to me....

Crazyninjaguy
February 8th, 2012, 05:55 AM
Oh for sure, it is so much more flexible.
It's a lot better than downloading a file in many ways:

1) People have much less of a chance of fudging the data.
2) It's a whole lot more secure
3) It's pretty much instant.

In fact, I've already achieved a system like this for my project, Reigning Darkness.
Go for it, see what you can make!

Ho-oh 112
February 8th, 2012, 06:48 AM
Oh for sure, it is so much more flexible.
It's a lot better than downloading a file in many ways:

1) People have much less of a chance of fudging the data.
2) It's a whole lot more secure
3) It's pretty much instant.

In fact, I've already achieved a system like this for my project, Reigning Darkness.
Go for it, see what you can make!


CAN YOU HELP ME WITH MySQL PLEAAAAAAAAAAASE!!!! (I can't get it to work....)

by that I mean mySQL...

pokemonmasteraaron
March 2nd, 2012, 10:18 PM
I'm probably an idiet.
But, after the script is in the script section, how do I call it in an event?

Ho-oh 112
March 4th, 2012, 07:40 AM
I'm probably an idiet.
But, after the script is in the script section, how do I call it in an event?


you call it through: pbMysteryGift in an event script

krakacen
March 9th, 2012, 01:08 PM
Hi, I have a problem
Every time I use the script (the link of your script or mine)
Just get the message but did not receive your gift, you know why?
thanks

Elyssia
March 11th, 2012, 10:35 AM
for some reason my game won't start-up anymore due to this error: Script <scriptname> line 160: SyntaxError occurred.

When I check this, it seems it crashes on calling: rescue

:/

Ho-oh 112
March 12th, 2012, 06:26 AM
Hi, I have a problem
Every time I use the script (the link of your script or mine)
Just get the message but did not receive your gift, you know why?
thanks

It's an old link, before I added the new features I don't update it.

for some reason my game won't start-up anymore due to this error: Script <scriptname> line 160: SyntaxError occurred.

When I check this, it seems it crashes on calling: rescue

:/

Full error report, I don't get the error.

Elyssia
March 12th, 2012, 08:18 AM
The strangest thing is that it didn't left an error log behind where the error was comming from, but according to the syntax error it shows that it keeps crashing while calling rescue in the script.

No idea why it does that...
Maybe i've put into the wrong script category?
I don't know, the tutorial doesn't look that clear to me... But your trading script actually does.

*Note: I do use the 24th December release of Essentials, don't know if that will affect the script?

Ho-oh 112
March 13th, 2012, 06:06 AM
The strangest thing is that it didn't left an error log behind where the error was comming from, but according to the syntax error it shows that it keeps crashing while calling rescue in the script.

No idea why it does that...
Maybe i've put into the wrong script category?
I don't know, the tutorial doesn't look that clear to me... But your trading script actually does.

*Note: I do use the 24th December release of Essentials, don't know if that will affect the script?


Use the new release, that's the problem.

Elyssia
March 14th, 2012, 02:09 PM
Tried the latest version today, with the Mystery Gift DLC, but still the exact same error...
Again crash on line 160, no logs were made.

mappel6
March 15th, 2012, 03:03 AM
Same here. I get the exact same errors every time.

Ho-oh 112
March 15th, 2012, 06:16 AM
Ok, lemme take a look at it.


EDIT: Fixed it.

mappel6
March 15th, 2012, 10:58 AM
Awesomeness! I just tested it out, it works PERFECTLY. Except for the misspelling of "is" in the "Party full" message. Is there a way that we can add in a Mystery Gift option on the title screen? I'm going to look into it myself. I'm not much of a scripter, but I can do a few things.

EDIT: Now I'm having a website problem. I've used webs.com, but I can't seem to upload .txt files. Can you help on this? I started with a personal website. The website is here, pkvoid.webs.com, even though there is almost nothing there.

REEDIT: Just found the File Uploader. Problem Solved.

Ho-oh 112
March 16th, 2012, 06:18 AM
Awesomeness! I just tested it out, it works PERFECTLY. Except for the misspelling of "is" in the "Party full" message. Is there a way that we can add in a Mystery Gift option on the title screen? I'm going to look into it myself. I'm not much of a scripter, but I can do a few things.

EDIT: Now I'm having a website problem. I've used webs.com, but I can't seem to upload .txt files. Can you help on this? I started with a personal website. The website is here, pkvoid.webs.com, even though there is almost nothing there.

REEDIT: Just found the File Uploader. Problem Solved.

wow, I can't believe I misspelled is...

Elyssia
March 16th, 2012, 08:41 AM
Works great now, Thanks :D

krakacen
March 16th, 2012, 11:59 AM
hello again, I use the fixed and now I get the gift is corrupt :(

Ho-oh 112
March 17th, 2012, 04:06 AM
hello again, I use the fixed and now I get the gift is corrupt :(



Alright, I'll look at that, I'm not getting the error but.




EDIT: Made a fix, try it.

krakacen
March 18th, 2012, 12:03 PM
I still have the same problem, :(

Ho-oh 112
March 18th, 2012, 04:37 PM
Does it display the Message you made?


EDIT: Try now.

krakacen
March 18th, 2012, 07:53 PM
if you get the message but when I just said "the gift is corrupted" and it ends.

PS: you can get a demo if it works for you?

Ho-oh 112
March 19th, 2012, 05:19 AM
if you get the message but when I just said "the gift is corrupted" and it ends.

PS: you can get a demo if it works for you?


it works fine for me, are you using the 28th january release of poke-essentials?

krakacen
March 19th, 2012, 12:18 PM
yes, also get the message "syntax error" on line 180

Ho-oh 112
March 19th, 2012, 03:33 PM
see if it works now, I added a fix.

krakacen
March 19th, 2012, 05:53 PM
I does not work, and try several versions of the essentials and I keep going like

Ho-oh 112
March 19th, 2012, 06:06 PM
I does not work, and try several versions of the essentials and I keep going like


Fixed version I EVEN TESTED 5 TIMES TO MAKE SURE IT WORKS EVEN WITH MY OLD LINK!

UnderMybrella
March 28th, 2012, 11:47 AM
Quick Question= A, do I have to use pokessentials?
B, if I upload this to a website, won't people then be able to access the txt documents?

pokemonmasteraaron
March 28th, 2012, 05:05 PM
Quick Question= A, do I have to use pokessentials?
B, if I upload this to a website, won't people then be able to access the txt documents?


I haven't used this script, but I know the answers to your questions.
1. Yes, you have to use Essentials.
The script was written in the RGSS language, and I don't think there is any way to convert it to any other scripting language with out rewriting the whole thing.
2. Probably, if they know where to look.
For example, if the URL to your text document was http://mygame.net/Gift.txt
the person could find your text document by typing in that address.
You can make it difficult, by not linking to it anywhere accept in your script.
btw, hi!
Haven't seen you in a while.
Don't guess you'd remember me though.
We planned out my hack a little.
That was before I realized the beauty of RPG Maker XP.

Ho-oh 112
March 28th, 2012, 07:37 PM
Quick Question= A, do I have to use pokessentials?
B, if I upload this to a website, won't people then be able to access the txt documents?

1. Yes

2. yes BUT they can't change the gift only view it so if that's what you mean if they can change it then no if you mean view yes. (although what Aaron said is correct only place it in my script if you don't want anyone to view it.)

@Aaron, this is possible to convert but you'll need to convert the socket's script too....

UnderMybrella
March 31st, 2012, 12:38 AM
I haven't used this script, but I know the answers to your questions.
1. Yes, you have to use Essentials.
The script was written in the RGSS language, and I don't think there is any way to convert it to any other scripting language with out rewriting the whole thing.
2. Probably, if they know where to look.
For example, if the URL to your text document was http://mygame.net/Gift.txt
the person could find your text document by typing in that address.
You can make it difficult, by not linking to it anywhere accept in your script.
btw, hi!
Haven't seen you in a while.
Don't guess you'd remember me though.
We planned out my hack a little.
That was before I realized the beauty of RPG Maker XP.

Ah. An yes I remember you! Is Pokemon Amethyst lost or is it now being made in RMXP? And Ho-oh, is it possible that you could try to bring this outta pokessentialls? I ain't using it for my game, and it's gonna be a pain if I have to use it.... =/

Ho-oh 112
March 31st, 2012, 05:45 AM
Ah. An yes I remember you! Is Pokemon Amethyst lost or is it now being made in RMXP? And Ho-oh, is it possible that you could try to bring this outta pokessentialls? I ain't using it for my game, and it's gonna be a pain if I have to use it.... =/

depends what language do you want it in?

UnderMybrella
March 31st, 2012, 11:47 AM
uh... doesn't rpg maker XP still run off RGSS? If so, could I get it in that with no extra things attached plz?

overstood
April 1st, 2012, 04:21 AM
lol ho-oh just finish (or start?)this one first before you get to work on a new/different version.
thanx

Ho-oh 112
April 1st, 2012, 05:33 AM
lol ho-oh just finish (or start?)this one first before you get to work on a new/different version.
thanx

this is finished is finished as of now...


uh... doesn't rpg maker XP still run off RGSS? If so, could I get it in that with no extra things attached plz?

RGSS? This is RGSS, except it runs with essentials if you want it for a different kit you'll have to give me the link of it.

UnderMybrella
April 3rd, 2012, 01:58 PM
OK... What I want is this script still in RGSS but not being dependent on essentials. Just normal RMXP scripts.... Is that ok and/or possible?

Ho-oh 112
April 3rd, 2012, 03:11 PM
OK... What I want is this script still in RGSS but not being dependent on essentials. Just normal RMXP scripts.... Is that ok and/or possible?

Yeah you need the sockets script from essentials if you want the downloading functions in different games.

UnderMybrella
April 3rd, 2012, 10:02 PM
Ahh. Is the socket script just, like, able to be taken from essentials and plunk it into a new project, brand new?

Ho-oh 112
April 4th, 2012, 06:21 AM
Ahh. Is the socket script just, like, able to be taken from essentials and plunk it into a new project, brand new?

yup that's right I've done it a few times...

krakacen
April 4th, 2012, 08:31 PM
hello, the script works but I have another problem:
When you get the gift, is available, no?
The problem is that the event is repeated many times allowing to obtain the same gift
Can you help me?

UnderMybrella
April 5th, 2012, 01:23 AM
hello, the script works but I have another problem:
When you get the gift, is available, no?
The problem is that the event is repeated many times allowing to obtain the same gift
Can you help me?

Ok. there are a few ways to do this, depending what you're doing.
If:
a) There is only one event where you may receive the gift AND you have 4 or less gifts.

With your current mystery gift event, simply put in multiple conditional branches, all of which check self switches.
After the check goes by. make sure that if selfswitch a is on, check b and so on.
if selfswitch a in not turned on, then make it do the mystery gift thing and then turn selfswitch a on. Do this with the others again.

B) There are more places with events that can give you mystery gifts OR you have more than 4 gifts.
Simply do the above but use normal switches instead of selfswitches.

Hope it helps!

Ho-oh 112
April 5th, 2012, 05:20 AM
Ok. there are a few ways to do this, depending what you're doing.
If:
a) There is only one event where you may receive the gift AND you have 4 or less gifts.

With your current mystery gift event, simply put in multiple conditional branches, all of which check self switches.
After the check goes by. make sure that if selfswitch a is on, check b and so on.
if selfswitch a in not turned on, then make it do the mystery gift thing and then turn selfswitch a on. Do this with the others again.

B) There are more places with events that can give you mystery gifts OR you have more than 4 gifts.
Simply do the above but use normal switches instead of selfswitches.

Hope it helps!

Well I'll get to adding self switch support/titlescreen support when I'm finished with my trade/H-Mode scripts alright.

UnderMybrella
April 6th, 2012, 02:29 PM
Out of curiosity ho-oh, does this script feature support for multiple mystery gifts at once?

Mystery Gift is a feature that charge between generations, so put more descriptions that you system do in the topic. After a look I realized that this script can make the player to receive an egg/item/pokémon. Anyway, good script.
Idea: Maybe you can put a variable to be compared in the txt for each entry before give the pokémon.
Example: Player can only get one level 20 pokémon after this variable be 8 or greater, thing that occurs when the player reach at the sixth city, for other in the level 30 this variable need to be 13, and so on.
If someone don't like to use this feature, just made this optional making by default to this variable being -1 and all pokémon this line entry being 0, making the game to ignore when this variable is negative.

A Note to developers: It's no good to give a Victini lv5 at start of the game, so use this system moderately. maybe unlock after some game progress.
A note to Gamefreak: Being able to receive a lvl 100 reshiram after the first gym is not a good idea....... =/

This doesn't seem to be working for me ho-oh.... I'm using latest release of essentials, just can't actually seem to get the gift. Talked to the dude that has the event script but I don't receive anything. Nothing shows up.... It's odd....

krakacen
April 6th, 2012, 08:47 PM
well I'll try what you said,
other questions:
You can make the text that is downloaded is put into a specific folder?
and if so how?

Ho-oh 112
April 7th, 2012, 07:44 AM
well I'll try what you said,
other questions:
You can make the text that is downloaded is put into a specific folder?
and if so how?


Yes where it says "Gift.txt" put "FolderHere/Gift.txt"

krakacen
April 7th, 2012, 12:56 PM
where in the script I put that?
The file is saved as "text.txt

Ho-oh 112
April 8th, 2012, 04:49 PM
where in the script I put that?
The file is saved as "text.txt

near the top is this:



file = File.open('text.txt', 'wb'){|f|
f.write(code)
}
array = IO.readlines('text.txt')



change text.txt to let's say: Data/Gift.txt then it saves to: Project/Data/Gifts.txt

salva123
April 28th, 2012, 02:38 PM
I have a problem with this script, when I put number 1 in the option to make a pokemon shiny, I receive the pokemon as a normal one, what can I do to solve this problem?

Ho-oh 112
April 30th, 2012, 05:58 AM
I have a problem with this script, when I put number 1 in the option to make a pokemon shiny, I receive the pokemon as a normal one, what can I do to solve this problem?

I'll take a look, it might take a while since I'm real busy.

salva123
April 30th, 2012, 07:00 AM
I'll take a look, it might take a while since I'm real busy.

No problem Hooh, take your time

SytheXP
May 18th, 2012, 06:36 PM
Hey, I have a question more so about webs than the actual script, How do I get my uploaded .txt onto the page? also I was wondering if you could make the layout a bit more clear. For example do we need to Put pokemon Dex numbers/Move Numbers so on and so forth or Internal names/numbers. I tested it with your .txt and it works perfectly for what I am needing. Just need to get it set up with my stuff. My current .txt look like this.
Sythe from the Under-Net presents you with a dark gift. (Message)
0 (Pokemon)
491 (Darkrai)
50 (Level)
0 (Form)
0 (Shiny? No)
39 (Move 1)
25 (Move 2)
188 (Move 3)
449 (Move 4)
Sythe (OT)
39257 (ID #)
8 (Nature/Mild)
521 (Item)
0 (Ribbon)
0 (Gender)
31 (IV)
31 (IV)
31 (IV)
31 (IV)
31 (IV)
31 (IV)

Wasn't quite sure on the layout you didnt really explain it very well in your OP. For example do I use the Move Internal # from Moves.TXT or the number from the order it appears under the desired pokemon in Pokemon.txt? And for adding Items, If I wanted to add my custom item (Which cost 75k in game) would I put its Item # from Items.txt? basically Im asking if you can clarify a little better and walk users through how to get their .txt file uploaded to webs.

Delta Stream
May 18th, 2012, 06:54 PM
Hey, I have a question more so about webs than the actual script, How do I get my uploaded .txt onto the page? also I was wondering if you could make the layout a bit more clear. For example do we need to Put pokemon Dex numbers/Move Numbers so on and so forth or Internal names/numbers. I tested it with your .txt and it works perfectly for what I am needing. Just need to get it set up with my stuff. My current .txt look like this.
Sythe from the Under-Net presents you with a dark gift. (Message)
0 (Pokemon)
491 (Darkrai)
50 (Level)
0 (Form)
0 (Shiny? No)
39 (Move 1)
25 (Move 2)
188 (Move 3)
449 (Move 4)
Sythe (OT)
39257 (ID #)
8 (Nature/Mild)
521 (Item)
0 (Ribbon)
0 (Gender)
31 (IV)
31 (IV)
31 (IV)
31 (IV)
31 (IV)
31 (IV)Wasn't quite sure on the layout you didnt really explain it very well in your OP. For example do I use the Move Internal # from Moves.TXT or the number from the order it appears under the desired pokemon in Pokemon.txt? And for adding Items, If I wanted to add my custom item (Which cost 75k in game) would I put its Item # from Items.txt? basically Im asking if you can clarify a little better and walk users through how to get their .txt file uploaded to webs.Moves have to use the numbers from Moves.txt. Items, the same way, except use the internal number from Items.txt. To upload to Webs, do this:
1. Log into your Webs Account.
2. Click View Control Panel.
3. Click Manage Pages & Apps.
4. Click File Manager.
5. Make a folder called Gifts.
6. Click on Gifts and upload the gift.txt. Make sure the text file is actually name gift.txt!
7. Test, and it should work. :)
8. ???
9. PROFIT! :D

Also I suggest you remove the ()'s and the words inside them. It'll give you a "The Gift was Corrupted!" error if you don't. Or you can just put a # in front of them.

SytheXP
May 18th, 2012, 07:26 PM
Moves have to use the numbers from Moves.txt. Items, the same way, except use the internal number from Items.txt. To upload to Webs, do this:
1. Log into your Webs Account.
2. Click View Control Panel.
3. Click Manage Pages & Apps.
4. Click File Manager.
5. Make a folder called Gifts.
6. Click on Gifts and upload the gift.txt. Make sure the text file is actually name gift.txt!
7. Test, and it should work. :)
8. ???
9. PROFIT! :D

Also I suggest you remove the ()'s and the words inside them. It'll give you a "The Gift was Corrupted!" error if you don't. Or you can just put a # in front of them.

Thanks and I actually dont have the quotes on my document. I put it there to make sure my layout was correct.

Works perfectly thanks :) Well with the exception of not knowing how to set the nature and so forth. And not sure how to add items. Im going to tinker with it a bit and try to find out how to do the items :/

Ho-oh 112
May 19th, 2012, 05:19 AM
Thanks and I actually dont have the quotes on my document. I put it there to make sure my layout was correct.

Works perfectly thanks :) Well with the exception of not knowing how to set the nature and so forth. And not sure how to add items. Im going to tinker with it a bit and try to find out how to do the items :/

Items are from the item's give number (What I do is make the pokemon manually in debug modify all it's attributes and export each stat of it and put that in the file.)

(1=masterball,2=ultraballl,ect.)

pokemonmasteraaron
May 20th, 2012, 07:06 AM
When ever the mystery gift script runs, it stops responding.
There is an option to try to restore the program.
When done, it says the script is hanging.
Help please?
Here is my file and I am using version 7 may 15 2012

This is a mystery gift!
0
26
5
0
0
209
422
85
344
Event01
67792
10
0
242
10
20
20
20
10
14
All the numbers are on separate lines.

Umbreon
May 20th, 2012, 02:08 PM
When ever the mystery gift script runs, it stops responding.
There is an option to try to restore the program.
When done, it says the script is hanging.
Help please?
Here is my file and I am using version 7 may 15 2012

This is a mystery gift!
0
26
5
0
0
209
422
85
344
Event01
67792
10
0
242
10
20
20
20
10
14
All the numbers are on separate lines.

Try the test gift first (if that doesn't work it's the Ho-oh's system)

pokemonmasteraaron
May 20th, 2012, 02:14 PM
Wow, I derped big time.
I shoulda thought to try that.
I'll go test that.

pokefangames
May 22nd, 2012, 07:46 PM
this looks good, but I do have a question: is this like the DS games where you can have only on Mystery gift at a time or similar to the GBA games where you have preset codes?

TheShinyMew
June 23rd, 2012, 06:59 PM
I will try that, but before you do, can you please teach me how to do my own Mystery Gift System?

EDIT: By the way, is this script compatible with all DS Pokémon games (including Black/White/Black2/White2)?

BattleScarred53
September 30th, 2012, 10:35 AM
I just tried (and succeeded) at getting a gift working, but it can be obtained infinite times. Is there any way to get the gift once but keep the event for further use?

EDIT: Sorry, I'm an idiot. I had it in debug mode.

By the way, if you want to easily upload the gift file, use text-upload.com for it. I didn and I copied the .txt file download link. Then, just put the link into the script and it works like a charm.

BenGames,Films, and More!
March 29th, 2013, 12:54 PM
Hey, I decided to upload it here!