[CT] Craft Fragment Script

Sanity

Legend
Legendary
Nov 7, 2007
3,809
115
300
The reason i am releasing these different scripts as i want people to learn the scripting and how things work for woool, all these scripts will be released on my next SQL release but it's better to have a understanding before hand how things work.

Anyway this is the fragment crafting script, fragments of items will drop in game, you need to collect 4 of these plus 2 gems to craft the real item.

So lets say you have 4 DragonSlayerFragments and 2 FireGems
You would put these into the crafting window (@@supercompound) to create a DragonSlayer. LuckySymbol just increase chance but i think it's set to 100% anyway, not sure, LuckySymbol goes into the middle slot.

How it works.
Crafting Item|Result Item

Simple.
x6hopf.jpg

Please use this script from QuestDiary.

Code:
[@CraftFragments]
{
Fragment crafting is a craft which allows you\
to combine fragments together to create a item\
Fragments can be found from all types of bosses.\
Would you like to combine fragments?\
<Combine Fragments/@CraftBegins>\
<Exit/@exit>


[@CraftBegins]
Craft Fragments Example:\
MightHelmFrag x4 & FireGemx2 will craft a\
MightHelmet.\
LuckySymbol can be used to increas the success rate.\
<Craft Equipment/@@supercompound>\
<Exit/@exit>




[@@supercompound]
#IF
checkitemUPBOX
#ELSEACT
SENDMSG 5 "Items do not exist, upgrade failed"
break


#IF
EQUAL $SUPERBOXITEM(3).NAME $SUPERBOXITEM(2).NAME
EQUAL $SUPERBOXITEM(4).NAME $SUPERBOXITEM(2).NAME
EQUAL $SUPERBOXITEM(5).NAME $SUPERBOXITEM(2).NAME
#ACT
SETSUPERBOXRESULT 1
#ELSEACT
MessageBox "Insert 4 identical fragments."
break


[~@supercompound_ok]
#IF
random 1
#ACT
movr P0 100


#IF
POS $SUPERBOXITEM(6).NAME LuckySymbol
#ACT
inc P0 30


#IF
equal $SUPERBOXITEM(6).NAME LuckySymbol(B)
equal $SUPERBOXITEM(6).DURA 0
#ACT
TAKESUPERBOXITEM 6
SENDMSG 5 "LuckySymbol (B) The frequency of use have been exhausted"


#IF
equal $SUPERBOXITEM(6).NAME LuckySymbol(B)
large $SUPERBOXITEM(6).DURA 0 
#ACT
inc P0 30


#IF
equal $SUPERBOXITEM(0).SHAPE 0
#ACT
mov P1 0


#IF
equal $SUPERBOXITEM(0).SHAPE 1
#ACT
mov P1 1


#IF
equal $SUPERBOXITEM(0).SHAPE 2
#ACT
mov P1 2


#IF
equal $SUPERBOXITEM(0).SHAPE 3
#ACT
mov P1 3


#IF
equal $SUPERBOXITEM(0).SHAPE 4
#ACT
mov P1 4


#IF
equal $SUPERBOXITEM(1).SHAPE 0
#ACT
mov P2 0


#IF
equal $SUPERBOXITEM(1).SHAPE 1
#ACT
mov P2 1


#IF
equal $SUPERBOXITEM(1).SHAPE 2
#ACT
mov P2 2


#IF
equal $SUPERBOXITEM(1).SHAPE 3
#ACT
mov P2 3


#IF
equal $SUPERBOXITEM(1).SHAPE 4
#ACT
mov P2 4


#IF
equal $SUPERBOXITEM(0).WEIGHT 1
#ACT
inc P0 1


#IF
equal $SUPERBOXITEM(0).WEIGHT 2
#ACT
inc P0 4


#IF
equal $SUPERBOXITEM(0).WEIGHT 3
#ACT
inc P0 16


#IF
equal $SUPERBOXITEM(0).WEIGHT 4
#ACT
inc P0 64


#IF
equal $SUPERBOXITEM(1).WEIGHT 1
#ACT
inc P0 1


#IF
equal $SUPERBOXITEM(1).WEIGHT 2
#ACT
inc P0 4


#IF
equal $SUPERBOXITEM(1).WEIGHT 3
#ACT
inc P0 16


#IF
equal $SUPERBOXITEM(1).WEIGHT 4
#ACT
inc P0 64


#IF
equal $SUPERBOXITEM(6).NAME LuckySymbol(B)
#ACT
UpgradeUserItemEx $SUPERBOXITEM(6).ItemExD 13 - 1
#ELSEACT
TAKESUPERBOXITEM 6


#IF
random 1
#ACT
MOV S0 $SUPERBOXITEM(2).NAME
TAKESUPERBOXITEM 0
TAKESUPERBOXITEM 1
TAKESUPERBOXITEM 2
TAKESUPERBOXITEM 3
TAKESUPERBOXITEM 4
TAKESUPERBOXITEM 5
#IF
PosEx $STR(S0) .\QuestDiary\Data\TextData\FragmentItems.txt S1
#ACT
GETVALIDSTR $STR(S1) | S2 S3
Give $STR(S3) 1
SENDMSG 1 "Congratulation{<$USERNAME>} Fragments were successfully synthesized into a {<$STR(S3)>}"
MessageBox "Congratulations you have made a <$STR(S3)> Synthesis is complete"


#IF
small P0 $STR(P1)
#ACT
break


#IF
large $ItemExN.$PARAM(0).STDMODE 9
small $ItemExN.$PARAM(0).STDMODE 12
#ACT
goto @衣服
break


#IF
equal $ItemExN.$PARAM(0).STDMODE 15
#ACT
goto @头盔
break


#IF
large $ItemExN.$PARAM(0).STDMODE 18
small $ItemExN.$PARAM(0).STDMODE 22
#ACT
goto @项链
break


#IF
equal $ItemExN.$PARAM(0).STDMODE 24
#ACT
goto @手镯
break


#IF
equal $ItemExN.$PARAM(0).STDMODE 26
#ACT
goto @手镯
break


#IF
large $ItemExN.$PARAM(0).STDMODE 21
small $ItemExN.$PARAM(0).STDMODE 24
#ACT
goto @戒指
break


#IF
equal $ItemExN.$PARAM(0).STDMODE 58
#ACT
goto @腰带
break


#IF
equal $ItemExN.$PARAM(0).STDMODE 81
#ACT
goto @靴子
break


[@衣服]
#IF
equal P1 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P1 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P1 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P1 3
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P1 4
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


#IF
equal P2 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P2 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P2 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P2 3
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P2 4
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


[@头盔]
#IF
equal P1 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P1 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P1 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P1 3
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P1 4
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


#IF
equal P2 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P2 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P2 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P2 3
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P2 4
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


[@项链]
#IF
equal P1 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P1 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P1 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P2 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P2 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P2 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


[@手镯]
#IF
equal P1 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P1 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P1 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P1 3
random 2
small $ITEMINFO[$PARAM(0)].STDMODE 26
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P1 4
random 2
small $ItemExN.$PARAM(0).STDMODE 26
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


#IF
equal P2 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P2 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P2 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P2 3
random 2
small $ItemExN.$PARAM(0).STDMODE 26
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P2 4
random 2
small $ItemExN.$PARAM(0).STDMODE 26
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


[@戒指]
#IF
equal P1 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P1 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P1 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P1 3
small $ItemExN.$PARAM(0).STDMODE 22
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P1 4
small $ItemExN.$PARAM(0).STDMODE 22
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


#IF
equal P2 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P2 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P2 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P2 3
small $ItemExN.$PARAM(0).STDMODE 22
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P2 4
small $ItemExN.$PARAM(0).STDMODE 22
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


[@腰带]
#IF
equal P1 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P1 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P1 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P1 3
random 2
small $ItemExN.$PARAM(0).STDMODE 58
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P1 4
random 2
small $ItemExN.$PARAM(0).STDMODE 58
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


#IF
equal P2 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P2 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P2 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P2 3
random 2
small $ItemExN.$PARAM(0).STDMODE 58
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P2 4
random 2
small $ItemExN.$PARAM(0).STDMODE 58
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


[@靴子]
#IF
equal P1 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P1 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P1 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P1 3
small $ItemExN.$PARAM(0).STDMODE 81
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P1 4
small $ItemExN.$PARAM(0).STDMODE 81
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1


#IF
equal P2 0
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 2 + 1


#IF
equal P2 1
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 3 + 1


#IF
equal P2 2
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 4 + 1


#IF
equal P2 3
small $ItemExN.$PARAM(0).STDMODE 81
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 0 + 1


#IF
equal P2 4
small $ItemExN.$PARAM(0).STDMODE 81
random 2
#ACT
UpgradeUserItemEx $PARAM(0) 1 + 1
}

