Ok i've now released my hub script.
ok i had to edit this post due to problems with users getting the files so you can download it from the link below...
http://dchubad.sytes.net/dchubad/viewtopic.php?t=415
sorry about this peeps, hope its worth it after all this :)
thanks
ruler
needs a name and password to dl this files
Quote from: ruler on 11 September, 2006, 02:13:30
Thunder.lua (http://dchubad.sytes.net/download/Thunder.lua) right click and save link as.
This link don't work for me,...
pls upload to the script db (http://ptxscriptdb.psycho-chihuahua.net/) :)
sorry about that peeps, should be ok now ::)
stil dosent work for me add it as atachment always works :)
Quote from: Herodes on 11 September, 2006, 08:36:28
This link don't work for me,...
pls upload to the script db (http://ptxscriptdb.psycho-chihuahua.net/) :)
scriptdb isnt there anymore ;) it has a new addy
http://scriptdb.ptokax.ath.cx
ok had to adit the first post but you should be able to get it from there now, sorry about the hastle :(
Here as an attachment is one to make it easy for noobs to understand whats needed to do ;)
All files where there needed to be - just did this cause i know there are ppl who don't read instructions.
np at all looks good :)
there was a small problem when trying to upload the Profiles.xml here (which is needed) so i compressed it as rar and tried to upload it again but now the forum is telling me that there is already a file uploaded with that name even though it doesnt show, strange.
the Profiles.xml is needed or the script will not function correctly
0:42:51] <T?M??r?V?ll?R> !hublist
[10:43:25] <T?M??r?V?ll?R> !dchubad
they show in main command works tho ;)
those links can be changed to suit the users preferences :) it was the Profiles.xml i was worried about because the script will depend on that. i reconfigured the profiles so that they were in numerical order being that Owner was the higher rank but the lower value down to the Reg being a lower rank but with a higher value. that made it easier to compare ranks against each other when doing checks.
i tried not use use tables or any complicated code so that newbies would have a little chance of understanding the simple side of LUA when learning to code. also lastly i blocked all those anoying 'You are being kicked Because: ' and ' <op> is kicking <victim> because: ' messages when a user tries to kick a higher rank user of a user of the same rank. same for the redirects too :) im sure it will save a few arguments is some hubs ;D ive tried to kick others by mistake in the past but although they were not kicked they still got that anoying message so now its solved.
Posted on: 11 September 2006, 12:32:55
ok there is a small bug in that script, a stupid one if that :-[
the fix ;D
open Thunder.lua
find. line >>>>> if (cmd=="!nickban" or cmd=="!ban" or cmd=="!tempban" or cmd=="!fulltempban" or cmd=="!nicktempban" or cmd=="!drop" or cmd=="!getinfo" or cmd=="!gag" or cmd=="!ungag" ) then
2 lines after find line >> if GetItemByName(nick).iProfile > user.iProfile then
replace that line with >>> if GetItemByName(nick).iProfile == -1 or GetItemByName(nick).iProfile > user.iProfile then
save and restart scripts ;D
it's the ones ya don't see that get you ::)
I have some notes to make for this script
- use correct tabbing to make the code readable.
- learn to use tables, it will make your life easier!
- use local variables as much as you can or your code allows.
- don't repeat yourself, this is why scripting exists in the first place.
- make use of whatever experience there is stored on the boards, post up your functions and try to find with the rest of the board participants, optimised ways to make them work, faster, lighter better!
- watch the Lua manual and make sure you get the Lua functions to work for you.
generally I see a script that nevertheless has nothing new to show but it IS an honest try, keep it up and make advancements ;)
tabbing i rarely use as it doesnt make reading the script any easier for me although it does others. tables i deliberatly avoided for a reason as i said in my last post. no there wasnt anything new added but on that note i havent seen anything new from anyone in ages, just older scripts rewritten basically.
there is a real problem when trying to code a good working script for PX because the profile numbers are all back to front and there is that anoying problem with the inbuilt kick and redirect from the client (which could be fixed) but it means having to work around that all the time. if you delete all profiles and create new ones then you have to be careful of what order to create them or you may get undesired and unexpected results in the end product.
I had to cut a huge chunk out of that script for several reasons some being the above and others being that it had some code from other scripters included plus a few other minor things. it's far from being one of my best but i was being bugged by some users to have it as they liked they way it worked so i submitted it here for everyone.
- don't repeat yourself, this is why scripting exists in the first place. < i dont understand what you mean by that but ok ;D
The lua manual i could probably read that to you blind folded ;D but sometimes its easy to forget what version you are writing in at times, it happens ::)
Quote from: ruler on 11 September, 2006, 14:14:29
tabbing i rarely use as it doesnt make reading the script any easier for me although it does others.
Ok I need you to tell me which one is clearer,...
This one ?
function MultiConnectToMeArrival(user, data)
if hublock == "enable" then
if user.iProfile ~= 0 then
return 1
end
end
if user.iProfile >= 0 and user.iProfile <= 6 then
else
if security == "enabled" then
user:SendData("*** You cannot connect to any user until you Register. type !regme to Register!")
user:SendData("*** Du kan inte ansluta till nεgon anvδndare (downloada) fφrren du δr en registrerad anvδndare. Skriv: !regme fφr att registrera dig.")
return 1
end
end
end
function RevConnectToMeArrival(user, data)
if hublock == "enable" then
if user.iProfile ~= 0 then
return 1
end
end
if user.iProfile >= 0 and user.iProfile <= 6 then
else
if security == "enabled" then
user:SendData("*** You cannot connect to any user until you Register. type !regme to Register!")
user:SendData("*** Du kan inte ansluta till nεgon anvδndare (downloada) fφrren du δr en registrerad anvδndare. Skriv: !regme fφr att registrera dig.")
return 1
end
end
end
function SRArrival(user, data)
if hublock == "enable" then
if user.iProfile ~= 0 then
return 1
end
end
Or this one ?
function IsHubLocked()
if ( (hublock == 'enable') and (user.iProfile ~= 0) ) then
return 1
end
return nil;
end
function MultiConnectToMeArrival(user, data)
if IsHubLocked() then return 1; end;
if not ( (user.iProfile >= 0) and (user.iProfile <= 6) ) then
if (security == "enabled") then
user:SendData("*** You cannot connect to any user until you Register. type !regme to Register!")
return 1
end
end
end
function RevConnectToMeArrival(user, data)
if IsHubLocked() then return 1; end
if not ( (user.iProfile >= 0) and (user.iProfile <= 6) ) then
if (security == "enabled") then
user:SendData("*** You cannot connect to any user until you Register. type !regme to Register!")
return 1
end
end
end
function SRArrival(user, data)
if IsHubLocked() then return 1; end;
end
Quote from: ruler on 11 September, 2006, 14:14:29
tables i deliberatly avoided for a reason as i said in my last post.
probably you mean this
Quote from: ruleri tried not use use tables or any complicated code so that newbies would have a little chance of understanding the simple side of LUA when learning to code.
Yeahh,... right,... You don't show them any way to write efficient code,.. this kind of coding makes heavy and stupid coding... period.
Quote from: ruler on 11 September, 2006, 14:14:29no there wasnt anything new added but on that note i havent seen anything new from anyone in ages, just older scripts rewritten basically.
that is because ppl don't know how to do stuff with lua,... If they don't have something to learn using the language from, they will never get anything done,.. put aside smth new,...
Quote from: ruler on 11 September, 2006, 14:14:29
there is a real problem when trying to code a good working script for PX because the profile numbers are all back to front and there is that anoying problem with the inbuilt kick and redirect from the client (which could be fixed) but it means having to work around that all the time. if you delete all profiles and create new ones then you have to be careful of what order to create them or you may get undesired and unexpected results in the end product.
It is your choice to turn this into a problem,.. there are scripters that are perfectly happy and solve it with a simple table,...
Quote from: ruler on 11 September, 2006, 14:14:29
- don't repeat yourself, this is why scripting exists in the first place. < i dont understand what you mean by that but ok ;D
see the first part of my flaming,.. the IsHubLocked function and its usage in the API functions,...
Quote from: ruler on 11 September, 2006, 14:14:29
The lua manual i could probably read that to you blind folded ;D but sometimes its easy to forget what version you are writing in at times, it happens ::)
Take your pick and stay with the latest,.. this is my motto on this dillema,...
i must appologise for not being the champ scripter like yourself, i dont ever remember saying i was the best but if its such a big deal then why not remove it? and also my account here seeming you have it in for me from the other LUA forum atleast here you have a rank where you can do something. ive seen a lot of your old posts on the older LUA forum and they wernt too clever either so remember not all of us are perfect.
that script works fine although i had some problems posting it here and after posting it i did find a couple of silly bugs (which are now fixed). IF i still have my account here when i next return then i may condider rewriting that script and then give you tables if thats what keeps you happy, its no big deal. This script was a bit premature and shouldnt have been released just yet anyway as there were a few bugs fixed after releasing it also i released it as LUA 5.1.1 when it was 5.0.2 so i converted it to 5.1.1.
@ruler:
1) I have seen bots grow before,... I think that my critisism has something to say, otherwise I wouldn't post it.
2) I am not a serif for kicking butt,.. I am here to keep threads coherent and solid in meaning,...
@Mutor:Ye$$Sss.. mA$$Sster,... we i$Sss going back to the pitSes$Ss from where we came,.. **Golum**, **Gollum**,...
here we go Herodes, you wanted tables you got tables ;D
(http://relo-nino.com/images/NCLfurnishings/West%20Indies%20Tables.jpg)
(http://www.singleservecoffee.com/images/contemporary-coffee-tables.jpg)
(http://www.smugglersnotchfurniture.com/Camlen/images/tables/bflypress.jpg)
enjoy your tables wont you ;D ;D ;D
Did some research,.. learned a few things but this one is for you,...
Quote from: Henry AdamsNo man likes to have his intelligence or good faith questioned, especially if he has doubts about himself.
then don't dount yourself, simple :)
Ok,.. I am retiring from this,... I have no time and you have no will to get any better, YOU WIN!
There,... now go and say all your friends,.. if there are any,.. and no I don't mean dc, I mean rl (Real Life) that old experience-sharing network that has been revamped lately with new infrastructure, flesh blood muscles, and such,... they even developed some cool new body languages, nothing like the scripting languages at all,...
go play fecker...
Hmmm guess ya did'nt like the tables ;D
my personal life has f* all to do with you and neither do my friends and family so keep ya nose out, your just a small time nobody that is 'supposed' to be here to offer 'help and support' to the users of this forum.
lets see...
so far you have been intimidating, arogant, rude, self centered along with a few more that i could think of. im sure you were a bully at school ' gis ya dinner money or i'll av ya ' and you definatly HAV.NT been supportive at all just contradicting and looking for arguments not to mention shopping around for things to say here. 'quote quote quote' its a dam shame the old LUA forum wasnt still about cos i'd do a little shopping myself and even a few quotes from your posts. i remember vividly reading some of your posts where you were asking for help on simple problems and i don't remember anyone doing to you what you are 'trying' to do to me here. its most likely 'you' that has no friends. who needs friends like you?
and for your info this script has changed since its been posted but only from the link in the first post here.
now, if all the moderators on here are like you then i wish to have my account removed because i will no longer be posting here so the account will not be needed. thanks for fuck all and hope ya proud
im out da here
:|
Ehehehe, just saw this thread...
Well, Herodes seems a bit more nervous nowadays than he usually is, but he is absolutely right. Seeing things like 'I won't use tables because no newbie can learn from my script' also make my blood pressure rise. The original intention of Herodes was to *teach.* And ruler's statements are unwarranted, even though he was driven by good intention.
I guess ruler cannot bear criticism, while Herodes cannot bear some hmm... well.... answers that don't reflect too much intelligence.
Quote from: ruleri tried not use use tables or any complicated code so that newbies would have a little chance of understanding the simple side of LUA when learning to code.
Quote from: rulerno there wasnt anything new added but on that note i havent seen anything new from anyone in ages, just older scripts rewritten basically.
Quote from: bastya_elvtars on 12 September, 2006, 14:40:24Seeing things like 'I won't use tables because no newbie can learn from my script' also make my blood pressure rise.
well im looking but i can't see where i wrote i WON'T so it would be nice if you were to stop twisting what i write besides i did'nt know its a hanging offence to write a script without tables!
Quote from: bastya_elvtars on 12 September, 2006, 14:40:24The original intention of Herodes was to *teach.* And ruler's statements are unwarranted, even though he was driven by good intention.
yup sure, what a great teacher and my statments ARE warrented. i dont think anybody would sit there and take insults like this...
There,... now go and say all your friends,.. if there are any,.. and no I don't mean dc, I mean rl (Real Life) that old experience-sharing network that has been revamped lately with new infrastructure, flesh blood muscles, and such,... they even developed some cool new body languages, nothing like the scripting languages at all,...
go play fecker...
i mean wtf are you cunts about? supposed to be a support forum but all i see are little spotty kids bickering about flippin' tables or silly tabs ffs grow up. i'm supprised at you bastya_elvtars i always thought you were an ok guy.
ive never slandered anyones scripts on here even the shit ones which there are plenty of . i posted my script and fix what needed to be fixed and explained myself as best as i could and was then confronted by .. well read up and see.
Quote from: bastya_elvtars on 12 September, 2006, 14:40:24I guess ruler cannot bear criticism, while Herodes cannot bear some hmm... well.... answers that don't reflect too much intelligence.
fucking nerds
Quote from: ruler on 12 September, 2006, 18:14:40
well im looking but i can't see where i wrote i WON'T so it would be nice if you were to stop twisting what i write besides i did'nt know its a hanging offence to write a script without tables!
yup sure, what a great teacher and my statments ARE warrented. i dont think anybody would sit there and take insults like this...
i tried not use use tables or any complicated code so that newbies would have a little chance of understanding the simple side of LUA when learning to code.
Quote from: ruleri mean wtf are you cunts about? supposed to be a support forum but all i see are little spotty kids bickering about flippin' tables or silly tabs ffs grow up.
Ah, doesn't suggesting better coding belong to the category of support? We took a look at the code of a new scripter, because we wanted to flood him with advice, not to flame him afterwards. It was you who reacted in a quite irritating manner. I don't wanna start a huge flamewar, I just want to point out that patience is virtue. :)
And yes, Herodes' posts are a bit more arrogant than they should be, and I noticed this long ago, even posted in the forum somewhere. But fighting back with arrogance is not the cure for this.
E. g. this
Quote from: ruleri tried not use use tables or any complicated code so that newbies would have a little chance of understanding the simple side of LUA
post is very annoying (and yes, I stand corrected for the 'won't' thing) because there are many howto-s out there (me & plop wrote one) whose reading makes everyone understand tables. And you mix simplicity with unwilling to utilize the full capabilities of Lua.
This
Quote from: ruleri havent seen anything new from anyone in ages, just older scripts rewritten basically.
is not true, 'cause adding functionality to a script can be considered new, can't it? Oh, and let's not forget about requests: if nobody requests anything just PM-spies and sharehiders and MyINFO rewriting shit (I am very disappointed by seeing the forum, it is not what it used to be), we cannot make new stuff. There are very few scripters that actually write code (I have no time to code, neither Herodes does, put aside plop & many others) so every new scripter is welcome. Let's just stop this discussion, I am bored of it and don't like to see such discussion instead of discussing the coding itself (what the original intention was).
Quote from: Herodes on 12 September, 2006, 07:49:36
@Mutor:Ye$$Sss.. mA$$Sster,... we i$Sss going back to the pitSes$Ss from where we came,.. **Golum**, **Gollum**,...
hmm that is my line ;)
Quote from: ruler on 11 September, 2006, 11:32:55
i tried not use use tables or any complicated code so that newbies would have a little chance of understanding the simple side of LUA when learning to code.
so if that is the idea then why not use tabs ?
you said yourself "it does not make it easyer for me, only for others"
and if you posted this for newbies to learn why not make it a little bigger chance for newbies to learn ?
yes i guess you may consider being really nice and tabbing it..
for the rest nice one :0)
if you dont like tables ... have a chesterfield .. ..
http://www.furnitureporn.com/
(http://www.vgg.com/furnitureporn/graphics/bond5.jpg)
if you read the previous posts before replying to the last one you would have read that i already added the tabs, i DID forget to add those after until HERODES reminded me. also i want that chair :P
Quote from: ruler on 13 September, 2006, 17:31:29
if you read the previous posts before replying to the last one you would have read that i already added the tabs, i DID forget to add those after until HERODES reminded me. also i want that chair :P
i actually did download the script before posting and saying what i said also i did read all posts i nthe trhead before posting..
it had a few tabs in a few functions but was not realy "fully tabbed" ..
but is all ok,.. not trying to "tell you" or whatever
btw
i think you did a nice thing to post that code in the first place.