a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalLatest imagesSearchRegisterLog in

Share
 

 Help with message boxes

View previous topic View next topic Go down 
AuthorMessage
TGAP-Trixie

TGAP-Trixie


Member Title : Trixie does not even...
Posts : 273
Join date : 2014-04-17

Help with message boxes Empty
PostSubject: Help with message boxes   Help with message boxes Icon_minitimeWed 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.
Back to top Go down
outlaw1994

outlaw1994
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 30
Location : bundaberg qld australia

Help with message boxes Empty
PostSubject: Re: Help with message boxes   Help with message boxes Icon_minitimeWed 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
Back to top Go down
https://mackpro.forumotion.com
TGAP-Trixie

TGAP-Trixie


Member Title : Trixie does not even...
Posts : 273
Join date : 2014-04-17

Help with message boxes Empty
PostSubject: Re: Help with message boxes   Help with message boxes Icon_minitimeWed Apr 30, 2014 10:36 pm

I had a feeling it had to do with the cdb, thanks so much Smile.
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.
Back to top Go down
Sponsored content





Help with message boxes Empty
PostSubject: Re: Help with message boxes   Help with message boxes Icon_minitime

Back to top Go down
 

Help with message boxes

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Im back and bringing you more archetypes in the future, but now… FILL IN THE BLANK BOXES DECK

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Requests-