ArcEmu: [project] Arcscripts2 - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Labels

Make sure when posting a help or release topic you put [c++] or [lua] BEFORE your topic title!
  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[project] Arcscripts2 new development of c++ scripts

#1 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 07 December 2011 - 09:24 AM

My english isn't good but i'll try to explain about project.

ArcScripts2 - is fork of old arcemu scripts with motivation to increase Game Objects/Units AI work more blizzlike. Development runs on ai_agents, npc_monstersay and on c++ scripts. As base old arcemu c++ scripts development is slow, it is main reason why i have created it, also and improve c++ knowledge.
It live aproximatelly from 2011 april month.

In ArcScripts2 has been added these things:
  • All libralies has been moved to one
  • Have ai_agents and npc_monstersay developments
  • A bit of cleaned up old code
  • Few icc scripts and similar scripts.
  • Reordered scripts
  • Changed base scripts source structure (not code)
  • Some whyscripts and eclipse project scripts (they made few great)

-Soonish there will implemented new class constructor called ArcScripts2 which will contain data loads and similar (almost finished loadscripttexts, need only to finish gettextdata function)

All development is under GPL license, but if you have interested to help to improve development of scripts, leave message in this topic.
main requirements are c++ knowledge, sql programming knowledge.

Repository: git://github.com/arcscripts2/arcscripts2.git
https://github.com/a...ts2/arcscripts2

History: https://github.com/a...commits/master/

PS: at this moment i'm doing small reorganise of scripts...
it will finished in few days.
Posted Image
Posted Image
Sorry for my bad english
0

#2 User is offline   THCSphere 

  • Member
  • Pip
  • Group: Members
  • Posts: 25
  • Joined: 20-October 09

Posted 07 December 2011 - 10:46 AM

Sounds like what you're trying to do is create a ArcEmu version of ScriptDev2.
0

#3 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 07 December 2011 - 11:04 AM

no, but taking some ideas from sd2

Script datas are really useful from sd2 side for example - multilanguage support can be added more easer in scripts.

One lib as base takes less resources...
also is easer to handle additional actions and no need multiply it on every lib - it is possible, like as load_instance_texts, load_extra_scripts_texts and etc, but just damn... :)
Posted Image
Posted Image
Sorry for my bad english
0

#4 User is offline   THCSphere 

  • Member
  • Pip
  • Group: Members
  • Posts: 25
  • Joined: 20-October 09

Posted 07 December 2011 - 11:09 AM

View Postsanctum32, on 07 December 2011 - 11:04 AM, said:

no, but taking some ideas from sd2

Script datas are really useful from sd2 side for example - multilanguage support can be added more easer in scripts.

One lib as base takes less resources...
also is easer to handle additional actions and no need multiply it, as base it is possible.


Caching more database content uses more memory.
0

#5 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 07 December 2011 - 11:29 AM

yes, but as base, it takes aprox 15-20mb more of ram :) so, it is not very critical...
i have mean about current load of script texts.
Posted Image
Posted Image
Sorry for my bad english
0

#6 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 07 December 2011 - 12:08 PM

I wouldn't mind if there was a peer reviewed scripting project for Arcemu, that way we could focus on core functionality and features instead of contents :)
However I don't mean this as an offense but Sanctum32 has a lot to learn, each and every patch of his were majorly flawed so I'd be cautious with his work.
"The demand for free goods is infinite."
0

#7 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 07 December 2011 - 12:30 PM

dfighter, old times are old... :)
Posted Image
Posted Image
Sorry for my bad english
0

#8 User is offline   THCSphere 

  • Member
  • Pip
  • Group: Members
  • Posts: 25
  • Joined: 20-October 09

Posted 07 December 2011 - 12:54 PM

View Postsanctum32, on 07 December 2011 - 12:30 PM, said:

dfighter, old times are old... :)


Can you explain GetHealthPercent() <= 25.0f o.o
0

#9 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 07 December 2011 - 01:17 PM

https://github.com/a...fe587ed3dacbb97

Quote

jackpoz commented on 1f12aa7

November 17, 2011

scripts/InstanceScripts/Raid_IcecrownCitadel.cpp line 375

