PDA

View Full Version : NEED HELP with tele npc



imjustbackup
07-04-09, 07:41 PM
1. problem is self exsplanatory in the title but yes i need help with this gay teleporter

Here is the code i inserted into query:



insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('76666', "Teleporter NPC", "Echelon-WoW", '', '0', '7', '0', '3', '0', '0', '27545', '0', '0', '0', '1', '1', '1', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('76666', '80', '80', '7', '9000000', '9000000', '100000', '1', '1', '1000', '0', '99999', '99999', '0', '0', '0', '0', '3600', '20000', '9999', '9999', '9999', '9999', '9999', '9999', '0', '0', "0", '1', '0', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');


------------------------------------------
that pretty much made the npc right??? yes and it worked...

BUT /sigh when i add the .lua file to the scripts folder to make his dumb A## talk he only says "good day +player+ how can i help you?"

Here is the .lua file:
----------------------------------------


function On_Gossip(unit, event, player)
unit:GossipCreateMenu(3544, player, 0)
unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
unit:GossipSendMenu(player)
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if(intid == 999) then
unit:GossipCreateMenu(3543, player, 0)
unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
unit:GossipSendMenu(player)
end
if(intid == 1) then
unit:GossipCreateMenu(3543, player, 0)
unit:GossipMenuAddItem(1, "Dalaran", 300, 0)
unit:GossipMenuAddItem(1, "Shattrath", 309, 0)
unit:GossipMenuAddItem(0, "[Back]", 999, 0)
unit:GossipSendMenu(player)
end
if(intid == 2) then
unit:GossipCreateMenu(3543, player, 0)
unit:GossipMenuAddItem(1, "Stormwind", 301, 0)
unit:GossipMenuAddItem(1, "Ironforge", 302, 0)
unit:GossipMenuAddItem(1, "Darnassus", 303, 0)
unit:GossipMenuAddItem(1, "Exodar", 304, 0)
unit:GossipMenuAddItem(0, "[Back]", 999, 0)
unit:GossipSendMenu(player)
end
if(intid == 3) then
unit:GossipCreateMenu(3543, player, 0)
unit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)
unit:GossipMenuAddItem(1, "Undercity", 306, 0)
unit:GossipMenuAddItem(1, "Thunder Bluff", 307, 0)
unit:GossipMenuAddItem(1, "Silvermoon", 308, 0)
unit:GossipMenuAddItem(0, "[Back]", 999, 0)
unit:GossipSendMenu(player)
end
if(intid == 300) then
player:Teleport(571, 5798.553711, 645.019287, 647.477783)
unit:GossipComplete(player)
end
if(intid == 301) then
player:Teleport(0, -8913.230469, 554.632996, 93.794830)
unit:GossipComplete(player)
end
if(intid == 302) then
player:Teleport(0, -4982.447266, -880.969604, 501.659882)
unit:GossipComplete(player)
end
if(intid == 303) then
player:Teleport(1, 9946.639648, 2610.149414, 1316.256348)
unit:GossipComplete(player)
end
if(intid == 304) then
player:Teleport(530, -4008.085205, -11885.257813, -1.419589)
unit:GossipComplete(player)
end
if(intid == 305) then
player:Teleport(1, 1505.377319, -4414.602539, 20.598469)
unit:GossipComplete(player)
end
if(intid == 306) then
player:Teleport(0, 1831.750854, 238.543503, 60.478447)
unit:GossipComplete(player)
end
if(intid == 307) then
player:Teleport(1, -1282.347534, 133.302917, 131.218323)
unit:GossipComplete(player)
end
if(intid == 308) then
player:Teleport(530, 9381.675781, -7277.671387, 14.241373)
unit:GossipComplete(player)
end
if(intid == 309) then
player:Teleport(530, -1704.053589, 5376.160156, 3.416441)
unit:GossipComplete(player)
end
end
RegisterUnitGossipEvent(76666, 1, "On_Gossip")
RegisterUnitGossipEvent(76666, 2, "Gossip_Submenus")
-----------------------------------------
now what am i sapose to do like execute it somehow because this .lua file is != to a query so im CONFUSLED:confused:...

I got the same entry id and everything "AS SHOWN IN RED FROM THE YELLOW TEXT ABOVE" i dont know what to do??? plz help.

Dimman
08-04-09, 05:32 AM
oko.....

runiker
09-04-09, 02:03 AM
First off its not the faction if it was faction 35 is the way to go.
Also check the black box called arc-world and see if the lua itself is loading i feel like its not. If it gives you an error post it here and i will be more then glad to help.

Lbniese
09-09-09, 11:24 AM
I know the problem


function Teleporter_On_Gossip(unit, event, player)
unit:GossipCreateMenu(3544, player, 0)
unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
unit:GossipSendMenu(player)
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if(intid == 999) then
unit:GossipCreateMenu(3543, player, 0)
unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
unit:GossipSendMenu(player)
end
if(intid == 1) then
unit:GossipCreateMenu(3543, player, 0)
unit:GossipMenuAddItem(1, "Dalaran", 300, 0)
unit:GossipMenuAddItem(1, "Shattrath", 309, 0)
unit:GossipMenuAddItem(0, "[Back]", 999, 0)
unit:GossipSendMenu(player)
end
if(intid == 2) then
unit:GossipCreateMenu(3543, player, 0)
unit:GossipMenuAddItem(1, "Stormwind", 301, 0)
unit:GossipMenuAddItem(1, "Ironforge", 302, 0)
unit:GossipMenuAddItem(1, "Darnassus", 303, 0)
unit:GossipMenuAddItem(1, "Exodar", 304, 0)
unit:GossipMenuAddItem(0, "[Back]", 999, 0)
unit:GossipSendMenu(player)
end
if(intid == 3) then
unit:GossipCreateMenu(3543, player, 0)
unit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)
unit:GossipMenuAddItem(1, "Undercity", 306, 0)
unit:GossipMenuAddItem(1, "Thunder Bluff", 307, 0)
unit:GossipMenuAddItem(1, "Silvermoon", 308, 0)
unit:GossipMenuAddItem(0, "[Back]", 999, 0)
unit:GossipSendMenu(player)
end
if(intid == 300) then
player:Teleport(571, 5798.553711, 645.019287, 647.477783)
unit:GossipComplete(player)
end
if(intid == 301) then
player:Teleport(0, -8913.230469, 554.632996, 93.794830)
unit:GossipComplete(player)
end
if(intid == 302) then
player:Teleport(0, -4982.447266, -880.969604, 501.659882)
unit:GossipComplete(player)
end
if(intid == 303) then
player:Teleport(1, 9946.639648, 2610.149414, 1316.256348)
unit:GossipComplete(player)
end
if(intid == 304) then
player:Teleport(530, -4008.085205, -11885.257813, -1.419589)
unit:GossipComplete(player)
end
if(intid == 305) then
player:Teleport(1, 1505.377319, -4414.602539, 20.598469)
unit:GossipComplete(player)
end
if(intid == 306) then
player:Teleport(0, 1831.750854, 238.543503, 60.478447)
unit:GossipComplete(player)
end
if(intid == 307) then
player:Teleport(1, -1282.347534, 133.302917, 131.218323)
unit:GossipComplete(player)
end
if(intid == 308) then
player:Teleport(530, 9381.675781, -7277.671387, 14.241373)
unit:GossipComplete(player)
end
if(intid == 309) then
player:Teleport(530, -1704.053589, 5376.160156, 3.416441)
unit:GossipComplete(player)
end
end
RegisterUnitGossipEvent(76666, 1, "On_Gossip")
RegisterUnitGossipEvent(76666, 2, "Gossip_Submenus")


and then call your npc for
Teleporter and you lua script for
teleporter
then it works