Register for your free account! | Forgot your password?

You last visited: Today at 18:48

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE] FIREWORKS

Discussion on [RELEASE] FIREWORKS within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
bimbum*'s Avatar
 
elite*gold: 47
Join Date: Oct 2017
Posts: 580
Received Thanks: 1,023
[RELEASE] FIREWORKS

Gallery 1


HEYYY, BREATHING THE AIR AGIAN, A BEAUTIFUL DAY HUH ?.. SHARING A NEW USELESS THING THAT NOBODY ASKED FORE.

THERE ARE THOUSANDS OF SHAPES AND PATTERNS YOU CAN DO.

PLEASE NOTE THAT USING THAT WAY, YOU WILL HAVE TO DEAL WITH FUNC_37 OF CIPARTICLEOBJECT, IAM NOT REALLY SURE WHATS ITS DOING COULD BE RELATED CURRENT NAV CELL.
YOU WILL HAVE TO CHECK IF THE OBJECT YOU RETURNING 0 FOR WAS THE ACTUAL FIREWORK YOU JUST CREATED

Code:
#if CONFIG_FIREWORKS_SCROLLS
    vftableHook(0xDE1FE4, 37, addr_from_this(&CIParticleObj::Func_37_IMPL));
#endif


int CIParticleObj::Func_37_IMPL(int a2) {
    return 0;
}

class CIParticleObj : public CICharactor {
    GFX_DECLARE_DYNAMIC_EXISTING(CIParticleObj, 0xEEF6D0)

public:
    int Func_37_IMPL(int a2);
};


SOURCES:

Code:
//
// Created by maximus on 1/27/2024.
//

#ifndef SRO_DEVKIT_FIREWORKS_H
#define SRO_DEVKIT_FIREWORKS_H

#include "BSLib/_internal/custom_stl.h"
#include "ICUser.h"

class Fireworks {
};

class CFireworks {
private:
    static CFireworks* instance;
    
    CFireworks();

    CFireworks(const CFireworks&);
    CFireworks& operator=(const CFireworks&);

public:
    static CFireworks& getInstance();

public:
    void DrawSmileyFaceIcon(int size, CICUser* pUser);

    void DrawStarIcon(int size, CICUser* pUser);

    void DrawLine(int size, CICUser* pUser);

    void DrawHumanoidSilhouette(int size, CICUser* pUser);

    void DrawWifiIcon(int size, int rings, float harmonyFactor, CICUser* pUser);

    void DrawCircularGrid(int size, int circles, int divisions, CICUser* pUser);

    void DrawRipple(int size, int circles, CICUser* pUser);

    void DrawTwistedSpirals(int size, float twistiness, CICUser* pUser);

    void DrawGeometricPattern(int size, int sides, CICUser* pUser);

    void DrawConcentricCircles(int size, int circles, CICUser* pUser);

    void DrawWave(int size, CICUser* pUser);

    void DrawAbstractFlower(int size, int petals, CICUser* pUser);

    void DrawSwirl(int size, int arms, CICUser* pUser);

    void DrawSpirograph(int size, int circles, CICUser* pUser);

    void DrawButterfly(int size, CICUser* pUser);

    void DrawSpiral(int size, float tightness, CICUser* pUser);

    void DrawRoseCurve(int size, CICUser* pUser);

    void DrawHeart(int size, CICUser* pUser);

    void Draw(int x, int z, CICUser* pUser);
public:
};


#endif//SRO_DEVKIT_FIREWORKS_H
Code:
//
// Created by maximus on 1/27/2024.
//

#include "Fireworks.h"
#include "CIParticleObj.h"
#include "EntityManagerClient.h"
#include <cmath>

CFireworks *CFireworks::instance = NULL;

CFireworks::CFireworks() {
}

CFireworks &CFireworks::getInstance() {
    if (instance == NULL) {
        instance = new CFireworks;
    }
    return *instance;
}

