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

revscript outfit spell #3884

Closed
ghost opened this issue Jan 5, 2022 · 3 comments · Fixed by #4014
Closed

revscript outfit spell #3884

ghost opened this issue Jan 5, 2022 · 3 comments · Fixed by #4014
Labels
enhancement Increase or improvement in quality, value, or extent

Comments

@ghost
Copy link

ghost commented Jan 5, 2022

Explanation of what you want to do that is currently impossible

be able to read "monster" and "item", currently target is set to "invisible" instead

https://github.com/otland/forgottenserver/blob/master/data/scripts/lib/register_monster_type.lua#L280-L335
https://github.com/otland/forgottenserver/blob/master/src/monsters.cpp#L707-L717
https://github.com/otland/forgottenserver/blob/master/src/monsters.cpp#L390-L413 - xml reference

{name = "outfit", interval = 2000, chance = 17, monster = "rabbit", duration = 20000, range = 7, target = true, effect = CONST_ME_MAGIC_BLUE}

{name = "outfit", interval = 2000, chance = 1, item = 3976, duration = 4000, range = 7, target = true, effect = CONST_ME_MAGIC_BLUE},

@EPuncker EPuncker added the enhancement Increase or improvement in quality, value, or extent label Jan 5, 2022
@theshibbies
Copy link
Contributor

theshibbies commented Jan 24, 2022

We can add a luaMonsterSpellSetConditionOutfit function and add it into register_monster_type.lua.

However, an issue lies with trying to get a monster types outfit when the file hasn't been loaded yet. For instance, blue djinn has trouble loading rabbit looktypes because the blue djinn file is loaded far before the rabbit.

edit: I have managed to get it to work just fine with addEvent but im curious to hear of what others think of this.

image

@ghost
Copy link
Author

ghost commented Apr 2, 2022

@theshibbies thanks, that worked for me! you should do a PR mby?

@Zbizu
Copy link
Contributor

Zbizu commented Apr 2, 2022

why don't you just use looktypes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Increase or improvement in quality, value, or extent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants