Ir para conteúdo

[Arquivado]Xt Website - Algumas Classes Para Terminarmos


noobinhu

Posts Recomendados

Nossa API já está quase pronta, hoje terminei mais 1 classe (listagem de monstros) e amanhã farei mais 2 (relacionadas aos items XML), faltam somente classes para manipulação de items e guilds.

 

Alguns exemplos de utilização.

 

Monsters List:

$excluded = array("Rat","Cave Rat","Demon");

$monsters = new MonstersList("C:\Documents and Settings\Anderson\Meus documento\scryingdamson4pl2-console\data\monster/", $excluded);

$monsters->orderBy('experience','DESC');

$monstersList = $monsters->getMonsters();

 

foreach($monstersList as $monster)

{

echo ucwords($monster->getAttribute('name')).' Experience: '.number_format($monster->getAttribute('experience'),0,',','.').'<br>';

}

 

Resultado:

Annihilon Experience: 100.000

The Abomination Experience: 25.000

Ghazbaran Experience: 15.000

Morgaroth Experience: 15.000

Ferumbras Experience: 12.000

Madareth Experience: 10.000

Latrivan Experience: 10.000

Hellgorak Experience: 10.000

Zugurosh Experience: 10.000

Golgordan Experience: 10.000

Ushuriel Experience: 10.000

Orshabaal Experience: 9.999

Massacre Experience: 9.800

The Imperor Experience: 8.000

Lord Of The Elements Experience: 8.000

Dracola Experience: 7.750

Undead Dragon Experience: 7.200

Hellhound Experience: 6.800

Juggernaut Experience: 6.500

The Obliverator Experience: 6.000

Son Of Verminor Experience: 5.900

Mr. Punish Experience: 5.500

Countess Sorrow Experience: 5.150

Deathbringer Experience: 5.100

Ungreez Experience: 5.000

Grim Reaper Experience: 4.500

Fallen Mooh'tah Master Ghar Experience: 4.400

Phantasm Experience: 4.400

Minishabaal Experience: 4.000

Gnorre Chyllson Experience: 4.000

Lost Soul Experience: 4.000

Fury Experience: 4.000

Infernalist Experience: 4.000

Warlock Experience: 4.000

Demodras Experience: 4.000

Hellfire Fighter Experience: 3.900

Hand Of Cursed Fate Experience: 3.850

The Handmaiden Experience: 3.850

Bones Experience: 3.750

Fluffy Experience: 3.550

Betrayed Wraith Experience: 3.500

Dark Torturer Experience: 3.500

The Masked Marauder Experience: 3.500

Blightwalker Experience: 3.350

Plaguesmith Experience: 3.350

Phantasm Experience: 3.300

Rahemos Experience: 3.100

Ashmunrah Experience: 3.100

Mahrdis Experience: 3.050

Svoren The Mad Experience: 3.000

Morguthis Experience: 3.000

Vashresamun Experience: 2.950

Omruc Experience: 2.950

Thalas Experience: 2.950

Dipthrah Experience: 2.900

Fire Overlord Experience: 2.800

The Old Widow Experience: 2.800

Earth Overlord Experience: 2.800

Energy Overlord Experience: 2.800

War Golem Experience: 2.550

Hellspawn Experience: 2.550

Defiler Experience: 2.500

Behemoth Experience: 2.500

The Pit Lord Experience: 2.500

Grorlam Experience: 2.400

Serpent Spawn Experience: 2.350

Frost Dragon Experience: 2.300

Sea Serpent Experience: 2.300

Nightmare Experience: 2.150

Dragon Lord Experience: 2.100

Spectre Experience: 2.100

Hydra Experience: 2.100

Norgle Glacierbeard Experience: 2.100

Destroyer Experience: 2.000

Diabolic Imp Experience: 1.950

Ice Overlord Experience: 1.950

Thul Experience: 1.800

Tiquandas Revenge Experience: 1.755

The Count Experience: 1.750

Quara Predator Experience: 1.600

Black Knight Experience: 1.600

Darakan The utioner Experience: 1.600

Wyrm Experience: 1.450

Werewolf Experience: 1.450

Nightmare Scion Experience: 1.350

Overcharged Energy Elemental Experience: 1.300

Roaring Water Elemental Experience: 1.300

Jagged Earth Elemental Experience: 1.300

Blistering Fire Elemental Experience: 1.300

Bog Raider Experience: 1.300

Worker Golem Experience: 1.250

Hero Experience: 1.200

Webster Experience: 1.200

Quara Pincher Experience: 1.200

Vampire Bride Experience: 1.050

Massive Fire Elemental Experience: 950

Spirit Of Fire Experience: 950

Lich Experience: 900

Crystal Spider Experience: 900

Banshee Experience: 900

Giant Spider Experience: 900

Braindeath Experience: 895

Spirit Of Water Experience: 850

Massive Energy Elemental Experience: 850

Massive Earth Elemental Experience: 850

Massive Water Elemental Experience: 800

Quara Hydromancer Scout Experience: 800

Quara Hydromancer Experience: 800

Undead Gladiator Experience: 800

Spirit Of Earth Experience: 800

Mutated Tiger Experience: 750

Frost Dragon Hatchling Experience: 745

Ancient Scarab Experience: 720

Dragon Experience: 700

Drasilla Experience: 700

Necropharus Experience: 700

Grimgor Guteater Experience: 670

Orc Warlord Experience: 670

Dragon Lord Hatchling Experience: 645

Mutated Bat Experience: 615

Quara Pincher Scout Experience: 600

Bone Beast Experience: 580

Necromancer Experience: 580

Slim Experience: 580

Ice Witch Experience: 580

Blazing Fire Elemental Experience: 580

Foreman Kneebiter Experience: 570

Man In The Cave Experience: 555

Undead Minion Experience: 550

Wyvern Experience: 515

The Hag Experience: 510

Lethal Lissy Experience: 500

Nightstalker Experience: 500

The Evil Eye Experience: 500

Ron The Ripper Experience: 500

Brutus Bloodbeard Experience: 500

Enlightened Of The Cult Experience: 500

Deadeye Devious Experience: 500

Yeti Experience: 460

Mutated Rat Experience: 450

Energy Elemental Experience: 450

Muddy Earth Elemental Experience: 450

Water Elemental Experience: 450

Charged Energy Elemental Experience: 450

Slick Water Elemental Experience: 450

Earth Elemental Experience: 450

The Dark Dancer Experience: 435

Priestess Experience: 420

Quara Predator Scout Experience: 400

Fernfang Experience: 400

Adept Of The Cult Experience: 400

Quara Mantassin Experience: 400

Dharalion Experience: 380

Pirate Corsair Experience: 350

Kreebosh The Exile Experience: 350

Marid Experience: 325

Efreet Experience: 325

Deathslicer Experience: 320

Tarantula Experience: 310

Haunted Treeling Experience: 310

Vampire Experience: 305

Avalanche Experience: 305

Death Blob Experience: 300

Rotworm Queen Experience: 300

General Murius Experience: 300

Acolyte Of The Cult Experience: 300

Ice Golem Experience: 295

Elder Beholder Experience: 280

Zombie Experience: 280

Orcus The Cruel Experience: 280

Stone Golem Experience: 280

Orc Leader Experience: 270

Xenia Experience: 255

Cyclops Smith Experience: 255

Pirate Buccaneer Experience: 250

Acid Blob Experience: 250

Quara Constrictor Experience: 250

Quara Constrictor Scout Experience: 250

Pirate Ghost Experience: 250

Dwarf Geomancer Experience: 245

Demon Skeleton Experience: 240

Fire Elemental Experience: 220

Green Djinn Experience: 215

Blue Djinn Experience: 215

Cursed Gladiator Experience: 215

Lizard Snakecharmer Experience: 210

Mad Scientist Experience: 205

Monk Experience: 200

Cyclops Drone Experience: 200

The Horned Fox Experience: 200

Orc Berserker Experience: 195

Crypt Shambler Experience: 195

Barbarian Bloodwalker Experience: 195

Rocky Experience: 190

Valkyrie Experience: 185

Dragon Hatchling Experience: 185

Dark Magician Experience: 185

Gozzler Experience: 180

Mercury Blob Experience: 180

Elf Arcanist Experience: 175

Pirate Cutthroat Experience: 175

Beholder Experience: 170

Dwarf Guard Experience: 165

Elephant Experience: 160

Minotaur Guard Experience: 160

Blood Crab Experience: 160

Slime Experience: 160

Terror Bird Experience: 150

Minotaur Mage Experience: 150

Frost Giant Experience: 150

Hunter Experience: 150

Mummy Experience: 150

Mutated Human Experience: 150

Thornback Tortoise Experience: 150

Gargoyle Experience: 150

Cyclops Experience: 150

Frost Giantess Experience: 150

Carniphila Experience: 150

Dark Monk Experience: 145

Merlkin Experience: 145

Axeitus Headbanger Experience: 140

Pirate Marauder Experience: 125

Ghost Experience: 120

Dire Penguin Experience: 120

Scarab Experience: 120

Witch Experience: 120

Barbarian Brutetamer Experience: 115

The Hairy One Experience: 115

Lizard Templar Experience: 115

Kongra Experience: 115

Mammoth Experience: 110

Orc Shaman Experience: 110

Lizard Sentinel Experience: 110

Fire Devil Experience: 110

Orc Rider Experience: 110

Big Boss Trolliver Experience: 105

Assasin Experience: 105

Sibang Experience: 105

Apprentice Sheng Experience: 100

Quara Mantassin Scout Experience: 100

Dark Apprentice Experience: 100

Novice Of The Cult Experience: 100

Damaged Worker Golem Experience: 95

Stalker Experience: 90

Gladiator Experience: 90

Gazer Experience: 90

Colerian The Barbarian Experience: 90

Tortoise Experience: 90

Ghoul Experience: 85

Barbarian Headsplitter Experience: 85

Barbarian Skullhunter Experience: 85

Pirate Skeleton Experience: 85

Elf Scout Experience: 75

Dwarf Soldier Experience: 70

Gang Member Experience: 70

Achad Experience: 70

Carrion Worm Experience: 70

Bandit Experience: 65

Skeleton Warrior Experience: 65

Minotaur Archer Experience: 65

Swamp Troll Experience: 65

Wisp Experience: 65

Nomad Experience: 60

Amazon Experience: 60

Bovinus Experience: 60

Toad Experience: 60

Mad Technomancer Experience: 55

Wild Warrior Experience: 55

War Wolf Experience: 55

Goblin Assassin Experience: 52

Goblin Leader Experience: 50

Dworc Voodoomaster Experience: 50

Tibia Bug Experience: 50

Minotaur Experience: 50

Bloodpaw Experience: 50

Orc Warrior Experience: 50

Chakoya Windcaller Experience: 48

Smuggler Experience: 48

Primitive Experience: 45

Hero Hacker Experience: 45

Scorpion Experience: 45

Hacker Experience: 45

Dwarf Experience: 45

Elf Experience: 42

Chakoya Tribewarden Experience: 40

Chakoya Toolshaper Experience: 40

Crocodile Experience: 40

Rotworm Experience: 40

Tiger Experience: 40

Larva Experience: 40

Orc Spearman Experience: 38

Goblin Scavenger Experience: 37

Skeleton Experience: 35

Frostfur Experience: 35

Dworc Fleshhunter Experience: 35

Crazed Beggar Experience: 35

Dworc Venomsniper Experience: 30

Lion Experience: 30

Crab Experience: 30

Troll Champion Experience: 30

Cobra Experience: 30

Centipede Experience: 30

Polar Bear Experience: 28

Orc Experience: 25

Goblin Experience: 25

Wasp Experience: 25

Munster Experience: 23

Bear Experience: 23

Panda Experience: 23

Frost Troll Experience: 23

Poison Spider Experience: 22

Island Troll Experience: 20

Troll Experience: 20

Coral Frog Experience: 20

Hyaena Experience: 20

Winter Wolf Experience: 20

Azure Frog Experience: 20

Orchid Frog Experience: 20

Crimson Frog Experience: 20

Spit Nettle Experience: 20

Bad Bug Experience: 18

Bug Experience: 18

Wolf Experience: 18

Spider Experience: 12

Bat Experience: 10

Snake Experience: 10

Badger Experience: 5

Grynch Clan Goblin Experience: 4

Skunk Experience: 3

Penguin Experience: 1

Cat Experience: 0

Poisonthrower Experience: 0

Shredderthrower Experience: 0

Dog Experience: 0

Flamingo Experience: 0

Chicken Experience: 0

Parrot Experience: 0

Seagull Experience: 0

Plaguethrower Experience: 0

Bad Rabbit Experience: 0

Butterfly Experience: 0

Rabbit Experience: 0

Pig Experience: 0

Slime Experience: 0

Silver Rabbit Experience: 0

Squirrel Experience: 0

Sheep Experience: 0

Black Sheep Experience: 0

Training Monk Experience: 0

The Halloween Hare Experience: 0

Deer Experience: 0

Mimic Experience: 0

Green Frog Experience: 0

Flamethrower Experience: 0

Cockroach Experience: 0

Butterfly Experience: 0

Butterfly Experience: 0

Butterfly Experience: 0

Magicthrower Experience: 0

 

Você também pode selecionar APENAS UM monstro!

 

$excluded = array("All Monsters");

$included = array("Rat");

$monsters = new MonstersList("C:\Documents and Settings\Anderson\Meus documentos\cryingdamson4pl2-console\data\monster/", $excluded, $included);

$monsters->orderBy('experience','DESC');

$monstersList = $monsters->getMonsters();

 

foreach($monstersList as $monster)

{

echo ucwords($monster->getAttribute('name')).' Experience: '.number_format($monster->getAttribute('experience'),0,',','.').'<br>';

}

 

Resultado:

Rat Experience: 5

 

House Class:

$houses = new HousesList($con, null, null);

$housesList = $houses->getHouses();

 

foreach($housesList as $house)

{

echo 'House ID: '.$house->getField('id').' Nome: '.$house->getField('name').'<br>';

}

 

Resultado:

House ID: 1 Nome: Rhyves Flats 14

House ID: 2 Nome: Rhyves Flats 15

House ID: 3 Nome: Rhyves Flats 16

House ID: 4 Nome: Baraganor Boulevard 1

House ID: 5 Nome: Saund Top 1

House ID: 6 Nome: Kazgal Close 1

House ID: 7 Nome: Tower Flat

House ID: 8 Nome: Castle Street 1

House ID: 9 Nome: Seaview 2

House ID: 10 Nome: Seaview 1

House ID: 11 Nome: Hill Hut 1

House ID: 12 Nome: Hill Hut 2

House ID: 13 Nome: Farm Lane 1

House ID: 14 Nome: Farm Lane 2

House ID: 15 Nome: Church Avenue 1

House ID: 16 Nome: Church Avenue 2

House ID: 17 Nome: Church Avenue 3

House ID: 18 Nome: Church Avenue 4

House ID: 19 Nome: Church Avenue 5

House ID: 20 Nome: Church Avenue 7

House ID: 23 Nome: City Walls 1

House ID: 24 Nome: City Walls 2

House ID: 25 Nome: City Walls 3

House ID: 26 Nome: City Walls 4

House ID: 27 Nome: Hilltop 1

House ID: 28 Nome: Hilltop 2

House ID: 29 Nome: Hilltop 3

House ID: 30 Nome: Hilltop Hall

House ID: 31 Nome: Rhyves Flats 1

House ID: 32 Nome: Rhyves Flats 2

House ID: 33 Nome: Rhyves Flats 3

House ID: 34 Nome: Rhyves Flats 4

House ID: 35 Nome: Rhyves Flats 5

House ID: 36 Nome: Rhyves Flats 6

House ID: 37 Nome: Rhyves Flats 7

House ID: 38 Nome: Rhyves Flats 8

House ID: 39 Nome: Rhyves Flats 9

House ID: 40 Nome: Rhyves Flats 10

House ID: 41 Nome: Rhyves Flats 11

House ID: 42 Nome: Rhyves Flats 13

House ID: 43 Nome: Rhyves Flats 12

House ID: 44 Nome: Baraganor Boulevard 2

House ID: 45 Nome: Baraganor Boulevard 3

House ID: 46 Nome: Baraganor Boulevard 4

House ID: 47 Nome: Baraganor Boulevard 5

House ID: 48 Nome: Baraganor Boulevard 6

House ID: 49 Nome: Baraganor Boulevard 7

House ID: 50 Nome: Baraganor Boulevard 8

House ID: 51 Nome: Kazgal Close 2

House ID: 52 Nome: Kazgal Close 3

House ID: 53 Nome: Kazgal Close 4

