Ir para conteúdo
  • 0

Quando Vip Muda A Promotion


greXDXD

Pergunta

Ola :XTibia_smile: eu to querendo um systema que quando o player vire vip a promotion ex: viro vip ele vira epic master sorcerer e quando a vip do player acaba a promotion volte para master sorcerer

 

 

 

Flws espero respostas ;D :thumbsupsmiley2:

Link para o comentário
Compartilhar em outros sites

Posts Recomendados

  • 0

Porque no site ainda continua como "elite knight" ??

 

Script do vodkard é foda

só não sei qual é o problema de não estar aparecendo Epic na vocation do char

 

e eu ja adicionei as Epic vocation no arquivo config/config.php do htdocs

 

e agora? help =|

Link para o comentário
Compartilhar em outros sites

  • 0

Porque no site ainda continua como "elite knight" ??

 

Script do vodkard é foda

só não sei qual é o problema de não estar aparecendo Epic na vocation do char

 

e eu ja adicionei as Epic vocation no arquivo config/config.php do htdocs

 

e agora? help =|

 

quando da isso ou nohavevocation é porque o erro é em vocations.xml

Link para o comentário
Compartilhar em outros sites

  • 0

Porque no site ainda continua como "elite knight" ??

 

Script do vodkard é foda

só não sei qual é o problema de não estar aparecendo Epic na vocation do char

 

e eu ja adicionei as Epic vocation no arquivo config/config.php do htdocs

 

e agora? help =|

 

quando da isso ou nohavevocation é porque o erro é em vocations.xml

 

Acho que não me expressei direito vodkart

No client, dando look no char, o Epic aparece lindo

+ não aparece no SITE!

 

Quando eu disse que não aparecia Epic na vocation, me referia ao site, no perfil do char

a vocation ainda continua como simples promotion "Master" ou "Elite"

 

No banco de dados, acessado a tabela do player, a linha de vocation ainda ta com id de simples promotion

+ o script funciona, aparece no char, "you see yourself. you are epic elite knight"

 

Porque isso? =|

Pq aparece no client, + nao aparece no site?

Editado por BoneFox
Link para o comentário
Compartilhar em outros sites

  • 0

veja o id da epic e veja se no config.php esta batendo o id da vocaçao!

 

No config.php

 

// list of vocations on ots (world 0)
$vocation_name[0][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); // id => 'name' , $vocation_name[0] - promotion level 0, $vocation_name[0] - for world ID 0
$vocation_name[0][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); // id => 'name' , $vocation_name[1] - promotion level 1, $vocation_name[0] - for world ID 0
$vocation_name[0][2] = array(9 => 'Epic Master Sorcerer', 10 => 'Epic Elder Druid', 11 => 'Epic Royal Paladin', 12 => 'Epic Elite Knight'); // id => 'name' , $vocation_name[2] - promotion level 2, $vocation_name[0] - for world ID 0

 

Vocations.xml

 

 

<?xml version="1.0" encoding="UTF-8"?>
<vocations>
    <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="2">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="5" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="3">
		    <formula meleeDamage="1.3" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="60" manamultiplier="3.0" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="4">
		    <formula meleeDamage="1.4" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="60" manamultiplier="1.1" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="60" manamultiplier="1.1" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.4" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
		    <formula meleeDamage="1.3" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="80" manamultiplier="3.0" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
		    <formula meleeDamage="1.4" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="10" name="Epic Elder Druid" description="an epic elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="11" name="Epic Royal Paladin" description="an epic royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">
		    <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		    <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
</vocations>

 

 

Tudo ok, ta vendo?

O que pode ser?

já to começando a imaginar q é problema nas source do distro...

Link para o comentário
Compartilhar em outros sites

  • 0

vc errou no seguinte, veja abaixo:

 

 

Seu script

