Quote:
Originally Posted by tokesbowls
Hello,
So im trying to make a exchanger for my server, Seem i cant get the values right
Was wondering if anyone could and would help me correct my errors
function ruppee_exchange()
dlg_title( "Ruppee > Arena Points" )
dlg_text( "Hi there, would you like to exchange your ruppees to arena points?" )
dlg_menu( "250,000,000 Ruppees = 10,000 AP", "gold2ap(10,1)" )
dlg_menu( "750,000,000 Ruppees = 25,000 AP", "gold2ap(25,3)" )
dlg_menu( "1,500,000,000 Ruppees = 50,000 AP", "gold2ap(50,6)" )
dlg_menu( "3,000,000,000 Ruppees = 100,000 AP", "gold2ap(100,12)" )
dlg_menu( "Back", "exchange_arenapoints()" )
dlg_menu("@90010002", "")
dlg_show()
end
function gold2ap(count,lng)
local ap = get_value("ap")
local gold = get_value("gold")
local cost = 250000 * count
local applus =count * 1000
if gold >= ap then
set_value("ap",ap + applus)
set_value("gold", gold - cost)
message("<#FFFFFF><B>Success! you've paid: "..cost.." for "..applus.."Arena Points.")
--update_gold_chaos()
elseif ap < cost then --determination: if ap is less then the costs
if lng == 0 then
-- no_ap() some arabic shit
elseif lng == 1 then
message("<#CDRFDF><B>Sorry! not anough gold.")
end
end
end
-----------------------------------------------------------------------------------------------
function jp_exchange()
dlg_title( "Job Points > Ruppee" )
dlg_text( "Hi there, would you like to exchange your Job Points to Ruppee?" )
dlg_menu( "50,000,000 Ruppees = 10,000 AP", "jp2gold(10,1)" )
dlg_menu( "75,000,000 Ruppees = 25,000 AP", "jp2gold(25,1)" )
dlg_menu( "150,000,000 Ruppees = 50,000 AP", "jp2gold(50,1)" )
dlg_menu( "500,000,000 Ruppees = 100,000 AP", "jp2gold(100,1)" )
dlg_menu( "Back", "exchange_arenapoints()" )
dlg_menu("@90010002", "")
dlg_show()
end
function jp2gold(count,lng)
local jp = get_value("jp")
local gold = get_value("gold")
local cost = 5000000 * count
local applus =count * 1000
if jp >= gpld then
set_value("gold",gold + applus)
set_value("jp", jp - cost)
message("<#FFFFFF><B>Success! you've paid: "..cost.."JP for "..applus.."ruppees.")
--update_gold_chaos()
elseif ap < cost then --determination: if ap is less then the costs
if lng == 0 then
-- no_ap() some arabic shit
elseif lng == 1 then
message("<#CDRFDF><B>Sorry! not anough jp.")
end
end
end
------------------------------------------------------------------------------------------------
function jp_exchanger()
dlg_title( "Job Point > Arena Points" )
dlg_text( "Hi there, would you like to exchange your job points to arena points?" )
dlg_menu( "300,000,000 JP = 100,000 AP", "ap_ex(100,1000000)" )
dlg_menu( "Back", "exchange_arenapoints()" )
dlg_menu("@90010002", "")
dlg_show()
end
function ap_ex(count,lng)
local jp = get_value("jp")
local ap = get_value("ap")
local cost = 3000000 * count
local applus =count * 1000
if jp >= cost then
set_value("ap",ap + applus)
set_value("jp", jp - cost)
update_gold_chaos()
elseif jp < cost then
if lng == 0
then no_ap()
elseif lng == 1
then no_ape()
end
end
end
Also id like to say, anyone who doesn't have this in there server and would like to use this, Please feel free to. Hopefully we can get the values correct.
Thank you again for all you help here
|
Hi, here's one of my old script .. [FRENCH/US]
function NPC_Cps()
-- NPC_Trader 20143010
dlg_title( " Échangeur " )
dlg_text( "Salut / Hi : Veuillez choisir votre langue. / Please select your language. ")
dlg_menu( "Français", "NPC_CpsFR()" )
dlg_menu( "English", "NPC_CpsEN()" )
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsFR()
-- Version français
dlg_title( "Échangeur" )
dlg_text("Salut ! Ici tu pourras échanger tes Cps, ton argent ou des items contre de nouveaux trucs ! Passes un agréable moment avec nous sur Rappelz Paradise !")
dlg_menu( "Échanger mes CPs", "NPC_CpsFRCP()" )
dlg_menu( "Échanger un item boutique", "NPC_CpsFRboutique()" )
dlg_menu("Retour", "NPC_Cps()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsEN()
-- Version anglaise
dlg_title( "Trader" )
dlg_text("Hi ! You can trade me your JPs, your ruppys or some items to have new and exclusive things ! Have fun with us on Rappelz Paradise !")
dlg_menu( "Trade my JPs", "NPC_CpsENCP()" )
dlg_menu( "Trade an item from ParadiseShop", "NPC_CpsENboutique()" )
dlg_menu("Back", "NPC_Cps()")
dlg_menu("@90010002", "")
dlg_show()
end
-- ECHANGE VS CP
function NPC_CpsFRCP()
dlg_title( "Échangeur" )
dlg_text("Tu veux échanger tes CP. Mais contre quoi ?")
dlg_menu( "Argent", "NPC_CpsFRCP_money()" )
dlg_menu( "Points ours", "NPC_CpsFRCP_ours()" )
dlg_menu( "Points arène", "NPC_CpsFRCP_arena()" )
dlg_menu( "Points talent", "NPC_CpsFRCP_talent()" )
dlg_menu( "CP créature", "NPC_CpsFRCP_pets()" )
dlg_menu("Retour", "NPC_CpsFR()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsENCP()
dlg_title( "Trader" )
dlg_text("You want to trade your JP. But against what ?")
dlg_menu( "Ruppies", "NPC_CpsENCP_money()" )
dlg_menu( "Holic points", "NPC_CpsENCP_ours()" )
dlg_menu( "Arena points", "NPC_CpsENCP_arena()" )
dlg_menu( "Talent points", "NPC_CpsENCP_talent()" )
dlg_menu( "Pet JPs", "NPC_CpsENCP_pets()" )
dlg_menu("Back", "NPC_CpsEN()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsFRCP_money()
dlg_title( "Échangeur" )
dlg_text("Tu veux échanger tes CP contre de l'argent. 1CP correspond à 1RP.")
dlg_menu( "1M CP", "echangetorp(1)" )
dlg_menu( "5M CP", "echangetorp(2)" )
dlg_menu( "10M CP", "echangetorp(3)" )
dlg_menu( "50M CP", "echangetorp(4)" )
dlg_menu( "100M CP", "echangetorp(5)" )
dlg_menu( "500M CP", "echangetorp(6)" )
dlg_menu( "1000M CP", "echangetorp(7)" )
dlg_menu( "5000M CP", "echangetorp(8)" )
dlg_menu("Retour", "NPC_CpsFRCP()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsENCP_money()
dlg_title( "Trader" )
dlg_text("You want to trade your JPs vs gold. 1JP equals to 1RP.")
dlg_menu( "1M JP", "echangetorp(1)" )
dlg_menu( "5M JP", "echangetorp(2)" )
dlg_menu( "10M JP", "echangetorp(3)" )
dlg_menu( "50M JP", "echangetorp(4)" )
dlg_menu( "100M JP", "echangetorp(5)" )
dlg_menu( "500M JP", "echangetorp(6)" )
dlg_menu( "1000M JP", "echangetorp(7)" )
dlg_menu( "5000M JP", "echangetorp(8)" )
dlg_menu("Back", "NPC_CpsEN()")
dlg_menu("@90010002", "")
dlg_show()
end
function echangetorp(id)
local jp = get_value( "jp" )
local gold = get_value( "gold" )
text_confirmation_rp = "Vos points de compétences ont été convertis en RP !"
if id == 1 then
if jp >= 1000000 then
set_value( "jp", jp - 1000000 )
set_value( "gold", gold + 1000000 )
cprint(text_confirmation_rp)
NPC_CpsFRCP_money()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_money()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 2 then
if jp >= 5000000 then
set_value( "jp", jp - 5000000 )
set_value( "gold", gold + 5000000 )
cprint(text_confirmation_rp)
NPC_CpsFRCP_money()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_money()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 3 then
if jp >= 10000000 then
set_value( "jp", jp - 10000000 )
set_value( "gold", gold + 10000000 )
cprint(text_confirmation_rp)
NPC_CpsFRCP_money()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_money()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 4 then
if jp >= 50000000 then
set_value( "jp", jp - 50000000 )
set_value( "gold", gold + 50000000 )
cprint(text_confirmation_rp)
NPC_CpsFRCP_money()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_money()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 5 then
if jp >= 100000000 then
set_value( "jp", jp - 100000000 )
set_value( "gold", gold + 100000000 )
cprint(text_confirmation_rp)
NPC_CpsFRCP_money()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_money()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 6 then
if jp >= 500000000 then
set_value( "jp", jp - 500000000 )
set_value( "gold", gold + 500000000 )
cprint(text_confirmation_rp)
NPC_CpsFRCP_money()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_money()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 7 then
if jp >= 1000000000 then
set_value( "jp", jp - 1000000000 )
set_value( "gold", gold + 1000000000 )
cprint(text_confirmation_rp)
NPC_CpsFRCP_money()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_money()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 8 then
if jp >= 5000000000 then
set_value( "jp", jp - 5000000000 )
set_value( "gold", gold + 5000000000 )
cprint(text_confirmation_rp)
NPC_CpsFRCP_money()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_money()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
end
function NPC_CpsFRCP_ours()
dlg_title( "Échangeur" )
dlg_text("Tu veux échanger tes CP contre de l'argent. 1000CP correspond à 1 points ours.")
dlg_menu( "1M CP", "echangetoours(1)" )
dlg_menu( "5M CP", "echangetoours(2)" )
dlg_menu( "10M CP", "echangetoours(3)" )
dlg_menu( "50M CP", "echangetoours(4)" )
dlg_menu( "100M CP", "echangetoours(5)" )
dlg_menu( "500M CP", "echangetoours(6)" )
dlg_menu( "1000M CP", "echangetoours(7)" )
dlg_menu( "5000M CP", "echangetoours(8)" )
dlg_menu("Retour", "NPC_CpsFRCP()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsENCP_ours()
dlg_title( "Trader" )
dlg_text("You want to trade your JPs vs gold. 1000JP equals to 1 point ours.")
dlg_menu( "1M JP", "echangetoours(1)" )
dlg_menu( "5M JP", "echangetoours(2)" )
dlg_menu( "10M JP", "echangetoours(3)" )
dlg_menu( "50M JP", "echangetoours(4)" )
dlg_menu( "100M JP", "echangetoours(5)" )
dlg_menu( "500M JP", "echangetoours(6)" )
dlg_menu( "1000M JP", "echangetoours(7)" )
dlg_menu( "5000M JP", "echangetoours(8)" )
dlg_menu("Back", "NPC_CpsEN()")
dlg_menu("@90010002", "")
dlg_show()
end
function echangetoours(id)
local jp = get_value( "jp" )
local holic = get_value( "huntaholic_point" )
text_confirmation_ours = "Vos points de compétences ont été convertis en points ours !"
if id == 1 then
if jp >= 1000000 then
set_value( "jp", jp - 1000000 )
set_value( "huntaholic_point", holic + 1000)
cprint( "1.000 Points d'ours reçu" )
cprint(text_confirmation_ours)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_ours()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 2 then
if jp >= 5000000 then
set_value( "jp", jp - 5000000 )
set_value( "huntaholic_point", holic + 5000)
cprint( "5.000 Points d'ours reçu" )
cprint(text_confirmation_ours)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_ours()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 3 then
if jp >= 10000000 then
set_value( "jp", jp - 10000000 )
set_value( "huntaholic_point", holic + 10000)
cprint( "10.000 Points d'ours reçu" )
cprint(text_confirmation_ours)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_ours()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 4 then
if jp >= 50000000 then
set_value( "jp", jp - 50000000 )
set_value( "huntaholic_point", holic + 50000)
cprint( "50.000 Points d'ours reçu" )
cprint(text_confirmation_ours)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_ours()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 5 then
if jp >= 100000000 then
set_value( "jp", jp - 100000000 )
set_value( "huntaholic_point", holic + 100000)
cprint( "100.000 Points d'ours reçu" )
cprint(text_confirmation_ours)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_ours()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 6 then
if jp >= 500000000 then
set_value( "jp", jp - 500000000 )
set_value( "huntaholic_point", holic + 500000)
cprint( "500.000 Points d'ours reçu" )
cprint(text_confirmation_ours)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_ours()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 7 then
if jp >= 1000000000 then
set_value( "jp", jp - 1000000000 )
set_value( "huntaholic_point", holic + 1000000)
cprint( "1.000.000 Points d'ours reçu" )
cprint(text_confirmation_ours)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_ours()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 8 then
if jp >= 5000000000 then
set_value( "jp", jp - 5000000000 )
set_value( "huntaholic_point", holic + 5000000)
cprint( "5.000.000 Points d'ours reçu" )
cprint(text_confirmation_ours)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_ours()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
end
function NPC_CpsFRCP_arena()
dlg_title( "Échangeur" )
dlg_text("Tu veux échanger tes CP contre de l'argent. 3000CP correspond à 1 points arène.")
dlg_menu( "1M CP", "echangetoarena(1)" )
dlg_menu( "5M CP", "echangetoarena(2)" )
dlg_menu( "10M CP", "echangetoarena(3)" )
dlg_menu( "50M CP", "echangetoarena(4)" )
dlg_menu( "100M CP", "echangetoarena(5)" )
dlg_menu( "500M CP", "echangetoarena(6)" )
dlg_menu( "1000M CP", "echangetoarena(7)" )
dlg_menu( "5000M CP", "echangetoarena(8)" )
dlg_menu("Retour", "NPC_CpsFRCP()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsENCP_arena()
dlg_title( "Trader" )
dlg_text("You want to trade your JPs vs gold. 5000JP equals to 1 point ours.")
dlg_menu( "1M JP", "echangetoarena(1)" )
dlg_menu( "5M JP", "echangetoarena(2)" )
dlg_menu( "10M JP", "echangetoarena(3)" )
dlg_menu( "50M JP", "echangetoarena(4)" )
dlg_menu( "100M JP", "echangetoarena(5)" )
dlg_menu( "500M JP", "echangetoarena(6)" )
dlg_menu( "1000M JP", "echangetoarena(7)" )
dlg_menu( "5000M JP", "echangetoarena(8)" )
dlg_menu("Back", "NPC_CpsEN()")
dlg_menu("@90010002", "")
dlg_show()
end
function echangetoarena(id)
local jp = get_value( "jp" )
local arena = get_value( "arena_point" )
text_confirmation_arena = "Vos points de compétences ont été convertis en points arène !"
if id == 1 then
if jp >= 1000000 then
set_value( "jp", jp - 1000000 )
set_value( "arena_point", arena + 200)
cprint( "200 Points arène reçu" )
cprint(text_confirmation_arena)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 2 then
if jp >= 5000000 then
set_value( "jp", jp - 5000000 )
set_value( "arena_point", arena + 1000)
cprint( "1.000 Points arène reçu" )
cprint(text_confirmation_arena)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 3 then
if jp >= 10000000 then
set_value( "jp", jp - 10000000 )
set_value( "arena_point", arena + 2000)
cprint( "2.000 Points arène reçu" )
cprint(text_confirmation_arena)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 4 then
if jp >= 50000000 then
set_value( "jp", jp - 50000000 )
set_value( "arena_point", arena + 10000)
cprint( "10.000 Points arène reçu" )
cprint(text_confirmation_arena)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 5 then
if jp >= 100000000 then
set_value( "jp", jp - 100000000 )
set_value( "arena_point", arena + 20000)
cprint( "20.000 Points arène reçu" )
cprint(text_confirmation_arena)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 6 then
if jp >= 500000000 then
set_value( "jp", jp - 500000000 )
set_value( "arena_point", arena + 100000)
cprint( "100.000 Points arène reçu" )
cprint(text_confirmation_arena)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 7 then
if jp >= 1000000000 then
set_value( "jp", jp - 1000000000 )
set_value( "arena_point", arena + 200000)
cprint( "200.000 Points arène reçu" )
cprint(text_confirmation_arena)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 8 then
if jp >= 5000000000 then
set_value( "jp", jp - 5000000000 )
set_value( "arena_point", arena + 1000000)
cprint( "1.000.000 Points arène reçu" )
cprint(text_confirmation_arena)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
end
function NPC_CpsFRCP_talent()
dlg_title( "Échangeur" )
dlg_text("Tu veux échanger tes CP contre un points de talent. 5000MCP correspond à 1 point de talent.")
dlg_menu( "Je veux mon points de talent !", "echangetotalent()" )
dlg_menu("Retour", "NPC_CpsFRCP()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsENCP_talent()
dlg_title( "Trader" )
dlg_text("You can trade all of your JP vs one talent's point. 5000MCP equals to 1 point of talent.")
dlg_menu( "I want my point !", "echangetotalent()" )
dlg_menu("Back", "NPC_CpsENCP()")
dlg_menu("@90010002", "")
dlg_show()
end
function echangetotalent()
local jp = get_value( "jp" )
local job = get_value( "job_2" )
text_confirmation_tp = "Vos points de compétences ont été convertis en points de talent !"
if jp == 5000000000 then
if job > 0 then
set_value( "jp", jp - 5000000000 )
set_value( "tp", tp + 1)
cprint( "1 Point de talent reçu" )
cprint(text_confirmation_tp)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
end
function NPC_CpsFRCP_pets()
dlg_title( "Échangeur" )
dlg_text("Tu veux échanger tes CP contre des CP pour ta créature. 1000MCP correspond à 1 CP pour ta créature.")
dlg_menu( "1000M CP", "echangetopet(1)" )
dlg_menu( "2000M CP", "echangetopet(2)" )
dlg_menu( "3000M CP", "echangetopet(3)" )
dlg_menu( "4000M CP", "echangetopet(4)" )
dlg_menu( "5000M CP", "echangetopet(5)" )
dlg_menu("Retour", "NPC_CpsFRCP()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsENCP_pets()
dlg_title( "Trader" )
dlg_text("You want to change your JP for JP to your pet. 1000MJP equals to 1 JP for your pet.")
dlg_menu( "1000M JP", "echangetopet(1)" )
dlg_menu( "2000M JP", "echangetopet(2)" )
dlg_menu( "3000M JP", "echangetopet(3)" )
dlg_menu( "4000M JP", "echangetopet(4)" )
dlg_menu( "5000M JP", "echangetopet(5)" )
dlg_menu("Back", "NPC_CpsENCP()")
dlg_menu("@90010002", "")
dlg_show()
end
function echangetopet(id)
local jp = get_value( "jp" )
local petjp = get_creature_value( handle, "jp" )
text_confirmation_tp = "Vos points de compétences ont été convertis en points de compétences pour votre créature !"
if id == 1 then
if jp == 1000000000 then
set_value( "jp", jp - 1000000000 )
set_creature_value( handle, "jp", petjp + 1 )
cprint( "1 Point de compétences reçu" )
cprint(text_confirmation_tp)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 2 then
if jp == 2000000000 then
set_value( "jp", jp - 2000000000 )
set_creature_value( handle, "jp", petjp + 2 )
cprint( "2 Points de compétences reçu" )
cprint(text_confirmation_tp)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 3 then
if jp == 3000000000 then
set_value( "jp", jp - 3000000000 )
set_creature_value( handle, "jp", petjp + 3 )
cprint( "3 Points de compétences reçu" )
cprint(text_confirmation_tp)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 4 then
if jp == 4000000000 then
set_value( "jp", jp - 4000000000 )
set_creature_value( handle, "jp", petjp + 4 )
cprint( "4 Points de compétences reçu" )
cprint(text_confirmation_tp)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
if id == 5 then
if jp == 5000000000 then
set_value( "jp", jp - 5000000000 )
set_creature_value( handle, "jp", petjp + 5 )
cprint( "5 Points de compétences reçu" )
cprint(text_confirmation_tp)
NPC_CpsFRCP_ours()
else
dlg_title( "Paradise Manager" )
dlg_text( "Hey, la maison ne fait pas crédit ! Vous n'avez pas assez de points de compétences !" )
dlg_menu( "@90010003", "NPC_CpsFRCP_arena()" )
dlg_menu( "Je reviendrai.", " " )
dlg_show()
end
return
end
end
-- ECHANGE VS item boutique
function NPC_CpsFRRP()
dlg_title( "Échangeur" )
dlg_text("Tu veux échanger tes items boutique. Mais contre quoi ?")
dlg_menu( "A venir", "NPC_CpsFR" )
dlg_menu("Retour", "NPC_CpsFR()")
dlg_menu("@90010002", "")
dlg_show()
end
function NPC_CpsENRP()
dlg_title( "Trader" )
dlg_text("You want to trade your ParadiseShop items. But against what ?")
dlg_menu( "Available soon", "NPC_CpsEN" )
dlg_menu("Back", "NPC_CpsEN()")
dlg_menu("@90010002", "")
dlg_show()
end