QuestDiary\Data\TextData\FragmentItems.txt

Code:
MightHelmFrag|MightHelmet
MightNeckFrag|MightNecklace
MightBraceFrag|MightBracelet
MightRingFrag|MightRing
MightBootsFrag|MightBoots
MightBeltFrag|MightBelt
 

OxxpqxxO

Dentity
Veteran
Oct 25, 2012
331
44
55
Good work mate... i have a question about this.

crafting using a command system or have a npc for this crafting system?

i want to know, because i don't like to using command system @@supercompound for crafting.
 
Last edited:

Sanity

Legend
Legendary
Nov 7, 2007
3,809
115
300
Good work mate... i have a question about this.

crafting using a command system or have a npc for this crafting system?

i want to know, because i don't like to using command system @@supercompound for crafting.

@@Supercompound is coded, it brings up the crafting window, you can do it without this command but you won't be able to use that window.

Could always just Checkitem and Give but would be kinder boring tbh ;p.
 

OxxpqxxO

Dentity
Veteran
Oct 25, 2012
331
44
55
Damn so i need this command to bring up the crafting window... i hate this
RpS_lol.gif
.. but in the official need to using @@Supercompound to bring up the craftin windows or ther have a npc or a button in game interface to bring up the crafting windows... or you still working at this script and need to fix it?

