Untitled
unknown
plain_text
a year ago
14 kB
0
Indexable
Never
else if (actual_command == "/proxy" || actual_command == "/relog" || actual_command.substr(0, 4) == "/wd " || actual_command.substr(0, 4) == "/dd " || actual_command.substr(0, 4) == "/bd " || actual_command.substr(0, 4) == "/gd " || actual_command == "/daw" || actual_command == "/wrench" || actual_command == "/mode" || actual_command == "/fd" || actual_command == "/ft") { if (pInfo(peer)->proxy) { if (actual_command == "/proxy") { gamepacket_t p; p.Insert("OnDialogRequest"); p.Insert("set_default_color|`0\nadd_label_with_icon|big|`9Welcome to Proxy `6(v1.1)|left|6102|\nadd_smalltext|Hello " + (not pInfo(peer)->d_name.empty() ? pInfo(peer)->d_name : pInfo(peer)->tankIDName) + ", This proxy was made by `8Xoid``|\nadd_spacer|small|\nadd_textbox|`$Drop Commands:|\nadd_smalltext|`^/wd <amount>``- `@Drop World Locks|\nadd_smalltext|`^/dd <amount>``- `@Drop Diamond Locks|\nadd_smalltext|`^/bd <amount>``- `@Drop Blue Gem Locks|\nadd_smalltext|`^/gd <amount>``- `@Golden Blue Gem Locks|\nadd_smalltext|`^/daw ``- `@Drop All Locks|\nadd_spacer|small|\nadd_textbox|`$Options:|\nadd_smalltext|`^/wrench ``- `@Open Wrench Options Page|\nadd_spacer|small|\nadd_textbox|`$Fast Systems:|\nadd_smalltext|`^/relog ``- `@Leave and Join Current World|\nadd_smalltext|`^/fd ``- `@Fast Drop|\nadd_smalltext|`^/ft ``- `@Fast Trash|\nadd_spacer|small|\nadd_textbox|`$Host Commands:|\nadd_smalltext|`^/pos1 ``- `@Set Position 1|\nadd_smalltext|`^/pos2 ``- `@Set Position 2|\nadd_smalltext|`^/tppos ``- `@Set Tp Back Position|\nadd_smalltext|`^/tp ``- `@Tp to Saved Positions|\nadd_smalltext|`^/win1 <amount> ``- `@Drop amount to Position 1 (only works with DL)|\nadd_smalltext|`^/win2 <amount> ``- `@Drop amount to Position 2 (only works with DL)|\nadd_spacer|small|\nend_dialog|sellstuff|Cancel||\nadd_quick_exit|\n"); p.CreatePacket(peer); } if (actual_command == "/relog") { string name = pInfo(peer)->world; gamepacket_t p; bool passed = true; p.Insert("OnConsoleMessage"); if (pInfo(peer)->warp_time + 60000 < (duration_cast<milliseconds>(system_clock::now().time_since_epoch())).count()) pInfo(peer)->warp_time = (duration_cast<milliseconds>(system_clock::now().time_since_epoch())).count(); else { p.Insert("`4Cooldown active`` - You can use `5/relog`` in `5few min"); passed = false; } if (passed) { exit_(peer, true); join_world(peer, name); } else p.CreatePacket(peer); } if (actual_command == "/ft") { if (pInfo(peer)->cheat_trash) { pInfo(peer)->cheat_trash = false; gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("`oFast Trash `4Disabled``"); p.CreatePacket(peer); return; } pInfo(peer)->cheat_trash = true; gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("`oFast Trash `2Activated``"); p.CreatePacket(peer); } if (actual_command == "/fd") { if (pInfo(peer)->cheat_drop) { pInfo(peer)->cheat_drop = false; gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("`oFast Drop `4Disabled``"); p.CreatePacket(peer); return; } pInfo(peer)->cheat_drop = true; gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("`oFast Drop `2Activated``"); p.CreatePacket(peer); } if (actual_command == "/wrench") { gamepacket_t p; p.Insert("OnDialogRequest"); p.Insert("set_default_color|`o\nadd_label_with_icon|big|`9Wrench Mode``|left|32|\n" "add_spacer|small|\n" "add_checkbox|nocip_1_1|`cPull `5Mode|" + (string(pInfo(peer)->cheat_pull ? "1" : "0")) + "\n" "add_checkbox|nocip_1_2|`cKick `5Mode|" + (string(pInfo(peer)->cheat_kick ? "1" : "0")) + "\n" "add_checkbox|nocip_1_3|`cBan `5Mode|" + (string(pInfo(peer)->cheat_ban ? "1" : "0")) + "\n" "add_spacer|small|\n" "add_quick_exit|\n" "end_dialog|wrenchs_1_1|Cancel|Apply Options|"); p.CreatePacket(peer); } if (actual_command.substr(0, 4) == "/wd ") { vector<string> a_ = explode(" ", cmd); if (a_.size() != 2) return; if (not isdigit(a_[1][0])) return; int xoidsiker = atoi(a_[1].c_str()); int c_ = xoidsiker * -1; if (modify_inventory(peer, 242, c_) == 0) { WorldDrop drop_block_{}; drop_block_.x = (pInfo(peer)->state == 16 ? pInfo(peer)->x - ((rand() % 12) + 18) : pInfo(peer)->x + ((rand() % 12) + 22)), drop_block_.y = pInfo(peer)->y + rand() % 16, drop_block_.id = 242, drop_block_.count = xoidsiker, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); } else { gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("You don't have that many World Locks."); p.CreatePacket(peer); return; } } if (actual_command.substr(0, 4) == "/dd ") { vector<string> a_ = explode(" ", cmd); if (a_.size() != 2) return; if (not isdigit(a_[1][0])) return; int xoidsiker = atoi(a_[1].c_str()); int c_ = xoidsiker * -1; if (modify_inventory(peer, 1796, c_) == 0) { WorldDrop drop_block_{}; drop_block_.x = (pInfo(peer)->state == 16 ? pInfo(peer)->x - ((rand() % 12) + 18) : pInfo(peer)->x + ((rand() % 12) + 22)), drop_block_.y = pInfo(peer)->y + rand() % 16, drop_block_.id = 1796, drop_block_.count = xoidsiker, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); } else { gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("You don't have that many Diamond Locks."); p.CreatePacket(peer); return; } } if (actual_command.substr(0, 4) == "/bd ") { vector<string> a_ = explode(" ", cmd); if (a_.size() != 2) return; if (not isdigit(a_[1][0])) return; int xoidsiker = atoi(a_[1].c_str()); int c_ = xoidsiker * -1; if (modify_inventory(peer, 7188, c_) == 0) { WorldDrop drop_block_{}; drop_block_.x = (pInfo(peer)->state == 16 ? pInfo(peer)->x - ((rand() % 12) + 18) : pInfo(peer)->x + ((rand() % 12) + 22)), drop_block_.y = pInfo(peer)->y + rand() % 16, drop_block_.id = 7188, drop_block_.count = xoidsiker, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); } else { gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("You don't have that many Blue Gem Locks."); p.CreatePacket(peer); return; } } if (actual_command.substr(0, 4) == "/gd ") { vector<string> a_ = explode(" ", cmd); if (a_.size() != 2) return; if (not isdigit(a_[1][0])) return; int xoidsiker = atoi(a_[1].c_str()); int c_ = xoidsiker * -1; if (modify_inventory(peer, 8470, c_) == 0) { WorldDrop drop_block_{}; drop_block_.x = (pInfo(peer)->state == 16 ? pInfo(peer)->x - ((rand() % 12) + 18) : pInfo(peer)->x + ((rand() % 12) + 22)), drop_block_.y = pInfo(peer)->y + rand() % 16, drop_block_.id = 8470, drop_block_.count = xoidsiker, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); } else { gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("You don't have that many Golden Gem Locks."); p.CreatePacket(peer); return; } } if (actual_command == "/daw") { int c_ = 0; int c2_ = 0; int c3_ = 0; int c4_ = 0; modify_inventory(peer, 242, c_); modify_inventory(peer, 1796, c2_); modify_inventory(peer, 7188, c3_); modify_inventory(peer, 8470, c4_); int removec_ = c_ * -1; if (modify_inventory(peer, 242, removec_) == 0) { WorldDrop drop_block_{}; drop_block_.x = (pInfo(peer)->state == 16 ? pInfo(peer)->x - ((rand() % 12) + 18) : pInfo(peer)->x + ((rand() % 12) + 22)), drop_block_.y = pInfo(peer)->y + rand() % 16, drop_block_.id = 242, drop_block_.count = c_, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); } int removec2_ = c2_ * -1; if (modify_inventory(peer, 1796, removec2_) == 0) { WorldDrop drop_block_{}; drop_block_.x = (pInfo(peer)->state == 16 ? pInfo(peer)->x - ((rand() % 12) + 18) : pInfo(peer)->x + ((rand() % 12) + 22)), drop_block_.y = pInfo(peer)->y + rand() % 16, drop_block_.id = 1796, drop_block_.count = c2_, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); } int removec3_ = c3_ * -1; if (modify_inventory(peer, 7188, removec3_) == 0) { WorldDrop drop_block_{}; drop_block_.x = (pInfo(peer)->state == 16 ? pInfo(peer)->x - ((rand() % 12) + 18) : pInfo(peer)->x + ((rand() % 12) + 22)), drop_block_.y = pInfo(peer)->y + rand() % 16, drop_block_.id = 7188, drop_block_.count = c3_, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); } int removec4_ = c4_ * -1; if (modify_inventory(peer, 8470, removec3_) == 0) { WorldDrop drop_block_{}; drop_block_.x = (pInfo(peer)->state == 16 ? pInfo(peer)->x - ((rand() % 12) + 18) : pInfo(peer)->x + ((rand() % 12) + 22)), drop_block_.y = pInfo(peer)->y + rand() % 16, drop_block_.id = 8470, drop_block_.count = c3_, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); } } } } else if (actual_command == "/pos1" || actual_command == "/pos2" || actual_command == "/tppos" || actual_command == "/tp" || actual_command.substr(0, 6) == "/win1 " || actual_command.substr(0, 6) == "/win2 " && pInfo(peer)->proxy) { if (pInfo(peer)->proxy) { if (actual_command == "/pos1") { pInfo(peer)->pos1x = pInfo(peer)->x / 32; pInfo(peer)->pos1y = pInfo(peer)->y / 32; gamepacket_t p; p.Insert("OnTalkBubble"), p.Insert(pInfo(peer)->netID), p.Insert("`2Pos1 `0Saved!"), p.Insert(0), p.Insert(1), p.CreatePacket(peer); } if (actual_command == "/pos2") { pInfo(peer)->pos2x = pInfo(peer)->x / 32; pInfo(peer)->pos2y = pInfo(peer)->y / 32; gamepacket_t p; p.Insert("OnTalkBubble"), p.Insert(pInfo(peer)->netID), p.Insert("`2Pos2 `0Saved!"), p.Insert(0), p.Insert(1), p.CreatePacket(peer); } if (actual_command == "/tppos") { pInfo(peer)->tpx = pInfo(peer)->x / 32; pInfo(peer)->tpy = pInfo(peer)->y / 32; gamepacket_t p; p.Insert("OnTalkBubble"), p.Insert(pInfo(peer)->netID), p.Insert("`2Tp Pos `0Saved!"), p.Insert(0), p.Insert(1), p.CreatePacket(peer); } int pos1x = pInfo(peer)->pos1x; int pos1y = pInfo(peer)->pos1y; int pos2x = pInfo(peer)->pos2x; int pos2y = pInfo(peer)->pos2y; int tpx = pInfo(peer)->tpx; int tpy = pInfo(peer)->tpy; int pos1x1 = pInfo(peer)->pos1x - 1; int pos2x1 = pInfo(peer)->pos2x - 1; if (actual_command.substr(0, 6) == "/win1 ") { vector<string> a_ = explode(" ", cmd); if (a_.size() != 2) return; if (not isdigit(a_[1][0])) return; int xoidsiker = atoi(a_[1].c_str()); int c_ = xoidsiker * -1; gamepacket_t p1(1, pInfo(peer)->netID); p1.Insert("OnSetPos"); p1.Insert(float(pos1x * 32), float(pos1y * 32)); p1.CreatePacket(peer); { gamepacket_t p; p.Insert("OnTalkBubble"), p.Insert(pInfo(peer)->netID), p.Insert("`2Successfully `0droped lock!"), p.Insert(0), p.Insert(1), p.CreatePacket(peer); if (modify_inventory(peer, 1796, c_) == 0) { WorldDrop drop_block_{}; drop_block_.x = pos1x1 * 32; drop_block_.y = pos1y * 32; drop_block_.id = 1796, drop_block_.count = xoidsiker, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); gamepacket_t ps(100, pInfo(peer)->netID); ps.Insert("OnSetPos"); ps.Insert(float(tpx) * 32, float(tpy) * 32); ps.CreatePacket(peer); } else { gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("You don't have that many Diamond Locks."); p.CreatePacket(peer); return; } } } if (actual_command.substr(0, 6) == "/win2 ") { vector<string> a_ = explode(" ", cmd); if (a_.size() != 2) return; if (not isdigit(a_[1][0])) return; int xoidsiker = atoi(a_[1].c_str()); int c_ = xoidsiker * -1; gamepacket_t p1(1, pInfo(peer)->netID); p1.Insert("OnSetPos"); p1.Insert(float(pos2x * 32), float(pos2y * 32)); p1.CreatePacket(peer); { gamepacket_t p; p.Insert("OnTalkBubble"), p.Insert(pInfo(peer)->netID), p.Insert("`2Successfully `0droped lock!"), p.Insert(0), p.Insert(1), p.CreatePacket(peer); if (modify_inventory(peer, 1796, c_) == 0) { WorldDrop drop_block_{}; drop_block_.x = pos2x1 * 32; drop_block_.y = pos2y * 32; drop_block_.id = 1796, drop_block_.count = xoidsiker, drop_block_.uid = uint16_t(world_->drop.size()) + 1; dropas_(world_, drop_block_); gamepacket_t ps(100, pInfo(peer)->netID); ps.Insert("OnSetPos"); ps.Insert(float(tpx) * 32, float(tpy) * 32); ps.CreatePacket(peer); } else { gamepacket_t p; p.Insert("OnConsoleMessage"); p.Insert("You don't have that many Diamond Locks."); p.CreatePacket(peer); return; } } } if (actual_command == "/tp") { gamepacket_t p1(1, pInfo(peer)->netID); p1.Insert("OnSetPos"); p1.Insert(float(pos1x * 32), float(pos1y * 32)); p1.CreatePacket(peer); { gamepacket_t p2(700, pInfo(peer)->netID); p2.Insert("OnSetPos"); p2.Insert(float(pos2x * 32), float(pos2y * 32)); p2.CreatePacket(peer); { gamepacket_t p3(800, pInfo(peer)->netID); p3.Insert("OnSetPos"); p3.Insert(float(tpx * 32), float(tpy * 32)); p3.CreatePacket(peer); { gamepacket_t p4; p4.Insert("OnTalkBubble"), p4.Insert(pInfo(peer)->netID), p4.Insert("`2Auto `0Collected!"), p4.Insert(0), p4.Insert(1), p4.CreatePacket(peer); } } } } } }