• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Sql vs. Xml

Or for another example, an wallever.

XML
function onUse(cid, item, frompos, item2, topos)
wall1 = {x=399, y=321, z=8, stackpos=1}
getwall1 = getThingfromPos(wall1)

if item.uid == 7002 and item.itemid == 1945 then
doRemoveItem(getwall1.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 7002 and item.itemid == 1946 then
doCreateItem(3419,1,wall1)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end

return 1
end

And here is SQL. (food)
local text = ""
local nutrition = 0

function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2684 or item.itemid == 2362 or item.itemid == 2691 then
nutrition = 8
text = "Crunch."
elseif item.itemid == 2695 then
nutrition = 6
text = "Gulp."
elseif item.itemid == 2674 then
nutrition = 6
text = "Yum."
elseif item.itemid == 2787 then
nutrition = 9
text = "Munch."
elseif item.itemid == 2690 then
nutrition = 3
text = "Crunch."
elseif item.itemid == 2666 or item.itemid == 7158 then
nutrition = 15
text = "Munch."
elseif item.itemid == 2667 then
nutrition = 12
text = "Munch."
elseif item.itemid == 2668 then
nutrition = 10
text = "Mmmm."
elseif item.itemid == 2689 then
nutrition = 10
text = "Crunch."
elseif item.itemid == 2669 then
nutrition = 17
text = "Munch."
elseif item.itemid == 2670 then
nutrition = 4
text = "Gulp."
elseif item.itemid == 2671 then
nutrition = 30
text = "Chomp."
elseif item.itemid == 2672 then
nutrition = 60
text = "Chomp."
elseif item.itemid == 2673 then
nutrition = 5
text = "Yum."
elseif item.itemid == 2675 then
nutrition = 13
text = "Yum."
elseif item.itemid == 2677 or item.itemid == 2679 then
nutrition = 1
text = "Yum."
elseif item.itemid == 2678 then
nutrition = 18
text = "Slurp."
elseif item.itemid == 2680 then
nutrition = 2
text = "Yum."
elseif item.itemid == 2687 then
nutrition = 2
text = "Crunch."
elseif item.itemid == 2681 then
nutrition = 9
text = "Yum."
elseif item.itemid == 2686 then
nutrition = 9
text = "Crunch."
elseif item.itemid == 2696 then
nutrition = 9
text = "Smack."
elseif item.itemid == 2682 then
nutrition = 20
text = "Yum."
elseif item.itemid == 2683 then
nutrition = 17
text = "Munch."
elseif item.itemid == 2685 then
nutrition = 6
text = "Munch."
elseif item.itemid == 2688 or item.itemid == 2793 then
nutrition = 9
text = "Munch."
elseif item.itemid == 2788 then
nutrition = 4
text = "Munch."
elseif item.itemid == 2789 then
nutrition = 22
text = "Munch."
elseif item.itemid == 2790 or item.itemid == 2791 then
nutrition = 30
text = "Munch."
elseif item.itemid == 2792 then
nutrition = 6
text = "Munch."
elseif item.itemid == 2794 then
nutrition = 3
text = "Munch."
elseif item.itemid == 2795 then
nutrition = 36
text = "Munch."
elseif item.itemid == 2796 then
nutrition = 5
text = "Munch."
elseif item.itemid == 6574 then
nutrition = 4
text = "Mmmm."
elseif item.itemid == 6394 then
nutrition = 4
text = "Mmmm."
elseif item.itemid == 6569 then
nutrition = 1
text = "Mmmm."
elseif item.itemid == 7159 then
nutrition = 13
text = "Munch."
elseif item.itemid >= 7372 and item.itemid <= 7377 then
nutrition = 7
text = "Yum."
end

if (getPlayerFood(cid) + nutrition) > 400 then
doPlayerSendCancel(cid, "You are full.")
else
doPlayerFeed(cid, nutrition * 4)
doCreatureSay(cid, text, TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
end
return TRUE
end


Whats easiest?
 
I wish i could use sql but no one ever showed me :eek: so because im using xml ill say xml :(
 
Sql isnt that hard how many ppl think <.< Its just tricky to setupd :p and ye Sql is way cooler then noblet Xml
 
SQL has every advantage over XML, except one, which is you cant just download it, click the .exe and start.

But once you learn how to use SQL and it's actually not that hard at all, you'll find it's much better.

@ SyncMaster - That SQL script is the cleanest script you'll ever see, in trying to prove your point you actually hurt your purpose :p by the way you should look into working with Michael Moore (the guy who makes all the controversial documentarys) you use the same technique :p
 
Last edited:
SQL has every advantage over XML, except one, which is you cant just download it, click the .exe and start.

But once you learn how to use SQL and it's actually not that hard at all, you'll find it's much better.

@ SyncMaster - That SQL script is the cleanest script you'll ever see, in trying to prove your point you actually hurt your purpose :p by the way you should look into working with Michael Moore (the guy who makes all the controversial documentarys) you use the same technique :p
You mean MySQL. You CAN just download the server and run it with SQLite.
 
Or for another example, an wallever.

XML


And here is SQL. (food)



Whats easiest?

Are you trying to fool the stupid ones or are you stupid?
That is LUA scripts, not SQL, both works on XML servers.
 
I prefer SQL because it's more dificult to hack but XML it's good because it's very easy access
 
Sql = Rpg Servers (store Much Info)
Xml = Pvp Enforced (not Much Info Stored)
 
SQL server is alot better then XML.

The simple reason is that SQL is way faster then XML and takes up more space.

Yours,
Asprate.
 
SQL is much easier to manage when you've got it started. You've got everything in one place instead of 10 different places inside the root-folder. And SQL is as they've said before me, it's much faster and more stable. It's easier to implement AACs to an SQL-database since it will use the same system. I could continue like this for quite a while. But since everyone is bored by now, I'll just make a summary: SQL is better in every way!
 
Back
Top