TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Help with message boxes Wed Apr 30, 2014 4:34 am | |
| So as the title suggests, I need help with message boxes. (For example, the message that pops up up every standby phase to ask you to pay life points for messenger of peace). I'll post the card for the effect info, the script and the problem - Princess Cadance:
- Code:
-
function c60000023.initial_effect(c) --cost local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SUMMON_COST) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) e1:SetTarget(c60000023.sumtg) e1:SetCost(c60000023.ccost) e1:SetOperation(c60000023.acop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SPSUMMON_COST) c:RegisterEffect(e2) --maintain local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetOperation(c60000023.mtop) c:RegisterEffect(e3) end function c60000023.sumtg(e,c) return not c:IsRace(RACE_BEAST) and not c:IsRace(RACE_WINDBEAST) and not c:IsRace(RACE_SPELLCASTER) end function c60000023.ccost(e,c,tp) return Duel.CheckLPCost(tp,1000) end function c60000023.acop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,1000) end function c60000023.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetTurnPlayer()~=tp then return end if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(60000023,0)) then Duel.PayLPCost(tp,500) else Duel.Destroy(e:GetHandler(),REASON_RULE) end end That code is 99% done. I just want a message to pop up during my end phase, asking if I want to pay 500 life points. Right now it just shows up blank, but at least the option to choose yes or no is there. |
|
outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: Help with message boxes Wed Apr 30, 2014 3:12 pm | |
| thats easy all you have to do is edit the strings in the cdb if your using the card editor use the effect strings box in the corner to add them if your editing manually then enter the strings you want under str1,str2 etc. also 1st in the list in the card manager is 0 then second is 1 so on and manually str1 is 0 str 2 is 1 so on hope this helps |
|
TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: Help with message boxes Wed Apr 30, 2014 10:36 pm | |
| I had a feeling it had to do with the cdb, thanks so much . And if the card editor you're talking about is the outlaw card manager, I haven't tried it yet. From what I've read it's a little buggy atm, so I'll wait until it's updated. Hopefully that makes stuff go a lot faster. |
|
Sponsored content
| Subject: Re: Help with message boxes | |
| |
|