Archive

Posts Tagged ‘Development’

KCP : A RO server control panel

May 29th, 2010

** For discussion about the CP, please go to this link here: http://www.eathena.ws/board/index.php?showtopic=205355

A little intro
  Well, I’ve been a member here since 2005. I’ve been using eathena for quite a while, used a few scripts released here, clients, graphics and such. So I think it’s time I give something back to the community. And as a PHP developer and an ex-graphics designer, I’ve decided to make a control panel for RO :D The aim of this project is to produce a feature-rich, fully functional control panel that looks good enough to be used as main web page (for those server owners who just can’t be bothered :D )
Also, the CP will be developed using object oriented style (for maintainability etc), this will help me develop my skills as a PHP developer. So you guys get a CP, I improved my skill. Everyone happy. YAY! :0

Now, I’m not saying that my CP will be the best, nor am I trying to compete with other CP in any way. I’m just giving the community an alternative

** This project is also used as part of the research for my dissertation. ~powered by Zend Framework!

Downloads:
There are 3 part of the download. The first is the main application: KCP 0.1
**For those who use MD5 passwords on their server, please also download this patch, and replace the files in the corresponding folders: KCP 0.1 MD5 patch

Part 2 is the Zend Framework. Download the Minimal package from here: Zend Framework

Part 3 is optional. If you would like to display item icon/pictures in the donation page etc. You will need to download this package: Item icons and images
Or you could download this package and upload only the images that you will use (recommended if you don’t have a lot of space)

Installation:
Inside the KCP-01.zip, there are 4 folders. application and library are to be placed 1 level ABOVE your public folder (your “public” folder can sometimes be called public_html, public_www, www or similar, depending on your host. It is the where your domain name points to). The content inside the public folder are to be placed in the “public” folder on your host.

So the folder structure should be something like this (assuming that your public folder is called public_html):

/root
|-application
|-library
`-public_html
  |-css
  |-img
  |-.htaccess
  |-charimg.php
  |-favicon.ico
  |-index.php
  `-j.js

when you have finished downloading Zend Framework Minimal package (around 5MB), extract Zend folder from:
ZendFramwork-1.10.5-minimal/library
This folder need to be uploaded to the library folder on your host (which is located 1 level above public folder)
*the Zend folder is about 25MB when extract, so it will be faster if you extract it, rezip it and upload to your host. You can then upzip it on your host (if your host allows it)

your folder structure would look like this:
/root
|-application
|-library
|  `-Zend
`-public_html
  |-css
  |-img
  |-.htaccess
  |-charimg.php
  |-favicon.ico
  |-index.php
  `-j.js

Lastly, if you chose to download the items icons and pictures, upload item.zip to public/img (and extract on your host). Your folder structure will now look like this:

/root
|-application
|-library
|  `-Zend
`-public_html
  |-css
  |-img
  |  `-item
  |    |-Collection
  |    `-Icons
  |-.htaccess
  |-charimg.php
  |-favicon.ico
  |-index.php
  `-j.js

Next~ You need to setup the MySQL tables. You Must already have setup your MySQL database for your RO server AND have imported the item_db table (the file is available in sql-files folder included with the server svn download)

In KCP-01.zip, inside the sql folder is a sql file that you need to import (This file is about 1MB big as it includes descriptions for every items), which will create 8 tables

After the table setup is done, you need to configure the application itself. To do this you have to edit 2 files, application.ini and config.ini. Both can be found in application/congif folder (located 1 level above public folder)
In application.ini file, you need to change:
resources.db.params.host (if not localhost)
resources.db.params.username
resources.db.params.password
resources.db.params.dbname
phpSettings.date.timezone too if you like

In config.ini file, you need to change everything. All of them are self-explanatory. Ones that aren’t so obvious are donation.rate (amount of donation points given per 1 unit of real money, like $1), donation.term (is what you call your donation points)
vote.links (number of vote banners that you want to display on the vote page. Make sure that are equal number of vote link/image, for example, if your vote.links = 1, then you need to define vote.link1 and vote.img1. If your vote.link = 2. Then you need vote.link1, vote.img1, vote.link2 and vote.img2)
Vote.ppl is the amount points given per vote.

This should work~ I have tried installing a fresh copy of the CP as I have written here, and everything works, so you shouldn’t have any problem :D

Credits:
Thanks to shidobu, racionais and Fortran, who tested the CP extensively :D
Thanks to other people who helped tested the CP (but didn’t mention it in my thread ^^;)
Thanks to Developers at Zend for great framework
<3

admin Website Development Project , , , , ,

AWSM-Shopping

June 13th, 2009

