Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lapine UI Features #4348

Open
wants to merge 18 commits into
base: master
from

Conversation

@cydh
Copy link
Contributor

cydh commented Sep 15, 2019

  • Addressed Issue(s): -

  • Server Mode: Both

  • Description of Pull Request:

    • Features from LapineDdukDdakBox and LapineUpgradeBox
    • Added db files: item_synthesis.yml, item_upgrade.yml
    • Added script commands: upgradeui, synthesisui, reload synthesisdb, reload upgradedb
    • Supported & tested for clients: 2018-06-20e RagexeRE and 2018-06-21a RagexeRE
    • Thanks to: @Lemongrass3110, Divine-pride.net

TODO

  • Items with getgroupitem(IG_Costume_Enchant_Stone_BoxXX); will be follow up soon, the info are listed on gnjoy site, but all in Koreans with different spaces between list there & itemInfo.lub. Taking more times.

How to Add/Edit

Whether you edit the db or the client side, the entries must be equals. Just like item_db X itemInfo.lub. If something nothing working in your end, must be something are different in your client files. So,

  • Just follow the examples (existing entries)
  • Make sure your database entry is match with client file, see the tables below

item_synthesis.yml

item_synthesis.yml <=> data/luafiles514/lua files/datainfo/LapineDdukDdakBox.lub

item_synthesis.yml LapineDdukDdakBox.lub
Id: 23248 ItemID = 23248,
SourceNeeded: 3 NeedCount = 3,
NeedRefine: 7 NeedRefineMin = 7,
SourceItem: SourceItems = { ... }
- Item: 24089
Amount: 1
{ "젬스톤펜던트S", 1, 24089 },
- Item: 24084
Amount: 1
{ "젬스톤아머S", 1, 24084 },
- Item: 24085
Amount: 1
{ "젬스톤슈즈S", 1, 24085 },
- Item: 24086
Amount: 1
{ "젬스톤쉴드S", 1, 24086 },
- Item: 24088
Amount: 1
{ "젬스톤이어링S", 1, 24088 },
- Item: 24087
Amount: 1
{ "젬스톤웨폰S", 1, 24087 }
item_upgrade.yml LapineUpgradeBox.lub
- Id: 23248 # 젬스톤S변환상자
  SourceNeeded: 3
  NeedRefine: 7
  SourceItem:
  - Item: 24089
    Amount: 1
  - Item: 24084
    Amount: 1
  - Item: 24085
    Amount: 1
  - Item: 24086
    Amount: 1
  - Item: 24088
    Amount: 1
  - Item: 24087
    Amount: 1
  Reward: getgroupitem(IG_Gemstone_S_Conversion_Box);
		젬스톤S변환상자 = {
			ItemID = 23248,
			NeedCount = 3,
			NeedRefineMin = 7,
			NeedRefineMax = 20,
			SourceItems = {
				{ "젬스톤펜던트S", 1, 24089 },
				{ "젬스톤아머S", 1, 24084 },
				{ "젬스톤슈즈S", 1, 24085 },
				{ "젬스톤쉴드S", 1, 24086 },
				{ "젬스톤이어링S", 1, 24088 },
				{ "젬스톤웨폰S", 1, 24087 }
			},
			NeedSource_String = "젬스톤 쉐도우"
		},

item_upgrade.yml

item_upgrade.yml <=> data/luafiles514/lua files/datainfo/LapineUpgradeBox.lub

item_upgrade.yml LapineUpgradeBox.lub
Id: 23815 ItemID = 23815,
NeedRefineMin: 0 NeedRefineMin = 0,
NeedOptionNumMin: 2 NeedOptionNumMin = 2,
NotSocketEnchantItem: true NotSocketEnchantItem = true,
TargetItem: TargetItems = { ... }
- Item: 15378 #Lava_Leather_Armor { "Lava_Leather_Armor", 15378 },
- Item: 15379 #Lava_Leather_Suits { "Lava_Leather_Suits", 15379 },
- Item: 15380 #Lava_Leather_Robe { "Lava_Leather_Robe", 15380 }
item_upgrade.yml LapineUpgradeBox.lub
- Id: 23815 # Magma_Essence, 라바 레더 갑옷 장비
  NeedRefineMin: 0
  NeedOptionNumMin: 2
  NotSocketEnchantItem: true
  TargetItem:
  - Item: 15378 #Lava_Leather_Armor
  - Item: 15379 #Lava_Leather_Suits
  - Item: 15380 #Lava_Leather_Robe
  Result: |
    callfunc("F_Lapine_Magma_Essence", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2], .@opts[3]);
    .@params[0] = 0;
    getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
		Magma_Essence = {
			ItemID = 23815,
			NeedRefineMin = 0,
			NeedRefineMax = 20,
			NeedOptionNumMin = 2,
			NotSocketEnchantItem = true,
			TargetItems = {
				{ "Lava_Leather_Armor", 15378 },
				{ "Lava_Leather_Suits", 15379 },
				{ "Lava_Leather_Robe", 15380 }
			},
			NeedSource_String = "라바 레더 갑옷 장비"
		},
