Thank you for the support wareagle920
Originally Posted by
Tom_2001
hmm could you show us one or two lines of Simple c++ too prove its yours? im just curiose
What exactly would you like to see Tom?
Here is one of my case structures for the warp stalker menu to learn the warp spell first it checks the players level, then to see if the spell is already learned. I then set the cost of the spell to 60s, set current gold to what the player has in the inventory and then check to see if the player has enough gold. If true then subtracts the 60s from players gold, give confirmation your learned the spell, cheers ands the spell and completes the gossip script.
Code:
case 138: //Warp Spell id 35348
{
//Check if Player meets level requirement
if (Plr->getLevel() >= 60)
{
//Spell Check
if (!Plr->HasSpell(35348))
{
uint32 price = 60000;
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
//gold check
if(currentgold>=price)
{
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have learned Warp");
pCreature->Emote(EMOTE_ONESHOT_CHEER);
Plr->addSpell(35348);
Plr->Gossip_Complete();
}
else
{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I'm sorry, but you do not have the required funds for this training program");
Plr->Gossip_Complete();
}
}
else
{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I'm sorry, but you already know this level of Warp");
Plr->Gossip_Complete();
}
}
else
{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You are not experienced enough to learn this level of Warp");
Plr->Gossip_Complete();
}
}
break;