I want to give proper credits here first before starting off.
Koolk - TitanMS
LaiLaiNoob - Dojo Packet
Orabcd - Level Distinction / Additional Coding
C_plus_plus - Basic Coding
==================================================
Packetcreator.cpp
Add
Packetcreator.hPHP Code:PacketWriter* PacketCreator::environmentChange(string env, int mode) {
pw.writeShort(BOSS_ENV);
pw.write(mode);
pw.writeString(env);
return &pw;
}
PacketWriter* PacketCreator::dojoWarpUp() {
pw.writeShort(DOJO_WARP_UP);
pw.write(0);
pw.write(6);
return &pw;
}
Add
AfterPHP Code:static const short BOSS_ENV = 0x7E;
static const short DOJO_WARP_UP = 0xBD;
AddPHP Code:static const short SPOUSE_CHAT = 0x7C;
AfterPHP Code:PacketWriter* dojoWarpUp();
PacketWriter* environmentChange(string env, int mode);
==================================================PHP Code:PacketWriter* instructionBubble(string msg, short width, short height);
That sets the basic packets and headers for the Animation and WarpUp
-===---=== dojoWarpUp ===---===-
Player.cpp
Add
At the very bottom.PHP Code:void Player::dojoWarpUp() {
send(PacketCreator().dojoWarpUp());
}
Player.h
Add
UnderPHP Code:void dojoWarpUp();
AngelScriptEngine.cppPHP Code:void sendNpc(int npcid, Player *player);
Add
UnderPHP Code:r = pScriptEngine->RegisterObjectMethod("Player","void dojoWarpUp()",
asMETHOD(Player, dojoWarpUp), asCALL_THISCALL); assert(r >= 0);
Dojang_up.asPHP Code:r = pScriptEngine->RegisterObjectMethod("Player","void setTrainingPoints(int)",
asMETHOD(Player, setTrainingPoints), asCALL_THISCALL); assert(r >= 0);
-===---=== dojoAnimation===---===-PHP Code:void portal_main(Player@ player, Portal@ portal){
if(player.getMap().getMobsCount() == 0) { //--- or u can do getMobsCount() > 1
player.dojoWarpUp();
} else {
player.showMessage("There are still some monsters remaining.");
}
}
Player.cpp
Add
AfterPHP Code:void Player::dojoAnimation(){
int map = this->getMap()->getID();
if(MAJOR_TYPE(map) == 92502){
int level = (map/100)%100;
int end = map%10;
if(level == 0){
if(end == 2){
this->send(PacketCreator().environmentChange("Dojang/clear", 4));
this->send(PacketCreator().environmentChange("dojang/end/clear", 3));
}
else
return;
}
else if(((level*10)/6)%10 == 0)//rest levels
return;
else{
this->send(PacketCreator().environmentChange("Dojang/start", 4));
this->send(PacketCreator().environmentChange("dojang/start/stage", 3));
this->send(PacketCreator().environmentChange("dojang/start/number/"+Tools::intToString(level), 3));
}
}
}
Player.hPHP Code:void Player::dojoWarpUp() {
send(PacketCreator().dojoWarpUp());
}
Add
UnderPHP Code:void dojoAnimation();
AngelScriptEngine.cppPHP Code:void dojoWarpUp();
Add
UnderPHP Code:r = pScriptEngine->RegisterObjectMethod("Player","void dojoAnimation()",
asMETHOD(Player, dojoAnimation), asCALL_THISCALL); assert(r >= 0);
Thanks for viewing. =]PHP Code:r = pScriptEngine->RegisterObjectMethod("Player","void dojoWarpUp()",
asMETHOD(Player, dojoWarpUp), asCALL_THISCALL); assert(r >= 0);
-===---=== Additional ===---===-
How to use dojoAnimation and dojoWarpUp
From my experience, dojoWarpUp works only in Dojo maps, so if you just keep my dojang_up.as, it'll warp you up.
If you want to use it elsewhere, add this to a Portal or NPC.
DojoAnimation WILL NOT WORK elsewhere other than Dojo Maps!!!PHP Code:player.dojoWarpUp();
this was released by me in KDev LONG ago...
And I don't really care if you guys don't know what to do with this.
And your a fucking retard if don't know where this goes because I spoonfed you.


Reply With Quote