---

Thanks to all donors!!

* Features from LapineDdukDdakBox and LapineUpgradeBox
* Added db files: item_synthesis.yml, item_upgrade.yml
* Added script commands: upgradeui, synthesisui
* Supported & tested for clients: 2018-06-20e RagexeRE and 2018-06-21a RagexeRE
* Thanks to: @Lemongrass3110, Divine-pride.net
@rAthenaAPI

This comment has been minimized.

Copy link
Contributor

rAthenaAPI commented Sep 15, 2019

This pull request introduces 1 alert when merging 10f0ead into ddb9e81 - view on LGTM.com

new alerts:

  • 1 for Comparison result is always the same

Warning - Automated code review for rathena/rathena will be disabled on October 1, 2019. You can avoid this by installing the LGTM.com GitHub App. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

@ecdarreola

This comment has been minimized.

Copy link

ecdarreola commented Sep 15, 2019

Warning in CentOS7 for item_synthesis.cpp

image

db/re/item_upgrade.yml Outdated Show resolved Hide resolved
db/re/item_upgrade.yml Outdated Show resolved Hide resolved
@teededung

This comment has been minimized.

Copy link
Contributor

teededung commented Sep 16, 2019

What a beautiful pull request!
Just a quick test and missing a F_Lapine_Shadow_Random_Mix function in LapineEnchants.txt

* Added missing script function `F_Lapine_Shadow_Random_Mix`
* Corrected `F_Lapine_Gold_Statue`usage
* Corrected `F_Lapine_Cursed_Blood` usage
* fixed some alerts
* Thanks to @ecdarreola, @Angelic234, @teededung
* Corrected script function `F_Lapine_Shadow_Random_Mix`
* Corrected item script for `23780`
@yashimwong

This comment has been minimized.

Copy link
Contributor

yashimwong commented Sep 16, 2019

Nice update! But I have an issue, when creating an item [without fulfilling any of the requirements] just clicking make causes the character to disconnect.

db/re/item_db.txt Show resolved Hide resolved
@ssboyz

This comment has been minimized.

Copy link

ssboyz commented Sep 16, 2019

item_db
#23844 item type 3 -> 11

item_upgrade.yml
Id: 23815
NeedOptionNumMin: 2 -> 0

callfunc("F_Lapine_Magma_Essence", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2], .@opts[3], .@vals[3]);
->
callfunc("F_Lapine_Magma_Essence", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);

Id: 23675
callfunc("F_Lapine_Geffen_Magic_Scroll", .@opts[0], .@vals[0]);
->
callfunc("F_Lapine_Geffen_Magic_Scroll", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);

Id: 23679
callfunc("F_Lapine_Geffen_Magic_Scroll2", .@opts[0], .@vals[0]);
->
callfunc("F_Lapine_Geffen_Magic_Scroll2", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);

* Some correction on parsing yaml block
@cydh

This comment has been minimized.

Copy link
Contributor Author

cydh commented Sep 17, 2019

Forgot script for Magma Essence, it's corrent need random 2 options

* Correction on database entries
* Added missing entries for `F_Lapine_Magma_Essence`
* Thanks to @ecdarreola, @ssboyz
@attackjom

This comment has been minimized.

Copy link
Contributor

attackjom commented Sep 17, 2019

Need to change itembonus from bATK -> bBaseATK

@cydh

This comment has been minimized.

Copy link
Contributor Author

cydh commented Sep 17, 2019

oh yeah that cursed bonus shouldn't be exists

db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Outdated Show resolved Hide resolved
db/re/item_db.txt Outdated Show resolved Hide resolved
db/re/item_db.txt Outdated Show resolved Hide resolved
db/re/item_db.txt Outdated Show resolved Hide resolved
db/re/item_db.txt Outdated Show resolved Hide resolved
@cydh

This comment has been minimized.

Copy link
Contributor Author

