Ir para conteúdo

Crie Novas Vocações


buster287

Posts Recomendados

Atenção: isso é tudo q sei, ainda tem alguns bugs como vcs estão dizendo, mas não sei arruma, sorry!

Pediram e eu colokei "como colocar em seu site"

Para yurots 7.5

Vamos coloka novas classes no tibia:

primeiro abra a pasta config.lua:

---------------------------- OTServ configuration ------------------------------

-- datadir

datadir = "data/"

-- sets what map to load

mapfile = "data/world/test.otx"

-- the message the player gets when he logs in

loginmsg = "Bem Vindo ao OTserv."

-- the port otserv listens on

port = "7171"

-- name of our server

servername = "OTserv"

-- name of the owner of our server

ownername = ""

-- email of the owner of our server

owneremail = ""

-- the url for more server info

url = ""

-- the location of the server

location = "Brasil"

-- the ip the server should redirect too

ip = "127.0.0.1"

-- The messagebox you sometimes get before you choose characters

motd = ""

motdnum="1"

-- use md5 passwords for accounts, yes/no

md5passwords = "no"

-- world type. options: pvp, no-pvp, pvp-enforced

worldtype = "pvp"

-- max number of players allowed

maxplayers = "30"

-- exhausted time in ms (1000 = 1sec)

exhausted = 2000

-- exhaustion time for healing spells (1000 = 1sec)

exhaustedheal = 1000

-- how many ms to add if the player is already exhausted and tries to cast a spell (1000 = 1sec)

exhaustedadd = 300

-- how long does the player has to stay out of fight to get pz unlocked in ms (1000 = 1sec)

pzlocked = 10*1000

-- allow multiple logins of the same char

allowclones = 0

-- vocation names

vocations = {"a sorcerer", "a druid", "a paladin", "a knight", "a ninja"}----------primeiro vamos mudar aki colocando uma nova classe tipo ninja

promoted_vocations = {"a master sorcerer", "an elder druid", "a royal paladin", "an elite knight", "a master ninja"}----------aki a voc superior

--- SQL part

sql_host = "localhost"

sql_user = "root"

sql_pass = ""

sql_db = "otserv"

--- SQL MAP part

sqlmap = "test_map"

map_host = "localhost"

map_user = "root"

map_pass = ""

map_db = ""

---------------------------- Drakserv configuration ------------------------------

-- how often do server saves it's state (0 = off, 5 = 5min, 60 = hour)

autosave = 5

-- experience multiplier (how much faster you got exp from monsters)

expmul = 4

-- experience multiplier for pvp-enforced (how much faster you got exp from players)

expmulpvp = 2

-- skill multipliers: 1 - rl tibia, 10 - ten times faster etc. {no-voc, sorcerer, druid, paladin, knight, ninja}----------aki coloke o ninja também

weaponmul = {"1", "1", "1", "1", "40", "20"}----------aki é a velocidade  dos skill de weapon

distmul = {"1", "1", "1", "40", "1", "20"}----------distance

shieldmul = {"1", "1", "1", "20", "20", "10"}----------shielding

manamul = {"1", "2", "2", "2", "2", "2"}----------ML

-- how much points of life,mana,cap do you get when advancing {no-voc, sorcerer, druid, paladin, knight, ninja}----------coloke ninja

capgain = {"10", "10", "10", "20", "25", "20"}----------quanto ele vai ganhar quando passar de level capacidade

managain = {"5", "30", "30", "15", "5", "20"}---------- mana

hpgain = {"5", "5", "5", "10", "15", "10"}----------hp

-- how much faster do you recovery life,mana after eating food (1 - rl tibia)

healthtickmul =5

manatickmul = 5

-- do you want to enable cap system (yes/no)

capsystem = "yes"

-- do you want players to learn spells before they can use them (yes/no)

learnspells = "no"

-- how much % of exp/skills/stuff do you lose when dying

diepercent = 10

-- how many summons player can have

maxsummons = 2

-- do you want to give summons for all vocations (yes/no)

summonsallvoc = "no"

-- chance of losing a spear when shot (0 - none lost, 100000 - all lost)

spearlosechance = 50

-- anti-afk - maximum idle time to kick player (1 = 1min)

kicktime = 15

-- how many unjustified kills to get a red skull

redunjust = 3

-- how many unjustified kills to get banned

banunjust = 6

-- how long do you have white skull after killing player (1 = 1min)

whitetime = 15

-- how long do you have red skull (1 = 1min)

redtime = 6*60

-- how long do you have to wait to lose 1 unjustified kill (1 = 1min)

fragtime = 12*60

-- damage of burst arrows blast

-- default is from (1*lvl+5*mlvl)*0.24 to (1*lvl+5*mlvl)*0.55

burstarrowdmg = {"1.0", "5.0", "0.24", "0.55"}

Pronto colokamos a classe, mas não acabou, abra o arquivo "/data/spells/spell.xml" e edite.

Vai ta isso:

- <spell name="Light" words="utevo lux" maglv="0" mana="20" enabled="1">

  <vocation id="1" />

  <vocation id="2" />

  <vocation id="3" />

  <vocation id="4" />

  <vocation id="5" /> ----------coloke 5 nas magias que o ninja vai ter, e mude os cincos que tavam para 6

<vocation id="6" />

  </spell>

Bom agora vou ensinar a por no site de acc

Vamos usar oq vem no yurots 7.5

Abra o index.php com o bloco de notas

<html>

<body>

<form method="post" action="newacc.php">

<div style="text-align: center"><b>Tiny account maker for YurOTS</b></div>

<table cellspacing="0" width="100%">

<tr><td width="20%">Account:</td>

  <td><?

$account = rand(100000, 999999);

print '' . $account . ' <input type="hidden" name="account" value="' . $account . '">' . "\n";

  ?></td>

</tr>

<tr>

  <td width="20%">Name:</td>

  <td><input type="text" name="nick" maxlength="20" /> <span class="copy">3-20 characters</span></td>

</tr>

<tr>

  <td width="20%">Password: </td>

  <td><input type="password" name="pass" maxlength="10"> <span>3-10 characters</span></td>

<tr>

<tr>

  <td width="20%">Sex:</td>

  <td>

   <input type="radio" name="sex" value="1" checked> Male

   <input type="radio" name="sex" value="0"> Female

  </td>

</tr>

<tr>

  <td width="20%">Vocation:</td>

  <td>

   <input type="radio" name="vocation" value="1" checked> Sorcerer

   <input type="radio" name="vocation" value="2"> Druid

   <input type="radio" name="vocation" value="3"> Paladin

   <input type="radio" name="vocation" value="4"> Knight

   <input type="radio" name="vocation" value="5"> Ninja------coloque isto.

  </td>

</tr>

<tr>

  <td colspan="2">

   <input type="submit" value="Create"> 

   <input type="reset" value="Reset">

  </td>

</tr>

</table>

</form>

</div>

</body>

</html>

Agora abra o newacc.php

<center>

<?

function skills($vocation)

{

require('config.php');

$str = "";

for ($id = 0; $id <= 6; $id++)

  $str .= ('<skill skillid="' . $id . '" level="' . $skill[$vocation][$id] . '" tries="0"/>' . "\n");

return $str;

}

function equip($vocation)

{

require('config.php');

$str = "";

for ($id = 1; $id <= 10; $id++)

{

  if ($equip[$vocation][$id-1] != 0)

  {

   $str .= ('<slot slotid="' . $id . '"><item id="' . $equip[$vocation][$id-1] . '"');

   if ($id == 3) // backpack

    $str .= ('><inside>' . $bp[$vocation] . '</inside></item>');

   else

    $str .= ('/>');

   $str .= ('</slot>' . "\n");

  }

}

return $str;

}

function newacc()

{

require('config.php');

$nick = $_POST['nick'];

$sex = $_POST['sex'];

$vocation = $_POST['vocation'];

$account = $_POST['account'];

$pass = $_POST['pass'];

($pass != $account) or die ('Password is same as account number!');

($pass != $nick) or die ('Password is same as character name!');

($pass != 'tibia' && $pass != 'lol') or die ('Password is too simple!');

($sex == 0 || $sex == 1) or die ('Invalid sex!');

($vocation >= 1 && $vocation <= 4) or die ('Invalid vocation!');---- ta vendo o 4 coloque 5

($account >= 100000 && $account <= 999999) or die ('Invalid account number!');

preg_match("/^[a-zA-Z][a-zA-Z ]*$/", $nick) or die ('Name contains illegal characters!');

preg_match("/^[a-zA-Z0-9]+$/", $pass) or die ('Password contains illegal characters!');

!preg_match("/^gm/i", $nick) or die ('GM is only one!');

$account_file = "$diraccount/$account.xml";

$player_file = "$dirplayer/$nick.xml";

$vip_file = "$dirvip/$account.xml";

!file_exists($account_file) or die ('There is already an account with this number!');

!file_exists($player_file) or die ("There is already a player $nick!");

$file = fopen($account_file, 'w');

fwrite($file,

'<?xml version="1.0"?>

<account pass="' . $pass . '" type="1" premDays="90">

<characters>

<character name="' . $nick . '"/>

</characters>

</account>');

fclose($file);

$file = fopen($player_file, 'w');

fwrite($file,

'<?xml version="1.0"?>

<player name="' . $nick . '" account="' . $account . '" sex="' . $sex . '" lookdir="1" exp="' . $exp . '" voc="' . $vocation . '" level="' . $lvl . '" access="0" cap="' . $cap . '" maglevel="' . $mlvl[$vocation] . '" lastlogin="0">

<spawn x="' . $spawnx . '" y="' . $spawny . '" z="' . $spawnz . '"/>

<temple x="' . $templex . '" y="' . $templey . '" z="' . $templez . '"/>

<health now="' . $health[$vocation] . '" max="' . $health[$vocation] . '" food="0"/>

<mana now="' . $mana[$vocation] . '" max="' . $mana[$vocation] . '" spent="0"/>

<look type="' . $look[$vocation][$sex] . '" head="20" body="30" legs="40" feet="50"/>

<skills>' . "\n" . skills($vocation) . '</skills>

<inventory>' . equip($vocation) . '</inventory>

<depots><depot depotid="1"><item id="3436"><inside><item id="3440"/></inside></item></depot></depots>

<storage/>

</player>');

fclose($file);

$file = fopen($vip_file, 'w');

fwrite($file,

'<?xml version="1.0"?>

<vips/>');

fclose($file);

print "Account $account was successfully created!";

}

newacc();

?>

</center>

Agora abra o config.php

coloque isto la em baixo antes do ?>, e edite oq quiser

//--------------------------------- Ninja-------------------------------------

// Looks

$look[NINJA][MALE] = '131';

$look[NINJA][FEMALE] = '139';

// HP, mana, magic level

$health[NINJA] = '215';

$mana[NINJA] = '45';

$mlvl[NINJA] = '4';

// Skills:            fist,club,sword,axe,dist,shld,fish

$skill[NINJA] = array(10,  71,  71,  71,  10,  71,  10);

// Eq:                 helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo

$equip[NINJA] = array(3322, 2950, 2792, 3295, 3249, 3363, 3300, 3490, 2986, 0);

// Backpack:

$bp[NINJA] = '<item id="2973" count="2"/><item id="3098" count="3"/>';

É trabalhoso mas você consegue.

Acho que é só isso, se tiver dúvidas ou tiver faltando algo poste.

Link para o comentário
Compartilhar em outros sites

  • Respostas 40
  • Created
  • Última resposta

Top Posters In This Topic

  • 2 weeks later...

Cara no meu serv pvp-enforced, quando a nova vocação usava uma magia ela passava em ml, quando ela dava um hit ela avançava em skill, e quando passava de lvl ficava com 63k de life, semelhante a um gm. Se vc poder me ajudar a consertar isso eu agradeço.

Nota: Nao exagerei nos skills etc, coloquei do jeito q vc ensinou.

Link para o comentário
Compartilhar em outros sites

Muito bom cara^^ Olha só....eu postei em pedidos de códigos pedindo ajuda para criar second promotions...acho que talvez vc saiba como fazer isso..o GM Rotciv ja me deu uma mão, mas ainda falta criar um npc que faça o char ser promovido + uma vez....achei q talvez vc soubesse como fazè-lo o.O se souber, ajuda ae ^^ vlw

if msgcontains(msg, 'promotion') then

if isPromoted(cid) then

selfSay('Sorry, you are already promoted.')

focus = 0

else

if getPlayerLevel(creatureGetName(cid)) > 19 then

if pay(cid,10000) then

promote(cid)

selfSay('You are now promoted!')

É isso ai que falta.....alguma opção que dê promotion de novo o.O

Link para o comentário
Compartilhar em outros sites

Aew bom tuto pena q n vi isso antes.. eu jah aprendi a fazeh otras voc a algum tempo... vc fez td perfeitinho soh eskeceu de 1 detalhe em spells :::

<?xml version="1.0"?>

<spells maxVoc="4"> <------ tem q muda isso bota ateh q voc pode usa spell se bota + 1 voc tem q bota <?xml version="1.0"?>

<spells maxVoc="5">

bom eh soh isso... se n td mundo kebra a cara ai tentando usa magia
Link para o comentário
Compartilhar em outros sites

kra fiz tdo como vc disse e olha a ##### q da qnd alg tenta entrar com o char criado...

Debug assertion in line 163 of module "Container" failed.

The error has been saved in the file error.txt

Please submit the error at file error.txt to a tutor

Como eu posso resolver isto?

Agradeço se puder responder =)

Link para o comentário
Compartilhar em outros sites

De boa eh dificil me responder...?

nego soh elogia e o kra q fez o topico nem olha as paradas q nois escrevemos.. poh se algum dia vc ler plx me da 1 explikação o pq isso ocorre

Link para o comentário
Compartilhar em outros sites


×
×
  • Criar Novo...