void CFireworks::Draw(int x, int z, CICUser* pUser) {
    SObjectData *pObjectData;
    pObjectData = new SObjectData();

    pObjectData->nItemId = 69;
    pObjectData->pHandler = pUser;

    pUser->location.x += x;
    pUser->location.z += z;

    g_pGfxEttManager->CreateTemporaryObject(GFX_RUNTIME_CLASS(CIParticleObj), pObjectData);

    pUser->location.x -= x;
    pUser->location.z -= z;

    delete[] pObjectData;
}

void CFireworks::DrawHeart(int size, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 16 * pow(sin(radian), 3) - 80;
        float z = size * (13 * cos(radian) - 5 * cos(2 * radian) - 2 * cos(3 * radian) - cos(4 * radian));

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawRoseCurve(int size, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * cos(6 * radian) * cos(radian);
        float z = size * cos(6 * radian) * sin(radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawSpiral(int size, float tightness, CICUser* pUser) {
    for (float angle = 0.0; angle <= 10 * 3.14159265358979323846; angle += 0.1) {
        float radius = size * exp(tightness * angle);

        float x = radius * cos(angle);
        float z = radius * sin(angle);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawButterfly(int size, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * sin(radian) * (sin(radian) + sin(2 * radian));
        float z = size * 8 * cos(radian) * (sin(radian) + sin(2 * radian));

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawSpirograph(int size, int circles, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * sin(2 * radian) * cos(circles * radian);
        float z = size * 8 * sin(2 * radian) * sin(circles * radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawSwirl(int size, int arms, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * sin(arms * radian) * cos(radian);
        float z = size * 8 * sin(arms * radian) * sin(radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawAbstractFlower(int size, int petals, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * sin(petals * radian) * cos(radian);
        float z = size * 8 * sin(petals * radian) * sin(radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawWave(int size, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * sin(radian);
        float z = size * 8 * sin(2 * radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawConcentricCircles(int size, int circles, CICUser* pUser) {
    for (int circle = 0; circle < circles; ++circle) {
        float radius = size * 8 * circle / circles;

        for (int angle = 0; angle <= 360; angle += 5) {
            float radian = angle * 3.14159265358979323846 / 180.0;

            float x = radius * cos(radian);
            float z = radius * sin(radian);

            Draw(x, z, pUser);
        }
    }
}

void CFireworks::DrawGeometricPattern(int size, int sides, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 360 / sides) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * cos(radian);
        float z = size * 8 * sin(radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawTwistedSpirals(int size, float twistiness, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * sin(twistiness * radian) * cos(radian);
        float z = size * 8 * sin(twistiness * radian) * sin(radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawRipple(int size, int circles, CICUser* pUser) {
    for (int circle = 0; circle < circles; ++circle) {
        float radius = size * 8 * circle / circles;

        for (int angle = 0; angle <= 360; angle += 5) {
            float radian = angle * 3.14159265358979323846 / 180.0;

            float x = radius * cos(radian);
            float z = radius * sin(radian);

            Draw(x, z, pUser);
        }
    }
}

void CFireworks::DrawCircularGrid(int size, int circles, int divisions, CICUser* pUser) {
    for (int circle = 0; circle < circles; ++circle) {
        float radius = size * 8 * circle / circles;

        for (int angle = 0; angle <= 360; angle += 360 / divisions) {
            float radian = angle * 3.14159265358979323846 / 180.0;

            float x = radius * cos(radian);
            float z = radius * sin(radian);

            Draw(x, z, pUser);
        }
    }
}

void CFireworks::DrawWifiIcon(int size, int rings, float harmonyFactor, CICUser* pUser) {
    for (int ring = 0; ring < rings; ++ring) {
        float radius = size * 8 * ring / rings;

        for (int angle = 0; angle <= 360; angle += 10) {
            float radian = angle * 3.14159265358979323846 / 180.0;

            float x = radius * cos(harmonyFactor * radian);
            float z = radius * sin(harmonyFactor * radian);

            Draw(x, z, pUser);
        }
    }
}

void CFireworks::DrawHumanoidSilhouette(int size, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 5) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * sin(radian) * cos(radian);
        float z = size * 8 * (cos(radian) + 1) * sin(radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawLine(int size, CICUser* pUser) {
    for (int y = -size * 8; y <= size * 8; y += 10) {
        float x = 0.0;
        float z = y;

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawStarIcon(int size, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 36) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * cos(radian);
        float z = size * 8 * sin(radian);

        Draw(x, z, pUser);
    }
}

void CFireworks::DrawSmileyFaceIcon(int size, CICUser* pUser) {
    for (int angle = 0; angle <= 360; angle += 10) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * cos(radian);
        float z = size * 8 * sin(radian);

        Draw(x, z, pUser);
    }

    // Draw the left eye
    float eyeSize = size / 8;
    float eyeX = -size / 3;
    float eyeY = size / 4;
    float eyeZ = size / 2 + 15;

    Draw(eyeX - 8, eyeZ, pUser);

    // Draw the right eye
    eyeX = size / 3;

    Draw(eyeX + 8, eyeZ, pUser);


    // Draw the mouth
    float mouthSize = size / 4;
    float mouthY = -size / 4;

    for (int angle = -180; angle <= 0; angle += 10) {
        float radian = angle * 3.14159265358979323846 / 180.0;

        float x = size * 8 * 0.7 * cos(radian);
        float z = size * 8 * 0.3 * sin(radian);

        Draw(x, z - 18, pUser);
    }
}
Code:
CIObject *CEntityManagerClient::CreateTemporaryObject(const CGfxRuntimeClass &pType, SObjectData *pObjectData) {
    return reinterpret_cast<CIObject * (__thiscall *)(CEntityManagerClient* , const CGfxRuntimeClass &pType, SObjectData*)>(0x00BA36D0)(this, pType, pObjectData);
}
Code:
#pragma once
#include "GFXMainFrame/EntityManager.h"
#include "ICUser.h"

struct SObjectData{
    int nItemId;
    CICUser* pHandler;
};

#pragma pack(push, 1)
class CEntityManagerClient : public CEntityManager
{
public:
    char pad_0030[0xC]; //0x0030
    bool m_blTempObjectsEnabled; //0x003C
public:
    CIObject* CreateTemporaryObject(const CGfxRuntimeClass &pType, SObjectData* pObjectData);
};
#pragma pack(pop)

#define g_pGfxEttManager (*(CEntityManagerClient**)0x0110F7D8)
#define g_nLatestCreatedId (*reinterpret_cast<int*>(0x0110F864))
USGAE:

Code:
void CNetProcessIn::OnShowFireworks(CMsgStreamBuffer &msg) {
    DWORD dwUniqueId = msg.Read<DWORD>();
    BYTE btType = msg.Read<BYTE>();

    CICUser *pUser = (CICUser *) GetCharacterObjectByID_MAYBE(dwUniqueId);
    if (!pUser) {
        msg.FlushRemaining();
        return;
    }

    CFireworks &fireworks = CFireworks::getInstance();

    switch (btType) {
        case 0:
            fireworks.DrawSpiral(5, 0.07, pUser);
            break;
        case 1:
            fireworks.DrawHeart(2, pUser);
            break;
        case 2:
            fireworks.DrawButterfly(10, pUser);
            break;
        case 3:
            fireworks.DrawSpirograph(5, 5, pUser);
            break;
        case 4:
            fireworks.DrawSwirl(7, 5, pUser);
            break;
        case 5:
            fireworks.DrawAbstractFlower(10, 3, pUser);
             break;
        case 6:
             fireworks.DrawWave(7, pUser);
             break;
        case 7:
             fireworks.DrawConcentricCircles(10, 5, pUser);
             break;
        case 8:
             fireworks.DrawGeometricPattern(5, 8, pUser);
             break;
        case 9:
             fireworks.DrawTwistedSpirals(8, 1.5, pUser);
             break;
        case 10:
             fireworks.DrawRipple(10, 8, pUser);
             break;
        case 11:
             fireworks.DrawCircularGrid(10, 6, 12, pUser);
             break;
        case 12:
             fireworks.DrawWifiIcon(10, 6, 0.5, pUser);
             break;
        case 13:
             fireworks.DrawHumanoidSilhouette(5, pUser);
             break;
        case 14:
             fireworks.DrawLine(10, pUser);
             break;
        case 15:
             fireworks.DrawSmileyFaceIcon(10, pUser);
             break;
    }
}
EXTRAS:

REMEMBER THAT CREATETEMPORARYOBJECT FUNCTION RETURNS POINTER TO THE CREATED OBJECT.

CIPARTICLEOBJECT -> [0x790] HOW MANY MILLISECONDS TO KEEP THE FIREWORKS RUNNING FOR

CIPARTICLEOBJECT -> [0x794] HOW MANY MILLISECONDS BETWEEN EACH EXPLOSION
bimbum* is offline  
Thanks
18 Users
Old 01/29/2024, 01:56   #2
 
Kled.'s Avatar
 
elite*gold: 0
Join Date: Oct 2021
Posts: 108
Received Thanks: 35
wow
awesome bro <3
Kled. is offline  
Thanks
1 User
Old 01/29/2024, 02:40   #3




 
VORTEX*'s Avatar
 
elite*gold: 1014
Join Date: Apr 2015
Posts: 1,035
Received Thanks: 1,251
i liked VESTA Team and Thresh , thanks for this amazing release ♥
VORTEX* is offline  
Old 01/29/2024, 02:47   #4
 
bimbum*'s Avatar
 
elite*gold: 47
Join Date: Oct 2017
Posts: 580
Received Thanks: 1,023
Quote:
Originally Posted by VORTEX* View Post
i liked VESTA Team and Thresh , thanks for this amazing release ♥
YAAA I JUST PICKED A RANDOM DATABASE FROM THE TURKISH FORUM
bimbum* is offline  
Old 01/29/2024, 14:59   #5


 
*Deadly's Avatar
 
elite*gold: 101
Join Date: Feb 2020
Posts: 425
Received Thanks: 205
Looks good, keep up the good work
*Deadly is offline  
Old 01/29/2024, 20:58   #6
 
geraya.sama's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 67
Received Thanks: 10
good job
geraya.sama is offline  
Old 02/07/2024, 12:18   #7
 
elite*gold: 0
Join Date: May 2014
Posts: 24
Received Thanks: 48
Cool stuff, but why repeat such a long numeric value over again and again in code..

Code:
#define _USE_MATH_DEFINES
#include <math.h>

// 3.14159265358979323846 is PI value
// use: M_PI
Borntotroll is offline  
Old 02/19/2024, 21:10   #8
 
elite*gold: 0
Join Date: Feb 2024
Posts: 8
Received Thanks: 0
Awesome
pain22008 is offline  
Reply


Similar Threads Similar Threads
wts Everlasting crate of fireworks...
03/16/2010 - Guild Wars Trading - 0 Replies
I want to sell my EL Crate of Fireworks... payments by in game items or by paypal !! pm me offers or reply to this thread ...
[Release] Activate Fireworks
02/25/2010 - CO2 PServer Guides & Releases - 28 Replies
this is 100% my work don't spam with useless posts since so many requests i decided to make it very simple just place the code in character.cs below the use item void #region Firwork EndlessLove case 720031: { RemoveItem(I); MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "firework-1love")); }
[Request]Fireworks Function 5165
12/13/2009 - CO2 Private Server - 1 Replies
title says it. The fireworks id are Firework: 720030 EndlessLove: 720031 My wish: 720032 Thanks to whoever makes it and releases it.
Fireworks effects?
08/19/2008 - Conquer Online 2 - 3 Replies
Is there a way to remove the fireworks effects for during firework events? If so what do I need to do. Thanx
Exportiertes PNG/Gif aus PS hat in Fireworks keine
03/01/2006 - General Art - 14 Replies
Hallo! Ich habe mir in PS eine kleine Gfx erstellt und schon in allen möglichen Varianten abgespeichert.. png, gif usw. Hab es auch schon nur in Fireworks probiert.. mit indextransparenz sowie Alphatransparenz.. Mit der Grafik möchte ich in "Verhalten "Bild austauschen" hinzufügen" erreichen.. nur wird die kleine Gfx nicht transparent dargestellt! Also das weisse soll weg!!! An was kann das liegen? So wie auf der Grafik sieht es aus.



All times are GMT +1. The time now is 18:51.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.