chaosnight

Rednightwow Forums
 
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share
 

 Coding what do i need?

Go down 
AuthorMessage
streetdeath
GM
GM
streetdeath

Posts : 23
Join date : 2008-10-02
Age : 27
Location : BOB (england):P

Coding what do i need? Empty
PostSubject: Coding what do i need?   Coding what do i need? Icon_minitimeMon Oct 06, 2008 2:52 pm

what coding do you need so i can try and learn it and help
Back to top Go down
View user profile
Swanitalia
Admin
Admin
Swanitalia

Posts : 161
Join date : 2008-09-22
Location : I dont know

Coding what do i need? Empty
PostSubject: Re: Coding what do i need?   Coding what do i need? Icon_minitimeMon Oct 06, 2008 10:26 pm

really any you can make, but C++ would help the most. But its hard to learn if you do not have any xp with wow C++ this is what i have done with my skills:

#include "StdAfx.h"
#include "Setup.h"


class SCRIPT_DECL DeathKnight : public GossipScript
{
public:
void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
void GossipEnd(Object * pObject, Player* Plr);
void Destroy()
{
delete this;
}
};

void DeathKnight::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
{
if(Plr->CombatStatus.IsInCombat())
{
Plr->BroadcastMessage("You are in combat!|r");
return;
}
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getRace()== 10||Plr->getRace()== 2||Plr->getRace()== 6||Plr->getRace()== 8||Plr->getRace()== 5)
{Menu->AddItem(0, "Transform into DeathKnight", 1);}else{Menu->AddItem(1, "Transform into DeathKnight", 2);}


if(AutoSend)
Menu->SendTo(Plr);
}

void DeathKnight::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
{
switch(IntId)
{
case 0:
{
GossipHello(pObject, Plr, true);
}break;

case 1:/*Horde DeathKnight*/
{
Plr->load_mana=1000;
Plr->SetUInt32Value(UNIT_FIELD_POWER1,15000);
Plr->SetUInt32Value(UNIT_FIELD_MAXPOWER1,15000);
Plr->SetPowerType(POWER_TYPE_MANA);
uint32 mc = Plr->GetUInt32Value(UNIT_FIELD_STAT3);
mc = ((mc-20)*15)+20;
Plr->SetUInt32Value(UNIT_FIELD_MAXPOWER1, mc);
Plr->SetUInt32Value(UNIT_FIELD_POWER1, mc);
Plr->load_mana=mc;
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 16508);
Plr->addSpell(39658);
Plr->addSpell(32422);
Plr->addSpell(32346);
Plr->addSpell(17506);
Plr->addSpell(34637);
Plr->addSpell(32024);
Plr->addSpell(24212);
Plr->addSpell(29930);
Plr->addSpell(36881);
Plr->addSpell(11264);
Plr->addSpell(31045);
Plr->BroadcastMessage("DeathKnight");
Plr->Gossip_Complete();
}break;


case 2:/*Allie DeathKnight*/
{
Plr->load_mana=1000;
Plr->SetUInt32Value(UNIT_FIELD_POWER1,15000);
Plr->SetUInt32Value(UNIT_FIELD_MAXPOWER1,15000);
Plr->SetPowerType(POWER_TYPE_MANA);
uint32 mc = Plr->GetUInt32Value(UNIT_FIELD_STAT3);
mc = ((mc-20)*15)+20;
Plr->SetUInt32Value(UNIT_FIELD_MAXPOWER1, mc);
Plr->SetUInt32Value(UNIT_FIELD_POWER1, mc);
Plr->load_mana=mc;
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 16607);
Plr->addSpell(39658);
Plr->addSpell(32422);
Plr->addSpell(32346);
Plr->addSpell(17506);
Plr->addSpell(34637);
Plr->addSpell(32024);
Plr->addSpell(24212);
Plr->addSpell(29930);
Plr->addSpell(36881);
Plr->addSpell(11264);
Plr->addSpell(31045);
Plr->BroadcastMessage("DeathKnight");
Plr->Gossip_Complete();
}break;


}
};
void DeathKnight::GossipEnd(Object * pObject, Player* Plr)
{

GossipScript::GossipEnd(pObject, Plr);
}

void SetupDeathKnight(ScriptMgr * mgr)
{
GossipScript * dk = (GossipScript*) new DeathKnight();
mgr->register_item_gossip_script(122001, dk);
}



(This is wowblaze like code, mine is a bit diff. But i made this code, (Nate would be so mad lol! )


Last edited by Swanitalia on Mon Oct 06, 2008 10:28 pm; edited 1 time in total (Reason for editing : it was linking)
Back to top Go down
View user profile http://rednight.selfip.net
streetdeath
GM
GM
streetdeath

Posts : 23
Join date : 2008-10-02
Age : 27
Location : BOB (england):P

Coding what do i need? Empty
PostSubject: Re: Coding what do i need?   Coding what do i need? Icon_minitimeTue Oct 07, 2008 12:02 pm

lol nice but holy god thats hard
Back to top Go down
View user profile
sharrior
GM
GM
sharrior

Posts : 78
Join date : 2008-09-25
Age : 23
Location : Norway

Coding what do i need? Empty
PostSubject: Re: Coding what do i need?   Coding what do i need? Icon_minitimeThu Oct 09, 2008 7:28 am

try starting with LUA and SQL,most DB are made by SQL,or MySQL.
Back to top Go down
View user profile
streetdeath
GM
GM
streetdeath

Posts : 23
Join date : 2008-10-02
Age : 27
Location : BOB (england):P

Coding what do i need? Empty
PostSubject: Re: Coding what do i need?   Coding what do i need? Icon_minitimeSat Oct 11, 2008 5:54 pm

lol u what ? Shocked
Back to top Go down
View user profile
sharrior
GM
GM
sharrior

Posts : 78
Join date : 2008-09-25
Age : 23
Location : Norway

Coding what do i need? Empty
PostSubject: Re: Coding what do i need?   Coding what do i need? Icon_minitimeSat Oct 11, 2008 6:35 pm

im no coder !! but the DB are on SQL and LUA was to something else...cant remember.

EDIT: LUA are to scripting bosses,npc etc,it doesnt really have anything to do with DB(info right from Nymphs Razz)
Back to top Go down
View user profile
Sponsored content




Coding what do i need? Empty
PostSubject: Re: Coding what do i need?   Coding what do i need? Icon_minitime

Back to top Go down
 
Coding what do i need?
Back to top 
Page 1 of 1
 Similar topics
-
» Coding

Permissions in this forum:You cannot reply to topics in this forum
chaosnight :: Rednight server forums :: Coding-
Jump to: