• 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!

GOD Book

Status
Not open for further replies.

Lava Titan

Developer
Joined
Jul 25, 2009
Messages
1,529
Solutions
1
Reaction score
85
Location
Portugal
Hey otland!I'm requesting a GOD Book. (Script)

When ppl use this book they will be turned into GOD's

Item ID: 1970

Thank you if you help!
All the help will be accepted!:D
 
Im in a rush right now so I cant make the full script but this (or similar) is what you need on your onUse script:

PHP:
db.executeQuery("UPDATE `players` SET `group_id` = '6' WHERE `name` = " .. getCreatureName(cid) .. ")

But why do you want an item that makes GODs anyway :p

Cheerz.
 
Last edited:
@up
war server?
final quest?
he or she is a noob? xd
 
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="God Book" version="1.0" author="Syntax" contact="[email protected]" enabled="yes">
		<description>
		Adds a book that promotes player to higher groupID when used.
		</description>
		<item id="1970" article="a" name="god book" override="yes"/>
                <action itemid="1970" event="script"><![CDATA[
                function onUse(cid)
			if getPlayerGroupId(cid) ~= 6 then
				doPlayerSetGroupId(cid, 6)
			else
				doPlayerSendCancel(cid, "You are already a God!")
				return false
			end
                return true
                end
        ]]></event>
</mod>

EDIT: just make a file named godbook.xml and paste this code in it. Place it in your Mods folder.
 
Hardcored

Lmao syntax thats to big xD i already got it

GOD Book SCRIPT:

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    setPlayerGroupId(cid, 6)
    doCreatureSay(cid, "You are a GOD now!!!" ,19)
    return doRemoveItem(item.uid)
end

:D
 
Lmao syntax thats to big xD i already got it

HARDCORED SCRIPT:

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    setPlayerGroupId(cid, 6)
    doCreatureSay(cid, "You are a GOD now!!!" ,19)
    return doRemoveItem(item.uid)
end

:D

HARDCORED? = Hardcoded? :confused:
 
Ye i know to make GOD on the database but i'm lazy to go on the database and make myself GOD or the other ppl...
So i made the GOD, CM, GM, Senior Tutor and Tutor book for my serv lol.
 
how is mine too big...its basically the same size as yours...more efficient as well with a check.. And its a mod file for easy installation. Also it changes the item name ingame. Last time I fuckin help anyone on this section. You requested it, I gave you a perfectly fine script (unless you find a bug) and you don't want it. You wasted my time.

EDIT:
Lua:
 function onUse(cid)
                        if getPlayerGroupId(cid) ~= 6 then
                                doPlayerSetGroupId(cid, 6)
                        else
                                doPlayerSendCancel(cid, "You are already a God!")
                                return false
                        end
                return true
                end

is the actual code...
 
how is mine too big...its basically the same size as yours...more efficient as well with a check.. And its a mod file for easy installation. Also it changes the item name ingame. Last time I fuckin help anyone on this section. You requested it, I gave you a perfectly fine script (unless you find a bug) and you don't want it. You wasted my time.

EDIT:
Lua:
 function onUse(cid)
                        if getPlayerGroupId(cid) ~= 6 then
                                doPlayerSetGroupId(cid, 6)
                        else
                                doPlayerSendCancel(cid, "You are already a God!")
                                return false
                        end
                return true
                end

is the actual code...

Dont! She probably just doesnt know what MODS are, thats why she saw the code "too big" and wanted to sound smartass by saying so, or whatever. Dont quit helping :p
 
lmao a big code or a small code that helps the same i just need to copy and paste lmao...
i just could understand more the other one that was easiest that this one that was confused for me...
 
I edit the code and now it looks better =)

Code:
 function onUse(cid, item, frompos, item2, topos)
                        if getPlayerGroupId(cid) ~= 6 then
                                doPlayerSetGroupId(cid, 6)
			              doCreatureSay(cid, "You have been promoted to God.", TALKTYPE_ORANGE_1)
			              doSendMagicEffect(getCreaturePosition(cid), 14)
                                doRemoveItem(item.uid)
                        else
                                doCreatureSay(cid, "You are already a God!", TALKTYPE_ORANGE_1)
                                return true
                        end
                return 1
                end
 
Last edited:
Status
Not open for further replies.
Back
Top