I ask because i dont know and i want to learn more and more about this game.
 
Last edited:

Sanity

Legend
Legendary
Nov 7, 2007
3,809
115
300
Damn so i need this command to bring up the crafting window... i hate this :lol.. but in the official need to using @@Supercompound to bring up the craftin windows or ther have a npc or a button in game interface to bring up the crafting windows... or you still working at this script and need to fix it?

I ask because i dont know and i want to learn more and more about this game.

It's command used in npc dialog
<Crafting/@@Supercompound>
It's client coded

Where do you want the crafting to show up on? You could make a cmd command for it if you wanted too.

 

OxxpqxxO

Dentity
Veteran
Oct 25, 2012
331
44
55
So when i press Crafting in npc dialog the crafting windows apear.. right? if its so that is what I wanted to hear.

Damn I understand wrong...this is what I understand, to open yor windows crafting need to write this command @@Supercompound like @superman in chat to open crafting windows.... my bad mate apologies.
 
Last edited:

Sanity

Legend
Legendary
Nov 7, 2007
3,809
115
300
So when i press Crafting in npc dialog the crafting windows apear.. right? if its so that is what I wanted to hear.

Damn I understand wrong...this is what I understand, to open yor windows crafting need to write this command @@Supercompound like @superman in chat to open crafting windows.... my bad mate apologies.


No it's like @BUY, @Sell.
see script


<Craft Equipment/@@supercompound>\
<Exit/@exit>

[@@supercompound]
#IF
checkitemUPBOX
#ELSEACT
SENDMSG 5 "Items do not exist, upgrade failed"break
 

OxxpqxxO

Dentity
Veteran
Oct 25, 2012
331
44
55
Yes now i understand... I was thinking somewhere else when I read the first post.
Was a misunderstanding ... I have not read the first post properly.
Everything is how i like, anyway you make a good work.
 

Voya

Golden Oldie
Golden Oldie
Mar 15, 2008
967
53
135
USA
Dang, thats a long/tedious script you got there :P
Its similar to Mir3, but has some differences..
I'd be happy to have a shot at scripting something simple if you'd like :)