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

poison gas #6

Open
emil92b opened this issue Jan 25, 2019 · 2 comments

Comments

@emil92b
Copy link

commented Jan 25, 2019

missing poison effect when step into the field

also for wall, bomb runes, there should only be a hit effect on the targets, not around
https://i.imgur.com/cb0qQC3.png

@53701337

This comment has been minimized.

Copy link

commented Apr 15, 2019

I fixed it.

In movements.xml change this line:

<movevent event="StepIn" itemid="2121" function="onStepInField" />
to
<movevent event="StepIn" itemid="2121" script="misc/poison_effect.lua" />

<movevent event="StepIn" itemid="2127" function="onStepInField" />
to
<movevent event="StepIn" itemid="2127" script="misc/poison_effect.lua" />

<movevent event="StepIn" itemid="2134" function="onStepInField" />
to
<movevent event="StepIn" itemid="2134" script="misc/poison_effect.lua" />

and add in misc "poison_effect.lua"

local poison = Condition(CONDITION_POISON)
poison:setTiming(100)

function onStepIn(creature, item, position)
	if item:getId() == 2134 then
		creature:addCondition(poison)
		position:sendMagicEffect(8)
	elseif item:getId() == 2121 or item:getId() == 2127 then
		creature:addCondition(poison)
		position:sendMagicEffect(9)
	end
end

it's simple, but works :P

@peonso peonso referenced this issue Apr 15, 2019
0 of 11 tasks complete
@emil92b

This comment has been minimized.

Copy link
Author

commented Apr 16, 2019

FIX FOR THIS ISSUE

thanks to @renanluis90

combat.cpp

void MagicField::onStepInField(Creature* creature)

if (id == ITEM_POISONFIELD_PVP || id == ITEM_POISONFIELD_PERSISTENT || id == ITEM_POISONFIELD_NOPVP) {
		g_game.addMagicEffect(creature->getPosition(), CONST_ME_GREEN_RINGS);
	}

and remove from all poison runes

combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.