quest 9663-THE_KESSEL_RUN - samartai zu eventai umschreiben

[CODE]Author: zxbiohazardzx

by malcrom:

{{{#!sql

– QUEST 9663 “The Kessel Run”

UPDATE creature_template SET AIName= ‘SmartAI’ WHERE entry IN (17116,17240,17440);

UPDATE creature_template SET gossip_menu_id=7983 WHERE entry=17440;

– Smart AI

DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid IN (17116,17240,17440);

INSERT INTO smart_scripts (entryorguid,source_type,id,link,event_type,event_phase_mask,event_chance,event_flags,event_param1,event_param2,event_param3,event_param4,action_type,action_param1,action_param2,action_param3,action_param4,action_param5,action_param6,target_type,target_param1,target_param2,target_param3,target_x,target_y,target_z,target_o,comment) VALUES

(17116,0,0,0,64,0,100,0,0,0,0,0,33,17116,0,0,0,0,0,7,0,0,0,0,0,0,0, ‘On gossip hello credit for quest 9663’),

(17240,0,0,0,64,0,100,0,0,0,0,0,33,17240,0,0,0,0,0,7,0,0,0,0,0,0,0, ‘On gossip hello credit for quest 9663’),

(17440,0,0,0,64,0,100,0,0,0,0,0,33,17440,0,0,0,0,0,7,0,0,0,0,0,0,0, ‘On gossip hello credit for quest 9663’);

– Add Gossip menu items

DELETE FROM gossip_menu WHERE entry=7399 AND text_id=9038;

DELETE FROM gossip_menu WHERE entry=7983 AND text_id=8994;

DELETE FROM gossip_menu WHERE entry=7983 AND text_id=9039;

DELETE FROM gossip_menu WHERE entry=7370 AND text_id=9040;

INSERT INTO gossip_menu (entry,text_id) VALUES

(7399,9038),(7983,8994),(7983,9039),(7370,9040);

– Gossip conditions

DELETE FROM conditions WHERE SourceTypeOrReferenceId=14 AND SourceGroup IN (7399,@GOSSIPID,7370);

INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,ConditionValue3,ErrorTextId,ScriptName,Comment) VALUES

(14,7399,9038,0,9,9663,0,0,0,‘’,‘Show gossip text 9038 if player has quest 9663’),

(14,7983,9039,0,9,9663,0,0,0,‘’,‘Show gossip text 9039 if player has quest 9663’),

(14,7370,9040,0,9,9663,0,0,0,‘’,‘Show gossip text 9040 if player has quest 9663’);

}}}[/CODE]

ich hab hier en smartai-script für eine buggy quest, leider ist diese für smartai

da wir auf unserem server aber noch 3.3.3a laufen haben kann ich des nicht benutzen und um ehrlich zu sein hab ich von smartai keinen blassen schimmer

könnte mir das bitte jemand für eventai umschreiben?

das ist bei uns die letzte buggy quest im dranaistrartgebit…und es wäre doof…wenn die nicht ginge

gruß vardash

p.s.: ich habe auch nach einem entsprechenden evantai script gesucht nur leider habe ich keines gefunden

Das musst du im Core scripten.

SmartAI hat viele Funktionen die du per EventAI nicht erreichen kannst → Nicht umbedingt zu EventAI portbar.

Bei nem OnGossipHello der jeweiligen Kreatur wird nen KillCredit (in dem Fall die EntryID der Kreatur) verteilt, sofern der Spieler die Quest 9663 hat. Das ist nen ganz simples Script. Schau einfach in den Script-Ordner. Da dürften genug Beispiele vorhanden sein

ok ich werd mal suchen, danke für die info /emoticons/default_smile.png

so ich habs geschrieben und getestet, für die die es haben wollen

hier das gossiphello

[SPOILER]/*######

For quest 9663, QUEST_THE_KESSEL_RUN, written by vardash

######*/

enum eKesselRun

{

QUEST_THE_KESSEL_RUN = 9663,

NPC_HIGH_CHIEF_STILLPINE = 17440,

NPC_EXARCH_MENELAOUS = 17116,

NPC_ADMIRAL_ODESYUS = 17240,

};

#define GOSSIP_ITEM_WARN_0 “Ich bin hier um euch zu Warnen.”

bool GossipHello_npc_high_chief_stillpine(Player* pPlayer, Creature* pCreature)

{

if (pPlayer->HasAura(31973) && pPlayer->GetQuestStatus(QUEST_THE_KESSEL_RUN) != QUEST_STATUS_COMPLETE)

{

pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARN_0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);

pPlayer->KilledMonsterCredit(NPC_HIGH_CHIEF_STILLPINE,0);

pPlayer->CLOSE_GOSSIP_MENU();

return true;

}

return false;

}

bool GossipHello_npc_exarch_menelaous(Player* pPlayer, Creature* pCreature)

{

if (pPlayer->HasAura(31973) && pPlayer->GetQuestStatus(QUEST_THE_KESSEL_RUN) != QUEST_STATUS_COMPLETE)

{

pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARN_0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);

pPlayer->KilledMonsterCredit(NPC_EXARCH_MENELAOUS,0);

pPlayer->CLOSE_GOSSIP_MENU();

return true;

}

return false;

}

bool GossipHello_npc_admiral_odesyus(Player* pPlayer, Creature* pCreature)

{

if (pPlayer->HasAura(31973) && pPlayer->GetQuestStatus(QUEST_THE_KESSEL_RUN) != QUEST_STATUS_COMPLETE)

{

pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARN_0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);

pPlayer->KilledMonsterCredit(NPC_ADMIRAL_ODESYUS,0);

pPlayer->CLOSE_GOSSIP_MENU();

return true;

}

return false;

}

[/SPOILER]

und hier die einträge void AddSC_azuremyst_isle()

[SPOILER]newscript = new Script;

newscript->Name = “npc_high_chief_stillpine”;

newscript->pGossipHello = &GossipHello_npc_high_chief_stillpine;

newscript->RegisterSelf();

newscript = new Script;

newscript->Name = “npc_exarch_menelaous”;

newscript->pGossipHello = &GossipHello_npc_exarch_menelaous;

newscript->RegisterSelf();

newscript = new Script;

newscript->Name = “npc_admiral_odesyus”;

newscript->pGossipHello = &GossipHello_npc_admiral_odesyus;

newscript->RegisterSelf();

[/SPOILER]

gruß vardash

Ich würde das ganze in ein einziges Script packen (als Credit einfach pCreature->GetEntry() [bzw. wie das damals hieß] nehmen)

Du gibst den drei NPC’s dann einfach das selbe Skript

da weis ich leider nicht wie des funktioniert /emoticons/default_smile.png

Aus

/*######

For quest 9663, QUEST_THE_KESSEL_RUN, written by vardash

######*/

enum eKesselRun

{

QUEST_THE_KESSEL_RUN = 9663,

NPC_HIGH_CHIEF_STILLPINE = 17440,

NPC_EXARCH_MENELAOUS = 17116,

NPC_ADMIRAL_ODESYUS = 17240,

};

#define GOSSIP_ITEM_WARN_0 “Ich bin hier um euch zu Warnen.”

bool GossipHello_npc_high_chief_stillpine(Player* pPlayer, Creature* pCreature)

{

if (pPlayer->HasAura(31973) && pPlayer->GetQuestStatus(QUEST_THE_KESSEL_RUN) != QUEST_STATUS_COMPLETE)

{

pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARN_0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);

pPlayer->KilledMonsterCredit(NPC_HIGH_CHIEF_STILLPINE,0);

pPlayer->CLOSE_GOSSIP_MENU();

return true;

}

return false;

}

bool GossipHello_npc_exarch_menelaous(Player* pPlayer, Creature* pCreature)

{

if (pPlayer->HasAura(31973) && pPlayer->GetQuestStatus(QUEST_THE_KESSEL_RUN) != QUEST_STATUS_COMPLETE)

{

pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARN_0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);

pPlayer->KilledMonsterCredit(NPC_EXARCH_MENELAOUS,0);

pPlayer->CLOSE_GOSSIP_MENU();

return true;

}

return false;

}

bool GossipHello_npc_admiral_odesyus(Player* pPlayer, Creature* pCreature)

{

if (pPlayer->HasAura(31973) && pPlayer->GetQuestStatus(QUEST_THE_KESSEL_RUN) != QUEST_STATUS_COMPLETE)

{

pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARN_0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);

pPlayer->KilledMonsterCredit(NPC_ADMIRAL_ODESYUS,0);

pPlayer->CLOSE_GOSSIP_MENU();

return true;

}

return false;

}

wird

/*######

For quest 9663, QUEST_THE_KESSEL_RUN, written by vardash

######*/

enum eKesselRun

{

QUEST_THE_KESSEL_RUN = 9663

};

#define GOSSIP_ITEM_WARN_0 “Ich bin hier um euch zu Warnen.”

bool GossipHello_npc_quest_the_kessel_run(Player* pPlayer, Creature* pCreature)

{

if (pPlayer->HasAura(31973) && pPlayer->GetQuestStatus(QUEST_THE_KESSEL_RUN) != QUEST_STATUS_COMPLETE)

{

pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WARN_0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);

pPlayer->KilledMonsterCredit(pCreature->GetEntry(),0);

pPlayer->CLOSE_GOSSIP_MENU();

return true;

}

return false;

}

newscript = new Script;

newscript->Name = “npc_quest_the_kessel_run”;

newscript->pGossipHello = &GossipHello_npc_quest_the_kessel_run;

newscript->RegisterSelf();

Den drei NPC’s würdest du dann npc_quest_the_kessel_run als ScriptName zuweisen

Verstehst du was ich meine? Wäre halt ordentlicher - ist aber natürlich kein Muss /emoticons/default_wink.png

sieht gut aus, werds mal testen…is schlanker und braucht damit auch weniger platz und rechenzeit /emoticons/default_smile.png