cydh commented Sep 17, 2019

@yashimwong be default if no item selected, you can't click 'make'. it's intended

* Thanks to @attackjom
@ssboyz

This comment has been minimized.

Copy link

ssboyz commented Sep 17, 2019

item_upgrade.yml

Id: 23676 ~ 23678
.@opts[0], .@vals[0] need add .@opts[1], .@vals[1] and reset this item function script

Question
maybe... item_upgrade.yml and item_synthesis.yml can use @reloaditemdb reloading.

Copy link
Contributor

Atemo left a comment

How about a setting to disable the feature (if possible) ?

doc/script_commands.txt Outdated Show resolved Hide resolved
doc/script_commands.txt Outdated Show resolved Hide resolved
npc/re/other/LapineEnchants.txt Show resolved Hide resolved
Co-Authored-By: Atemo <Atemo@users.noreply.github.com>
@attackjom

This comment has been minimized.

Copy link
Contributor

attackjom commented Sep 18, 2019

From playing in KRO the item that call "Enchant stone" is just simple misc and no script item
Player need to bring those stone as a material to enchant at Malangdo town to Enchant with "True Effect"

ex. 25409 = Champion stone (upper) can give the enchant 29423 (Champion stone with Acolyte sprite)

ex. 25302 = Double Attack stone (garment) can give the enchant 29362 (Double Attack)

@cydh

This comment has been minimized.

Copy link
Contributor Author

cydh commented Sep 18, 2019

good, I don't need to bother add script for all stones obtained from Costume_Enchant_Stone_Box

@attackjom

This comment has been minimized.

Copy link
Contributor

attackjom commented Sep 18, 2019

I have found a bug when use LapineUI

  1. Open LapineUI -> Use old blue box -> Implement enchant -> The Enchant Kit will not consume.

  2. Open LapineUI -> Use item with callfunc script -> Implement enchant -> Disconnect from server
    test with itemid 12444 that can popup "select or mes script"

@ecdarreola

This comment has been minimized.

Copy link

ecdarreola commented Sep 18, 2019

I have found a bug when use LapineUI

  1. Open LapineUI -> Use old blue box -> Implement enchant -> The Enchant Kit will not consume.
  2. Open LapineUI -> Use item with callfunc script -> Implement enchant -> Disconnect from server
    test with itemid 12444 that can popup "select or mes script"

Retested it.
For no. 1, the lapine item is not consumed however the old blue box is the one actually used.
For no. 2, I didn't have any crash or disconnect from server however the character got stucked and was not able to move. Need to reconnect. Items tested 12444 and item that has warning before opening.

@ecdarreola

This comment has been minimized.

Copy link

ecdarreola commented on 80218e9 Sep 20, 2019

Unable to open any item that have the lapineui for this update.

db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Outdated Show resolved Hide resolved
@Dekukun

This comment has been minimized.

Copy link

Dekukun commented Sep 21, 2019

Screenshot_3
Is there any solution for that?

@Dekukun

This comment has been minimized.

Copy link

Dekukun commented Sep 21, 2019

Screenshot_3
Is there any solution for that?

I think you misapplied PR, I just tested it and it's compiling perfectly fine:

1

Now I'm compiling again I did everything from scratch, let's see how

cydh added 2 commits Sep 22, 2019
* Thanks to @attackjom
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
db/re/item_db.txt Show resolved Hide resolved
@Dekukun

This comment has been minimized.

Copy link

Dekukun commented Oct 1, 2019

image
Do you know why that happens?

src/map/script_constants.hpp Outdated Show resolved Hide resolved
* Removed LapineUpgradeItem and LapineUpgradeIndex param
* Source and script doc updates
@attackjom

This comment has been minimized.

Copy link
Contributor

attackjom commented Oct 10, 2019

I don't know is this a official behavior , but When I have random enchant and get duplicate bonus

ex. option 1 = Max HP 1000 //// option 2 = Max HP 450

It will merge the randomoption to 1 line "MaxHP with 1450" despite maximum val is 1000.

@blackatz456

This comment has been minimized.

Copy link

blackatz456 commented Oct 14, 2019

I am curious about Id: 23815 # Magma_Essence, it says NeedOptionNumMin 2 but when I use Magma_Essence, the Lapine UI show all TargetItem with no option and you can put them into square frame and press create button but nothing happens.
Is it a offical condition?

@attackjom

This comment has been minimized.

Copy link
Contributor

attackjom commented Oct 15, 2019