$vocation_name[0][2] = array(9 => 'Epic Master Sorcerer', 10 => 'Epic Elder Druid', 11 => 'Epic Royal Paladin', 12 => 'Epic Elite Knight'); // id => 'name' , $vocation_name[2] - promotion level 2, $vocation_name[0] - for world ID 0

 

o script correto!

$vocation_name[0][2] = array(1 => 'Epic Master Sorcerer', 2 => 'Epic Elder Druid', 3 => 'Epic Royal Paladin', 4 => 'Epic Elite Knight'); // id => 'name' , $vocation_name[2] - promotion level 2, $vocation_name[0] - for world ID 0

 

 

explicando, o segior indentifica as ids e as promotions, mais o script de second promotion, nao muda o id do persongem, apenas add a promotion 2, entao as vocaçoes mantem o msmo id da anterior!

Editado por PiabetaMan01
Link para o comentário
Compartilhar em outros sites

  • 0

Deus do céu!!!!

 

uma coisa tão simples, tão insignificante que no olhar dos mais leigos, parece a morte!

AUHhuahuahuahuhauhau

vlw mesmo Piabeta ^^

 

só por isso vou te dar rep+ até o fim da semana

uhahuauhahu ;D

Link para o comentário
Compartilhar em outros sites

  • 0

PF me ajuda com uma bagaça la no começo o cara uma promotion quando vip mudaçe de vocaçao promotion vip mais o meu sitema vip e outro keria saber como add isso no seguinte sistema vip.

 

 

VIP obs: meu sistema vip e dakeles ke vc da use no item e vira vip data/actions/scripts/addvip.lua

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

 

local config={

removeOnUse = "yes" -- remover quando usar ("yes" or "no")

}

 

local days = 30 -- dias que serão adicionados

local daysvalue = days * 30 * 60 * 60

local storageplayer = getPlayerStorageValue(cid, 13540)

local timenow = os.time()

 

if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then

time = timenow + daysvalue

else

time = storageplayer + daysvalue

end

 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")

setPlayerStorageValue(cid, 13540, time)

local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(30 * 60 * 60))

doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")

if (config.removeOnUse == "yes") then

doRemoveItem(item.uid, 1)

end

 

return TRUE

end

 

 

PLIS VALENDO REP ++

Link para o comentário
Compartilhar em outros sites

  • 0

PF me ajuda com uma bagaça la no começo o cara uma promotion quando vip mudaçe de vocaçao promotion vip mais o meu sitema vip e outro keria saber como add isso no seguinte sistema vip.

 

 

VIP obs: meu sistema vip e dakeles ke vc da use no item e vira vip data/actions/scripts/addvip.lua

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

 

local config={

removeOnUse = "yes" -- remover quando usar ("yes" or "no")

}

 

local days = 30 -- dias que serão adicionados

local daysvalue = days * 30 * 60 * 60

local storageplayer = getPlayerStorageValue(cid, 13540)

local timenow = os.time()

 

if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then

time = timenow + daysvalue

else

time = storageplayer + daysvalue

end

 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")

setPlayerStorageValue(cid, 13540, time)

local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(30 * 60 * 60))

doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")

if (config.removeOnUse == "yes") then

doRemoveItem(item.uid, 1)

end

 

return TRUE

end

 

 

PLIS VALENDO REP ++

 

vai em creaturescript/script/login.lua e antes do ultimo return true adc:

 


if getPlayerStorageValue(cid, 13540) - os.time() >= 1 and (isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
elseif getPlayerStorageValue(cid, 13540) - os.time() <= 0 and (isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid)-4)
end

Link para o comentário
Compartilhar em outros sites

  • 0

ae vlw muito o brigado

 

 

se der amanhã eu do outro rep +

 

ei cara so kero mais uma ajudinha vai nesse topico ve se consegue resolver

 

 

http://www.xtibia.com/forum/topic/183023-kero-ke-coloquem-no-client-uma-imagen-ke-eu-nao-consigo-colocar/page__fromsearch__1

Editado por joderson
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...