Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CPythonObject Eve = GetEve();
- if(!Eve) return 0;
- CPythonObject Session = Eve.GetAttrString("session");
- if(!Session) return 0;
- CPythonObject LocalSvc = Eve.GetAttrString("LocalSvc");
- if(!LocalSvc) return 0;
- CPythonObject LocalGangSvc = LocalSvc.CallFunction("(s)", "gang");
- if(!LocalGangSvc) return 0;
- CPythonObject MoveMember = LocalGangSvc.GetAttrString("MoveMember");
- if(!MoveMember) return 0;
- CPythonObject GetWings = LocalGangSvc.GetAttrString("GetWings");
- if(!GetWings) return 0;
- CPythonObject WingDict = GetWings.CallFunction("()");
- if(!WingDict) return 0;
- CPythonObject WingValues = WingDict.GetAttrString("values");
- if(!WingValues) return 0;
- CPythonList Wings = WingValues.CallFunction("()");
- if(!Wings) return 0;
- CPythonObject SquadDict = Wings.GetItem(0).GetAttrString("squads");
- if(!SquadDict) return 0;
- CPythonObject SquadValues = SquadDict.GetAttrString("values");
- if(!SquadValues) return 0;
- CPythonList Squads = SquadValues.CallFunction("()");
- if(!Squads) return 0;
- CPythonObject Wing = Wings.GetItem(0).GetAttrString("name");
- if(!Wing) return 0;
- CPythonObject Squad = Squads.GetItem(0).GetAttrString("name");
- if(!Squad) return 0;
- char Command[1024];
- sprintf(Command, "print \"%s\"", Wing.AsString().c_str());
- PyRun_SimpleString( Command );
- sprintf(Command, "print \"%s\"", Squad.AsString().c_str());
- PyRun_SimpleString( Command );
Add Comment
Please, Sign In to add comment