bool BoneStorm(uint32 i, Spell* s)
{
    if(s->u_caster == NULL)
        return true;
    SpellEntry* pSpell;
    if(s)
        pSpell = dbcSpell.LookupEntry((uint32)s);


first deref s with s->u_caster, then check if s is NULL and if it's not it casts s (which is a pointer to a Spell class) to uint32 and pass it to LookupEntry() as spell id. Very bugged code.

I don't want to be mean but you should learn how C++ and ArcEmu work before starting a huge project like this. The "dbcSpell.LookupEntry((uint32)s)" part is one of the worst thing I've ever seen in any ArcEmu related code, it means you have absolutely no idea what you were doing there.
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#10 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 07 December 2011 - 01:30 PM

ah, i tired to repeat and repeat, look in current code...
and i know, what i'm doing...
Posted Image
Posted Image
Sorry for my bad english
0

#11 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 07 December 2011 - 04:29 PM

could you then explain why you casted "s" to uint32 and passed it to dbcSpell.LookupEntry() ?
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#12 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 07 December 2011 - 04:59 PM

dbcSpell.LookupEntry(uint32 /*value*/); //function argument is uint32 variable type...
Posted Image
Posted Image
Sorry for my bad english
0

#13 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 07 December 2011 - 05:09 PM

And what is the result of casting "s", a pointer to SpellEntry struct, to uint32? Is this what LookupEntry() expects as value?
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
1

#14 User is offline   Sdyess94 

  • Member
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 10-August 08

Posted 07 December 2011 - 06:13 PM

I'm not sure about the spell class but if you're going to cast the pointer, you should at least deref it?
0

#15 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 08 December 2011 - 01:17 PM

View PostTHCSphere, on 07 December 2011 - 12:54 PM, said:

Can you explain GetHealthPercent() <= 25.0f o.o

if you know mathematic as well, then you should understand...

for example, 465*0.18 = 83.7... just read http://en.wikipedia....wiki/Percentage

talking about bonestorm spell, it has been updated and removed these misstakes, anyway, inspected, how trully spellhandlers works... had bad info, thats it.
Posted Image
Posted Image
Sorry for my bad english
0

#16 User is offline   THCSphere 

  • Member
  • Pip
  • Group: Members
  • Posts: 25
  • Joined: 20-October 09

Posted 08 December 2011 - 05:23 PM

View Postsanctum32, on 08 December 2011 - 01:17 PM, said:

if you know mathematic as well, then you should understand...

for example, 465*0.18 = 83.7... just read http://en.wikipedia....wiki/Percentage

talking about bonestorm spell, it has been updated and removed these misstakes, anyway, inspected, how trully spellhandlers works... had bad info, thats it.


That's not what I meant. Why are you comparing a GetHealthPct(), which is a int32 value, to 25.0f, which is a float value. That is what I wanted you to explain. There was no need for any of the changes you made like that o.o
0

#17 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 08 December 2011 - 06:05 PM

View PostTHCSphere, on 08 December 2011 - 05:23 PM, said:

That's not what I meant. Why are you comparing a GetHealthPct(), which is a int32 value, to 25.0f, which is a float value. That is what I wanted you to explain. There was no need for any of the changes you made like that o.o

Nice observation, someone checking the prototype of a function when reading/using it. I like this post, I like your attitude :)
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#18 User is offline   THCSphere 

  • Member
  • Pip
  • Group: Members
  • Posts: 25
  • Joined: 20-October 09

Posted 08 December 2011 - 06:08 PM

View Postjackpoz, on 08 December 2011 - 06:05 PM, said:

Nice observation, someone checking the prototype of a function when reading/using it. I like this post, I like your attitude :)


It's a must for anyone who takes developing seriously.
0

#19 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 09 December 2011 - 12:10 AM

i already did answer, read +100 times, maybe you'll get... :)
about last posts - lol

i changed it to float, because logically it should be as float... i'm not children teacher who willl teach word "percentage" btw, gethealthpercent has been changed, so basically it returns float.
Posted Image
Posted Image
Sorry for my bad english
0

#20 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 09 December 2011 - 04:23 AM

Could you provide an example where you needed it to be float instead of integer?
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
2

Share this topic:


  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users