AWSM-Shopping is a script I have developed for my final year project. The finished product is an integration between the website (which I have developed) and an office software (developed in C# by other team member). The template system is based on a search-and-replace model, which makes it very easy to change and create a template. Modules at the left can be added or taken away very easily as well :)

Still waiting for the grade :S

admin Design Work, Website Development Project , , , , , , , ,

Equipment Set Bonus

February 11th, 2009


Equipment Set Bonus

Version 1.4
Author: Lettuce

Release Date: 10 July 2008

Introduction

In games like Flyff (and WoW?) when a player equips a certain combination of armors, they gain some additional stats/hp/mp whatever. This script mimics that <3

Features

-Additional stats when an actor is equipped with armors of the same set
-Set Names : You can see if an item belongs to a set
-If the actor is equipped with equipments from different sets, all the bonus are added up together

Script

Equipment Set Bonus Script

Customization

Instructions at the top of the script

ADDITIONAL SCRIPT:

this will display the bonus in the Status page

FontSize_Header = 20
FontSize = 12
X_position = 150
Y_position = 285
LineHeight = 15
 
class Window_Status < Window_Base
alias show_set_bonus_refresh refresh
  def refresh
    show_set_bonus_refresh
    draw_set_bonus(@actor)
  end
  def draw_set_bonus(actor)
    self.contents.font.color = system_color
    self.contents.font.size = FontSize_Header
    self.contents.draw_text(X_position,Y_position,100,WLH,"Set Bonus")
    self.contents.font.color = normal_color
 
    sets = actor.bonus_set #array with the sets listing
    set_pieces = actor.bonus_set_pieces # array with pieces number for each set
    bonus_set = [0,0,0,0,0,0,0,0,0] #different attribute listing
    for i in 0...sets.size
      bonus_array = Set_Bonus[sets[i]] #array with bonus
      pieces = set_pieces[i] #how many pieces
      for j in 0...pieces
        bonus_set[bonus_array[j][0]] += bonus_array[j][1] # [att,amount]
      end
    end
 
 
 
    #bonus_set = Set_Bonus[actor.bonus_set] #array of bonusses
    #bonus_pieces = actor.bonus_set_pieces #number of pieces
    y_pos = Y_position + 6
    self.contents.font.size = FontSize
    for i in 1...bonus_set.size
      y_pos += LineHeight if !(bonus_set[i] <= 0)
      self.contents.draw_text(X_position,y_pos,100,LineHeight,print_set_bonus([i,bonus_set[i]])) if !(bonus_set[i] <= 0)
    end    
  end
  def print_set_bonus(bonus_set)
    case bonus_set[0]
    when 1 then word = Vocab::atk
    when 2 then word = Vocab::def
    when 3 then word = Vocab::spi
    when 4 then word = Vocab::agi
    when 5 then word = Vocab::hp
    when 6 then word = Vocab::mp
    when 7 then word = "Critical"
    when 8 then word = "Evasion"
    end
    return word + " " + bonus_set[1].to_s + "%"
  end
end

Compatibility

This script rewrites def change_equip(equip_type, item, test = false).
If you have any other script that does something with def change_equip (alias or rewrite), just add this right before the “end” of that method

@bonus_set = []
    for i in 1..Sets.size
      weapons = [nil,Sets[i][0]]
      armors = [Sets[i][1],Sets[i][2],Sets[i][3],Sets[i][4]]
      if Sets[i].include?(@weapon_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
      if Sets[i].include?(@armor4_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
      if Sets[i].include?(@armor3_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
      if Sets[i].include?(@armor2_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
      if Sets[i].include?(@armor1_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
    end
    @bonus_set_pieces = []
    for i in 0...@bonus_set.size
      @bonus_set_pieces.push(0)
    end
    if !@bonus_set.empty?
      for i in 0...@bonus_set.size
        weapons = [nil,Sets[@bonus_set[i]][0]]
        armors = [Sets[@bonus_set[i]][1],Sets[@bonus_set[i]][2],
                  Sets[@bonus_set[i]][3],Sets[@bonus_set[i]][4]]
        @bonus_set_pieces[i] += weapons.include?(@weapon_id) ? 1 : 0
        @bonus_set_pieces[i] += armors.include?(@armor1_id) ? 1 : 0
        @bonus_set_pieces[i] += armors.include?(@armor2_id) ? 1 : 0
        @bonus_set_pieces[i] += armors.include?(@armor3_id) ? 1 : 0
        @bonus_set_pieces[i] += armors.include?(@armor4_id) ? 1 : 0
      end
    end

Screenshot

Can’t really take one XD

DEMO

Equipment Set Bonus Demo

Installation

Place this script before Main

FAQ

-none for now-

Terms and Conditions

Gimme credit, damnit :{}

admin RMVX Scripts , , , ,

ScriptArchive 1.2

February 1st, 2009

ScriptArchive 1.2

Completed on: February 2008

About

Just a website to keep track of scripts for RPG Maker. PHP, CSS, HTML and the usual :)

script-thumbScriptArchive 1.2

Link to website:

Clickie

admin Website Development Project , , , , , , ,

EBOOC - Website Project

February 1st, 2009

EBOOC

Completed in: November 2008

ebooc-thumbEBOOC

About

This is a website I have developed for my university project. It contains quite a few popular elements of website development. The website mainly powered by PHP. Administration area have AJAX based interfaces. The whole website is styled 100% by CSS and every page have been validated to XHTML 1.0 strict standard.
I’ve also thrown in a Flash button :P and a dynamic RSS feed.

Link to the website

Click here~

admin Website Development Project , , , , , , , ,