House ID: 54 Nome: Kazgal Close 5

House ID: 55 Nome: Kazgal Close6

House ID: 56 Nome: Kazgal Close 7

House ID: 57 Nome: Kazgal Close 8

House ID: 58 Nome: Hammersmith Hall

House ID: 59 Nome: Varnack's Cavern

House ID: 60 Nome: Saund Street 1

House ID: 61 Nome: Saund Street 2

House ID: 62 Nome: Saund Street 3

House ID: 63 Nome: Saund Street 4

House ID: 64 Nome: Saund Street 5

House ID: 65 Nome: Saund Top 2

House ID: 66 Nome: Saund Top 3

House ID: 67 Nome: Dock Street 1

House ID: 68 Nome: Dock Street 2

House ID: 69 Nome: Dock Street 3

House ID: 70 Nome: Nomad Hill 1

House ID: 71 Nome: Nomad Hill 2

House ID: 72 Nome: Nomad Hill 3

House ID: 73 Nome: Great Hall 1

House ID: 74 Nome: Great Hall 2

House ID: 75 Nome: Tarat Road 1

House ID: 76 Nome: Temple Terrace 1

House ID: 77 Nome: Temple Terrace 2

House ID: 78 Nome: Temple Terrace 3

House ID: 79 Nome: Tarat Road 2

House ID: 80 Nome: Tarat Road 3

House ID: 81 Nome: Tarat Road 4

House ID: 82 Nome: Tarat Road 6

House ID: 83 Nome: Tarat Road 7

House ID: 84 Nome: Tarat Road 8

House ID: 85 Nome: Tarat Road 9

House ID: 86 Nome: Smith Lane 1

House ID: 87 Nome: Smith Lane 2

House ID: 88 Nome: Smith Lane 3

House ID: 89 Nome: Smith Lane 4

House ID: 90 Nome: Smith Lane 5

House ID: 91 Nome: Smith Lane 6

House ID: 92 Nome: Smith Lane 7

House ID: 93 Nome: Smith Lane Shop

House ID: 94 Nome: Snowcapped Street 1

House ID: 95 Nome: Snowcapped Street 2

House ID: 96 Nome: Snowcapped Street 3

House ID: 97 Nome: Wall Flat 1

House ID: 98 Nome: Wall Flat 2

House ID: 99 Nome: Wall Flat 3

House ID: 100 Nome: Wall Flat 4

House ID: 101 Nome: Farm Lane 3

House ID: 102 Nome: Farm Lane 4

House ID: 103 Nome: The Square 1

House ID: 104 Nome: The Square 2 (Shop)

House ID: 105 Nome: Central Hall

House ID: 106 Nome: The Square 3

House ID: 107 Nome: The Square 4 (Shop)

House ID: 108 Nome: Church Avenue 6

House ID: 109 Nome: Castle Street 2

House ID: 110 Nome: Castle Street 3

House ID: 111 Nome: Armory Flat 1

House ID: 112 Nome: Armory Flat 2

 

Template Class:

<?php

$template = new Template($templatename);

$post = new Post("Criação de contas");

$post->setDate("quarta-feira, 29 de julho de 2009");

$post->addContent("Digite sua conta e sua senha para logar no site, isto permitirá a criação de personagens, trocar senha, email, e muitas outras funções.");

$template->addPost($post);

$template->show();

?>

 

Players Class:

<?php

$players = new PlayersList($con, null, "ORDER BY `level` DESC LIMIT 10");

$playersList = $players->getPlayers();

foreach ($playersList as $player)

{

echo $player->getField('name') . ' ... '. $player->getField('level') .' <br>';

}

?>

 

Resultado:

Yunie ... 10

Account Manager ... 1

Thee ... 1

 

SQL Class (compatível com MySQL e SQLite):

$connectionType = 'mysql';

 

$conParameters = array(

'host' => 'localhost', // mysql con

'user' => 'root', // mysql con

'password' => '', // mysql con

'database' => 'tfs', // mysql con

'database_file' => 'schema.sqlite' // parâmetro para sqlite

);

 

$con = new SQLConnection($connectionType,$conParameters);

 

// processamentos

 

$con->close();

 

Valeu galera, até mais!

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

  • 2 months later...
  • 8 years later...
Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...