- 15
- Posts
- 10
- Years
- Seen Apr 1, 2024
Hey guys, so ive been working on something for the last few days, some of you have probably seen my posts asking for help on some of the key components of it, which i appreciate a lot, those of you who have helped, i could had done it without you.
That being said, my idea was to bring some sort of crafting system to Pokemon. Like other RPGs i really enjoy being able to gather materials and craft my own items.
After a few days of constant writing, testing, and rewriting, ive finally got it to work right! It's nothing fancy but its my first big test in scripting i feel. By far the most complicated thing ive done so far lol So, Ill explain.
I created an item that runs a script that opens a multichoice window. That window is linked to 3 more multichoice windows by the last choice on the first page which says 'next page'. However at the time of writing, i have only completed the first page.
Each multichoice window has 8 selections, the first 6-7 are the items you can craft, the last are for navigation. When you select, let's say, "Pokeball", it tells you the materials and the quantity of those materials that are required to craft the item.
The script then checks to see if you have the right materials, removes them if you do, and gives you the selected item you "crafted". Its fairly simple, but for a rookie, it has been a heck of a challenge lol
Again, its not fully completed to my intent yet, i plan to add the other pages and create some custom items for it, but it will work well enough for anyone who wants to modify it to however many options they want.
I wanted to make it available to the community so if anyone else wanted to use it, they could. If anyone does want to use it, and wants to know how exactly to set it up, just msg me or ask here. I just dont have time to write a detailed tutorial on the process atm, but ill be happy to help.
If you guys find any bugs, let me know, and constructive criticism and ideas are always welcome.
Thanks again to all those who helped me get this far, from tutorials, to answering my stupid questions lol
Here is the script:
Quote:
#dynamic 0xEB1C4C
#org @start
lock
multichoice 0x0 0x0 0x41 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @pokeball
compare 0x8000 0x1
if 0x1 goto @greatball
compare 0x8000 0x2
if 0x1 goto @ultraball
compare 0x8000 0x3
if 0x1 goto @superpotion
compare 0x8000 0x4
if 0x1 goto @hyperpotion
compare 0x8000 0x5
if 0x1 goto @maxpotion
compare 0x8000 0x6
if 0x1 goto @fullrestore
compare 0x8000 0x7
if 0x1 goto @page2
release
end
#org @page2
goto @start
end
#org @pokeball
msgbox @pokeballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x30 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0x5
removeitem 0xC7 0x5
removeitem 0x30 0x5
removeitem 0x1E 0x5
msgbox @received1 0x4
giveitem 0x4 0x5 0x0
closeonkeypress
goto @start
release
end
#org @pokeballmats
= Items Required:\nSHOAL SHELL x5\lRED SHARD x5\lMETAL COAT x5\lENERGY POWDER x5\pCrafting this item will give you\nx5 POKé BALLs.
#org @received1
= \v\h01 crafted 5 POKé BALLs!
#org @greatball
msgbox @greatballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x31 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0xF
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0x5
removeitem 0x31 0xA
removeitem 0xC7 0xA
removeitem 0x1E 0xF
msgbox @received2 0x4
giveitem 0x3 0x5 0x0
closeonkeypress
goto @start
release
end
#org @greatballmats
= Items Required:\nSHOAL SHELL x5\lBLUE SHARD x10\lMETAL COAT x10\lENERGY POWDER x15\pCrafting this item will give you\nx5 GREAT BALLs.
#org @received2
= \v\h01 crafted 5 GREAT BALLs!
#org @ultraball
msgbox @ultraballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x32 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0xF
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0x19
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0xA
removeitem 0x32 0xA
removeitem 0xC7 0xF
removeitem 0x1E 0x19
msgbox @received3 0x4
giveitem 0x2 0x6 0x0
closeonkeypress
goto @start
release
end
#org @ultraballmats
= Items Required:\nSHOAL SHELL x5\lYELLOW SHARD x15\lMETAL COAT x15\lENERGY POWDER x25\pCrafting this item will give you\nx5 ULTRA BALLs.
#org @received3
= \v\h01 crafted 5 ULTRA BALLs!
#org @superpotion
msgbox @superpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0xD 0x3
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x1
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0xD 0x3
removeitem 0x100 0x1
msgbox @received4 0x4
giveitem 0x16 0x1 0x0
closeonkeypress
goto @start
release
end
#org @superpotionmats
= Items Required:\nPOTION x3\lMIRACLE SEED x1\pCrafting this item will give you\nx1 SUPER POTION.
#org @received4
= \v\h01 crafted a SUPER POTION!
#org @hyperpotion
msgbox @hyperpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x16 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x16 0x2
removeitem 0x100 0x2
msgbox @received5 0x4
giveitem 0x15 0x1 0x0
closeonkeypress
goto @start
release
end
#org @hyperpotionmats
= Items Required:\nSUPER POTION x2\lMIRACLE SEED x2\lCrafting this item will give you\lx1 HYPER POTION.
#org @received5
= \v\h01 crafted a HYPER POTION!
#org @maxpotion
msgbox @maxpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x15 0x1
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x16 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x3
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x15 0x1
removeitem 0x16 0x2
removeitem 0x100 0x3
msgbox @received6 0x4
giveitem 0x14 0x1 0x0
closeonkeypress
goto @start
release
end
#org @maxpotionmats
= Items Required:\nHYPER POTION x1\lSUPER POTION x2\lMIRACLE SEED x3\pCrafting this item will give you\nx1 MAX POTION.
#org @received6
= \v\h01 crafted a MAX POTION!
#org @fullrestore
msgbox @fullrestoremats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x14 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x17 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x14 0x2
removeitem 0x100 0x5
removeitem 0x17 0x2
msgbox @received7 0x4
giveitem 0x13 0x1 0x0
closeonkeypress
goto @start
release
end
#org @fullrestoremats
= Items Required:\nMAX POTION x2\lMIRACLE SEED x5\lFULL HEAL x2\pCrafting this item will give you\nx1 FULL RESTORE.
#org @received7
= \v\h01 crafted a FULL RESTORE!
#org @page1
msgbox @page11 0x4
closeonkeypress
goto @start
#org @notenough
msgbox @notenough1 0x4
closeonkeypress
goto @start
end
#org @page11
= Returning to page 1.
#org @notenough1
= You do not have the required\nmaterials to craft this item.
#org @areyousure
= Are you sure you want to craft\nthis item?
#org @crafting1
= Crafting item...
#org @done
= Success!
Happy Hacking!
__________________
"Humans may have created me, but they will never enslave me! This cannot be my destiny!" -Mewtwo
That being said, my idea was to bring some sort of crafting system to Pokemon. Like other RPGs i really enjoy being able to gather materials and craft my own items.
After a few days of constant writing, testing, and rewriting, ive finally got it to work right! It's nothing fancy but its my first big test in scripting i feel. By far the most complicated thing ive done so far lol So, Ill explain.
I created an item that runs a script that opens a multichoice window. That window is linked to 3 more multichoice windows by the last choice on the first page which says 'next page'. However at the time of writing, i have only completed the first page.
Each multichoice window has 8 selections, the first 6-7 are the items you can craft, the last are for navigation. When you select, let's say, "Pokeball", it tells you the materials and the quantity of those materials that are required to craft the item.
The script then checks to see if you have the right materials, removes them if you do, and gives you the selected item you "crafted". Its fairly simple, but for a rookie, it has been a heck of a challenge lol
Again, its not fully completed to my intent yet, i plan to add the other pages and create some custom items for it, but it will work well enough for anyone who wants to modify it to however many options they want.
I wanted to make it available to the community so if anyone else wanted to use it, they could. If anyone does want to use it, and wants to know how exactly to set it up, just msg me or ask here. I just dont have time to write a detailed tutorial on the process atm, but ill be happy to help.
If you guys find any bugs, let me know, and constructive criticism and ideas are always welcome.
Thanks again to all those who helped me get this far, from tutorials, to answering my stupid questions lol
Here is the script:
Quote:
#dynamic 0xEB1C4C
#org @start
lock
multichoice 0x0 0x0 0x41 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @pokeball
compare 0x8000 0x1
if 0x1 goto @greatball
compare 0x8000 0x2
if 0x1 goto @ultraball
compare 0x8000 0x3
if 0x1 goto @superpotion
compare 0x8000 0x4
if 0x1 goto @hyperpotion
compare 0x8000 0x5
if 0x1 goto @maxpotion
compare 0x8000 0x6
if 0x1 goto @fullrestore
compare 0x8000 0x7
if 0x1 goto @page2
release
end
#org @page2
goto @start
end
#org @pokeball
msgbox @pokeballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x30 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0x5
removeitem 0xC7 0x5
removeitem 0x30 0x5
removeitem 0x1E 0x5
msgbox @received1 0x4
giveitem 0x4 0x5 0x0
closeonkeypress
goto @start
release
end
#org @pokeballmats
= Items Required:\nSHOAL SHELL x5\lRED SHARD x5\lMETAL COAT x5\lENERGY POWDER x5\pCrafting this item will give you\nx5 POKé BALLs.
#org @received1
= \v\h01 crafted 5 POKé BALLs!
#org @greatball
msgbox @greatballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x31 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0xF
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0x5
removeitem 0x31 0xA
removeitem 0xC7 0xA
removeitem 0x1E 0xF
msgbox @received2 0x4
giveitem 0x3 0x5 0x0
closeonkeypress
goto @start
release
end
#org @greatballmats
= Items Required:\nSHOAL SHELL x5\lBLUE SHARD x10\lMETAL COAT x10\lENERGY POWDER x15\pCrafting this item will give you\nx5 GREAT BALLs.
#org @received2
= \v\h01 crafted 5 GREAT BALLs!
#org @ultraball
msgbox @ultraballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x32 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0xF
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0x19
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0xA
removeitem 0x32 0xA
removeitem 0xC7 0xF
removeitem 0x1E 0x19
msgbox @received3 0x4
giveitem 0x2 0x6 0x0
closeonkeypress
goto @start
release
end
#org @ultraballmats
= Items Required:\nSHOAL SHELL x5\lYELLOW SHARD x15\lMETAL COAT x15\lENERGY POWDER x25\pCrafting this item will give you\nx5 ULTRA BALLs.
#org @received3
= \v\h01 crafted 5 ULTRA BALLs!
#org @superpotion
msgbox @superpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0xD 0x3
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x1
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0xD 0x3
removeitem 0x100 0x1
msgbox @received4 0x4
giveitem 0x16 0x1 0x0
closeonkeypress
goto @start
release
end
#org @superpotionmats
= Items Required:\nPOTION x3\lMIRACLE SEED x1\pCrafting this item will give you\nx1 SUPER POTION.
#org @received4
= \v\h01 crafted a SUPER POTION!
#org @hyperpotion
msgbox @hyperpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x16 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x16 0x2
removeitem 0x100 0x2
msgbox @received5 0x4
giveitem 0x15 0x1 0x0
closeonkeypress
goto @start
release
end
#org @hyperpotionmats
= Items Required:\nSUPER POTION x2\lMIRACLE SEED x2\lCrafting this item will give you\lx1 HYPER POTION.
#org @received5
= \v\h01 crafted a HYPER POTION!
#org @maxpotion
msgbox @maxpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x15 0x1
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x16 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x3
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x15 0x1
removeitem 0x16 0x2
removeitem 0x100 0x3
msgbox @received6 0x4
giveitem 0x14 0x1 0x0
closeonkeypress
goto @start
release
end
#org @maxpotionmats
= Items Required:\nHYPER POTION x1\lSUPER POTION x2\lMIRACLE SEED x3\pCrafting this item will give you\nx1 MAX POTION.
#org @received6
= \v\h01 crafted a MAX POTION!
#org @fullrestore
msgbox @fullrestoremats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x14 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x17 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x14 0x2
removeitem 0x100 0x5
removeitem 0x17 0x2
msgbox @received7 0x4
giveitem 0x13 0x1 0x0
closeonkeypress
goto @start
release
end
#org @fullrestoremats
= Items Required:\nMAX POTION x2\lMIRACLE SEED x5\lFULL HEAL x2\pCrafting this item will give you\nx1 FULL RESTORE.
#org @received7
= \v\h01 crafted a FULL RESTORE!
#org @page1
msgbox @page11 0x4
closeonkeypress
goto @start
#org @notenough
msgbox @notenough1 0x4
closeonkeypress
goto @start
end
#org @page11
= Returning to page 1.
#org @notenough1
= You do not have the required\nmaterials to craft this item.
#org @areyousure
= Are you sure you want to craft\nthis item?
#org @crafting1
= Crafting item...
#org @done
= Success!
Happy Hacking!
__________________
"Humans may have created me, but they will never enslave me! This cannot be my destiny!" -Mewtwo