• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Arena TOP 10

Hello , this is my first script . Sorry if already have one but i no found....

Script - Top 10 arena
2v2
3v3
5v5



If you find any bug , please tell me.

-----------------------------------------------------------------------------------------------------

Npc to use ( Last Trinitycore rev. )

Code:
REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (222222, 0, 0, 0, 0, 0, 25173, 0, 0, 0, 'Top Arena', 'Fireball WoW', 'Speak', 0, 71, 71, 0, 35, 35, 1, 1, 1.14286, 4, 1, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 138936390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'SmartAI', 0, 3, 1, 1.56, 1.56, 1.56, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, '', 1);


Thx Foereaper for teach me how to optimize :D
Sry my english
 
Last edited:

slp13at420

Mad Scientist
did you visibly verify the table and the 2 entries exist?
Code:
[COLOR="#808080"]
       local resultado = CharDBQuery("SELECT [COLOR="#DAA520"]name,rating[/COLOR]FROM [COLOR="#DAA520"]arena_team[/COLOR]WHERE type='"..intid.."' ORDER BY rating DESC LIMIT 10")
[/COLOR]

are there entries for the class you have selected?
Code:
[COLOR="#808080"]
       local resultado = CharDBQuery("SELECT name,rating FROM arena_team WHERE type='"..[COLOR="#DAA520"]intid[/COLOR].."' ORDER BY rating DESC LIMIT 10")
[/COLOR]
if none then yes it would return nil for anything trying to access the data from it. sounds like it needs an `if/end` like this added:
Code:
[COLOR="#808080"]
[COLOR="#DAA520"]if(resultado)then[/COLOR]
        repeat
               time = resultado:GetString(0);
               pontos = resultado:GetUInt32(1);
               plr:SendBroadcastMessage("|cFF33CCFFNome do time : |r ".. time .." ,  |cFF33CCFFRating : |r" .. pontos .. "  pontos de arena ");
        until not resultado:NextRow();
[COLOR="#DAA520"]end[/COLOR]
[/COLOR]
 
Last edited:
Top