Fixed Modern AAC and Tibiarl Layout

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,856
Reaction score
88
Location
Brazil
NOTES:
  1. You will need Page Acces 10 to be admin.
  2. Updated database.sql (I recommend using).
  3. You will need this script to receive shop items.
  4. TUTORIAL: Migrating from Gesior to Modern AAC and How to use Modern AAC.
  5. It is available only v1.5 for free. v1.6 is a paid version. (If you helped make it you can have it for free, just pm me).


Changelog:
Code:
v1
In index.php, changed all "E_ALL" to "E_ALL ^ E_NOTICE" 

v1.2
Fixed issue in /trunk/system/application/controllers/account.php

v1.3
* Fixed guild system (NOTE: You need to be offline when leaving, inviting, kicking players or creating guild)
* IDE Extended again! Even more functions for developers!
* More flexibility
* Upgraded templating engine
* Videos module
* House auction system
* Loads of fixes there and here.
* Blacklisted names when creating a character
* Fixed server status
* Fixed who is online
* Fixed messaging module
* Forum for guilds
* Added shop system

v1.4
* Fixed characters page layout
* Fixed who is online page layout
* Fixed admin page layout
* Fixed shop page layout

v1.5
* Fixed guild page layout
* Changed background artwork
* Fixed issues in guild page
* Fixed issues in account management --now you can undelete characters
* Fixed issues in admin page
* Added commands: add level and add premium points
* Player now receive item from Webshop in depot of his hometown

v1.6
* Added achievements to characters page
* Added vip status to account management and characters page
* Fixed ADD/REMOVE points in Shop Admin
* Added Downloads page like tibia.com
* Fixed page Wars
* Fixed issues in shop
* Fixed Trans. History(shop) layout
* Little fix in Guilds, now player can create, invite, kick guild being online (DISABLE INGAME GUILD)
* Fixed player name in comments of news
* Added files protection, this way nobody can open it directly
* Fixed layout issues in menu

v1.7
* Removed white line bug in layout
* Fixed shop system, no possible to clone points anymore
* Fixed menu Trans. History
* Fixed all layout issues, including account management and create account
* Possibility to sell VIP in shop
* Added Events to Menu
* Added Library to Menu
* Fixed issues in Css and javascript
* Added fansite content box

v1.8
* Fixed Possible Clonning in Shop
* Fixed Redirection on Create Account/Login
* Fixed highscores bug (magic level < 10)

v1.9
* Added lost account interface like tibia.com (with email)
* Automatic payment system (including Paypal and PagSeguro)

v2.0
* Added Game Code System
* Added Payment List to Admin
* Added Confirm Payment with MySQL
Screendshots:
1.jpg
2.jpg
4.jpg
onl.jpg
View attachment 16304
View attachment 16340
View attachment 16435

Downloads:
View attachment database.rar
Mediafire: Modern AAC + Tibiarl layout v1.5
Speedyshare: Modern AAC + Tibiarl layout v1.5

Scan:
VirusTotal

Bug/Missing:
* Vocations are not appearing in Account Management
* Events and Library in Menu are starting opened. (It must start closed as all)
* Make all aac more configurable
 
Last edited:

angelobodj

Lazy OT Researcher
Joined
Dec 24, 2009
Messages
107
Reaction score
3
Location
Spain
Well, I have just uploaded, uncompressed and configured everything and this is what happens now when I access the web for the first time:



This seems a bit odd since I've just changed my server PHP config to v5.3 :blink:

Any ideas?
 

angelobodj

Lazy OT Researcher
Joined
Dec 24, 2009
Messages
107
Reaction score
3
Location
Spain
I made with UniServer and it works in my computer, but when I upload to my server, it says that error message :(
 

angelobodj

Lazy OT Researcher
Joined
Dec 24, 2009
Messages
107
Reaction score
3
Location
Spain
My server offers the possibility to change PHP version, and nowadays I have 5.2, 5.3 and 5.4 versions installed. I tested all and it worked with none of them :/
 
OP
LucasFerraz

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,856
Reaction score
88
Location
Brazil
bump

- - - Updated - - -

Can some moderator may me attach more than 5 screens in this post?
 
OP
LucasFerraz

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,856
Reaction score
88
Location
Brazil
In globalevents.xml add
XML:
<globalevent name="shop" interval="30000" event="script" value="shop.lua"/>
Create in globalevents/scripts a file called shop.lua
Lua:
function doPlayerAddDepotItems(cid, items, town)
	if (not isPlayer(cid)) then
		error("Player not found")
	end
	local town = town or getPlayerTown(cid)
 
	local parcel = doCreateItemEx(ITEM_PARCEL)
	for item, count in pairs(items) do
		if (type(item) == "number") then
			local attritemid = doAddContainerItem(parcel, item, count)
			doItemSetAttribute(attritemid, "description", "This item belongs to ".. getPlayerName(cid) ..".")
			doItemSetAttribute(attritemid, "aid", getPlayerGUID(cid)+10000)
		elseif (type(item) == "string") then
			doAddContainerItem(parcel, getItemIdByName(item), count)
		else
			error("Undefinied type of item name")
		end
	end
 
	return doPlayerSendMailByName(getCreatureName(cid), parcel, town) 
end

function onThink(interval, lastExecution, thinkInterval)

	local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;")
	
		if(result:getID() ~= -1) then
			while(true) do
				cid = getCreatureByName(tostring(result:getDataString("player")))
				product = tonumber(result:getDataInt("product"))
				itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";")
					if isPlayer(cid) then
						local id = tonumber(itemr:getDataInt("item"))
						local tid = tonumber(result:getDataInt("id"))
						local count = tonumber(itemr:getDataInt("count"))
						local tipe = tonumber(itemr:getDataInt("type"))
						local productn = tostring(itemr:getDataString("name"))
							if isInArray({5,8},tipe) then
								if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then
									if isPlayer(cid) then
										received = doPlayerAddDepotItems(cid, {[id]=count})
										if received then
											doPlayerSendTextMessage(cid,19, "You received "..productn.." in depot of your hometown.")
											db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
											doPlayerSave(cid)
										else
											doPlayerSendTextMessage(cid,19, "You need a free slot on container to receive "..productn..".")
										end
									else
										doPlayerSendTextMessage(cid,19, "You need a free container to receive "..productn..".")
									end
								else
									doPlayerSendTextMessage(cid,19, "You need "..getItemWeightById(id, count).." of free capacity to receive "..productn..".")
								end
							elseif isInArray({6,7},tipe) then
									if tipe == 6 then
										bcap = 8
										bid = 1987
									elseif tipe == 7 then
										bcap = 20
										bid = 1988
									end
									if isItemRune(id) then
										count = 1
									end
									if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then
										local bag = doCreateItemEx(bid, 1)
											for i = 1,bcap do
												doAddContainerItem(bag, id, count)
											end
										received = doPlayerAddDepotItems(cid, bag)
										if received == RETURNVALUE_NOERROR then
											doPlayerSendTextMessage(cid,19, "You received "..productn.." in depot of your hometown.")
											db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
											doPlayerSave(cid)
										else
											doPlayerSendTextMessage(cid,19, "You need a free slot on container to receive "..productn..".")
										end
									else
										doPlayerSendTextMessage(cid,19, "You need "..getItemWeightById(id, count).." of free capacity to receive "..productn..".")
									end
							end
					end
				itemr:free()
				if not(result:next()) then
					break
				end
			end
			result:free()
		end
	return true
end
It add aid and description to item.
 
Last edited:

angelobodj

Lazy OT Researcher
Joined
Dec 24, 2009
Messages
107
Reaction score
3
Location
Spain
Still having the PHP problem. Got a solution for that?
It says it needs v5.0.0, and I have 5.3.7, but it still gives an error :S

- - - Updated - - -

Well sry, it needs v5.3.0 and I have 5.3.17 :p
 

ninexin

insane.sytes.net
Joined
Jun 10, 2007
Messages
213
Reaction score
3
Location
Brazil
Help i get this error!

A Database Error Occurred
Error Number: 1146

Table 'fbrenga.newsticker' doesn't exist

SELECT * FROM (`newsticker`) ORDER BY `id` desc LIMIT 10
 

Taste

New Member
Joined
Apr 6, 2012
Messages
81
Reaction score
5
SQL:
	CREATE TABLE `newsticker` (
	 `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
	 `date` INT(11) NOT NULL ,
	 `text` TEXT NOT NULL 
	) ENGINE=MYISAM ;
 
Top