Purified Knight Shield

Enchant Row3:
Should be Ignore DEF/MDEF against Boss monster instead of increase damage.
with arg (30,60) not (3,60)

@Dekukun

This comment has been minimized.

Copy link

Dekukun commented Oct 25, 2019

image
does anyone have this script? with these enchants?

* Thanks to @attackjom
@cahya1992

This comment has been minimized.

Copy link

cahya1992 commented Nov 3, 2019

i try to use this item Lava essence[23815] when click make doesn't do anything

on LUA

["Magma_Essence"] = {
ItemID = 23815,
NeedRefineMin = 0,
NeedOptionNumMin = 2,
NotSocketEnchantItem = true,
TargetItems = {
{ "Lava_Leather_Armor", 15378 },
{ "Lava_Leather_Suits", 15379 },
{ "Lava_Leather_Robe", 15380 }
},
NeedSource_String = "Lava Leather Armor Equipment"
},

and

  • Id: 23815 # Magma_Essence, 라바 레더 갑옷 장비
    NeedRefineMin: 0
    NeedOptionNumMin: 2
    NotSocketEnchantItem: true
    TargetItem:
  • Item: 15378 #Lava_Leather_Armor
  • Item: 15379 #Lava_Leather_Suits
  • Item: 15380 #Lava_Leather_Robe
    Result: |
    callfunc("F_Lapine_Magma_Essence", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2], .@opts[3]);
    .@params[0] = 0;
    getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);

See this video
https://gyazo.com/14bdc5da6be59803187e973c39d40543

@Dekukun

This comment has been minimized.

Copy link

Dekukun commented Nov 3, 2019

you must leave the NeedOptionNumMin = 2, at 0, and it will take you

If you need help, talk to me in discord

Deku#9820

@cydh

This comment has been minimized.

Copy link
Contributor Author

cydh commented Nov 4, 2019

* Updated atcommand doc
* Prevernt to use (at)refresh when Lapine UI is opened
@cahya1992

This comment has been minimized.

Copy link

cahya1992 commented Nov 4, 2019

you must leave the NeedOptionNumMin = 2, at 0, and it will take you

If you need help, talk to me in discord

Deku#9820

but its default setting already see on server side and client side its right
so do you mean NeedOptionNumMin = 2 < not working?
that setting is mean we must at least have 2 option before you can reroll again with this item 23815 right?
coz if we doesnt have at least 2 option will not show in UI

http://prntscr.com/ps1rer

@cahya1992

This comment has been minimized.

Copy link

cahya1992 commented Nov 4, 2019

@cydh

This comment has been minimized.

Copy link
Contributor Author

cydh commented Nov 4, 2019

@cahya1992

This comment has been minimized.

Copy link

cahya1992 commented Nov 4, 2019

#4348 (comment)

http://prntscr.com/ps26vy < my item with 2 RO
see this video
https://gyazo.com/9d1d72786b409bb74cae986669fdf271

when click the button make stuck and didn't do anything cydh?

please correct me with worng with my produce. thanks

23860,Bs_Sha_M_S_15,Physical Shadow SynthesisBox,11,,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ synthesisui 23860; },{},{}
23861,Bs_Sha_M_S_16,Magical Shadow SynthesisBox,11,,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ synthesisui 23861; },{},{}
23862,Bs_Sha_M_S_23,EXP Shadow SynthesisBox,11,,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ synthesisui 23862; },{},{}
23863,Bs_Item_M_S_5,Mad Bunny SynthesisBox,11,,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ synthesisui 23863; },{},{}

This comment has been minimized.

Copy link
@Questune09

Questune09 Nov 6, 2019

After using this item with correct requirements you can't get any items unless the scroll goes back on your pocket.

This comment has been minimized.

Copy link
@Dekukun

Dekukun Nov 6, 2019

Maybe you don't have the items in your itemdb or it's not in the emulator and grf lapineddukddakbox

}

if (this->nodeExists(node, "NeedOptionNumMin")) {
this->asUInt16(node, "NeedOptionNumMin", entry->source_refine_min);

This comment has been minimized.

Copy link
@xEasycore

xEasycore Nov 7, 2019

This should be need_option_num instead source_refine_min.

@xEasycore

This comment has been minimized.

Copy link

xEasycore commented Nov 8, 2019

upgradeui atcommand will always disconnect the player, even if you have the specified item in your inventory.

cydh added 2 commits Nov 12, 2019
* Udpated item upgrade, added `NeedRefineMax`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.