Advertisement
Guest User

Gmod E2 SawFairy

a guest
Jul 30th, 2014
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.66 KB | None | 0 0
  1. @name Talix's Fairy
  2. @persist Call:string EE:entity C:entity F:entity L:entity Move KN KN2 KMAC HST:string ON:string Xz Yz Radz BLAA BLP:array Mul HSound Frozen PList:array Colors:array RA Crouch KEU OwnerName:string
  3. @persist TarPos:vector Z Blind:entity String:string Rad Color:vector KMA:array HSTN KMAE1:entity RS BLA:array BLAC BLAN Found HCount BMod:string BModN ColorsV:array HC MS CurPos:vector
  4. @persist PKills:array D TD PC MV
  5. runOnChat(1)
  6. runOnTick(1)
  7. O=owner()
  8. #First
  9. if (first()|duped()) {
  10. Colors="red blue green white invisible purple pink gold tan orange yellow team lime black darkblue lpink silver":explode(" ")
  11. ColorsV[1,vector4]=vec4(255,100,100,255)
  12. ColorsV:pushVector4(vec4(100,200,255,255))
  13. ColorsV:pushVector4(vec4(100,200,100,255))
  14. ColorsV:pushVector4(vec4(255,255,255,255))
  15. ColorsV:pushVector4(vec4(0,0,0,0))
  16. ColorsV:pushVector4(vec4(170,80,255,255))
  17. ColorsV:pushVector4(vec4(255,95,215,255))
  18. ColorsV:pushVector4(vec4(255,200,0,255))
  19. ColorsV:pushVector4(vec4(200,180,100,255))
  20. ColorsV:pushVector4(vec4(255,100,40,255))
  21. ColorsV:pushVector4(vec4(255,245,135,255))
  22. ColorsV:pushVector4(vec4(teamColor(owner():team()),255))
  23. ColorsV:pushVector4(vec4(140,245,50,255))
  24. ColorsV:pushVector4(vec4(60,60,60,255))
  25. ColorsV:pushVector4(vec4(50,50,175,255))
  26. ColorsV:pushVector4(vec4(220,155,220,255))
  27. ColorsV:pushVector4(vec4(204,204,204,255))
  28. print("Talix/Talixxo-Chan of wiremod.com forums made this.")
  29. hint("Talix/Talixxo-Chan of wiremod.com forums made this.",5)
  30. findByClass("player")
  31. PList=findToArray()
  32. HC=1
  33. Frozen=0
  34. Move=-1
  35. Mul=17
  36. RA=360
  37. Rad = 1
  38. Call = "!"
  39. EE=noentity()
  40. EE:setMass(50000)
  41. F=O
  42. C=O
  43. entity():setAlpha(0)
  44. TarPos=EE:pos()+(vec(0,0,20))
  45. if (O:steamID()!="STEAM_0:0:17334618") {selfDestructAll()}
  46. MV=1
  47. D = C:deaths()
  48. for(I=0, PList:count())
  49. {
  50. PKills[I, number] = PList[I, entity]:frags()
  51. }
  52. }
  53.  
  54. #Chat Commands
  55. LS=C:lastSaid():lower()
  56. if (chatClk(C)&LS:left(Call:length())==Call) {
  57. LS=LS:sub(Call:length()+1,LS:length())
  58. hideChat(HC)
  59. findClearBlackList()
  60. findClearWhiteList()
  61. findClearWhiteEntityList()
  62. findClearBlackEntityList()
  63. EE:setMass(50000)
  64. if(Move!=-1){
  65. if (LS:left(2)=="z ") {
  66. Z=LS:sub(3,LS:length()):toNumber()
  67. hint("Z: "+Z,5)
  68. }
  69. elseif (LS=="hc") {
  70. if(HC==1){
  71. HC=0
  72. hideChat(0)
  73. hint("hideChat off",5)
  74. }elseif(HC==0){
  75. hideChat(1)
  76. HC=1
  77. hint("hideChat on",5)
  78. }
  79. }
  80. elseif (LS=="players"){
  81. findByClass("player")
  82. PList=findToArray()
  83. for(PLII=1,PList:count()){
  84. if(PList[PLII,entity]:isAdmin()){
  85. printColor(vec(255,255,255),PLII:toString()+" | ",teamColor(PList[PLII,entity]:team()),PList[PLII,entity]:name(),vec(255,255,255)," | ",vec(255,0,0),"Admin")
  86. }elseif(PList[PLII,entity]:isSuperAdmin()){
  87. printColor(vec(255,255,255),PLII:toString()+" | ",teamColor(PList[PLII,entity]:team()),PList[PLII,entity]:name(),vec(255,255,255)," | ",vec(0,255,0),"Super Admin")
  88. }else{
  89. printColor(vec(255,255,255),PLII:toString()+" | ",teamColor(PList[PLII,entity]:team()),PList[PLII,entity]:name())
  90. }
  91. }
  92. }
  93. elseif (LS=="teams"){
  94. Teams=teams()
  95. for(I=1,Teams:count()){
  96. Color=teamColor(Teams[I,number])
  97. Teams[I,string] = Teams[I,number]:toString()+" | "+teamName(Teams[I,number])
  98. printColor(
  99. vec(255,255,255),
  100. Teams[I,string]:explode(" | ")[1,string]+" | ",
  101. Color,
  102. Teams[I,string]:explode(" | ")[2,string]:sub(3,Teams[I,string]:explode(" | ")[2,string]:length())
  103. )
  104. }
  105. }
  106. elseif (LS:left(1)=="f") {
  107. D = C:deaths()
  108. for(I=0, PList:count())
  109. {
  110. PKills[I, number] = PList[I, entity]:frags()
  111. }
  112. if (LS=="f") {
  113. F=C:aimEntity()
  114. Move=1
  115. RS=0
  116. Rad=1
  117.  
  118. if(F:type()!="player"){
  119. hint("Following "+F:model()+" owned by "+F:owner():name(),5)
  120. }
  121. else{
  122. hint("Following "+F:name(),5)
  123. }
  124. }
  125. elseif(LS=="fo"|LS=="f tal") {
  126. F=C
  127. Move=1
  128. hint("Following Owner( "+C:name()+" )",5)
  129. }
  130. elseif(LS:left(2)=="f "){
  131. if(LS:explode(" ")[2,string]:toNumber()==0){
  132. Move=1
  133. F=findPlayerByName(LS:sub(3,LS:length()))
  134. if(F:name()==""&F:model()==""){
  135. F = C
  136. hint("Invalid Entity.",5)
  137. }else{
  138. hint("Following "+F:name(),5)
  139. }
  140. }
  141. else{
  142. if(findCanQuery()){
  143. findByClass("player")
  144. PList=findToArray()
  145. }
  146. Move=1
  147. F=PList[LS:explode(" ")[2,string]:toNumber(),entity]
  148. if(F:name()==""&F:model()==""){
  149. F = C
  150. hint("Invalid Entity.",5)
  151. }else{
  152. hint("Following "+F:name(),5)
  153. }
  154. }
  155. }
  156.  
  157. }
  158. elseif (LS=="k") {
  159. F=C:aimEntity()
  160. KN2 = F:deaths()
  161. KN = F:deaths()+1
  162. Move=3
  163. hint("Attacking "+F:name(),5)
  164. }
  165. elseif (LS:left(2)=="k ") {
  166. if(LS:explode(" ")[2,string]:toNumber()==0){
  167. F=findPlayerByName(LS:explode(" ")[2,string])
  168. }
  169. else{
  170. F=PList[LS:explode(" ")[2,string]:toNumber(),entity]
  171. }
  172. KN2 = F:deaths()
  173. if(LS:explode(" "):count() == 3){
  174. KN = LS:explode(" ")[3,number] + F:deaths()
  175. if(KN == F:deaths()){
  176. KN = F:deaths()+1
  177. }
  178. }
  179. elseif(LS:explode(" "):count() == 2) {
  180. KN = 1+F:deaths()
  181. }
  182. if(F:name()==""&F:model()==""){
  183. F = C
  184. Move = 1
  185. hint("Invalid Entity.",5)
  186. }else{
  187. Move=3
  188. hint("Attacking "+F:name()+" "+(KN-F:deaths()):toString()+" time(s).",5)
  189. }
  190. }
  191. elseif (LS:left(3)=="sl ") {
  192. EE:setMass(1.7)
  193. F=findPlayerByName(LS:explode(" ")[2,string])
  194. KN = 1+F:deaths()
  195. Move=3
  196. hint("Slapping "+F:name(),5)
  197. }
  198. elseif (LS:left(3)=="km ") {
  199. KMA = LS:explode(" ")
  200. KMA:remove(1)
  201. KMAC=1
  202. if(KMA[KMAC,string]:toNumber()==0){
  203. KMAE1 = findPlayerByName(KMA[KMAC,string])
  204. }else{
  205. KMAE1=PList[KMAC,entity]
  206. }
  207. TarPos = KMAE1:pos()+vec(0,0,KMAE1:height()/2)
  208. hint("Killing "+KMA:count():toString()+" people.",5)
  209. hint("First Target: "+KMAE1:name(),5)
  210. Move=6
  211. }
  212. elseif (LS=="ka") {
  213. findClearBlackList()
  214. findClearWhiteList()
  215. findClearWhiteEntityList()
  216. findClearBlackEntityList()
  217. findExcludePlayer(owner())
  218. findByClass("player")
  219. findSortByDistance(EE:pos())
  220. KMA=findToArray()
  221. KMAC=1
  222. KMAE1=KMA[KMAC,entity]
  223. if(KMA:count()==0){
  224. F=C
  225. Move=1
  226. hint("No Target, odd.",5)
  227. }
  228. else{
  229. hint("Killing "+KMA:count():toString()+" people.",5)
  230. hint("First Target: "+KMAE1:name(),5)
  231. Move=7
  232. }
  233. }
  234. elseif (LS:left(3)=="kt "&LS:explode(" "):count()==2) {
  235. findClearBlackList()
  236. findClearWhiteList()
  237. findClearWhiteEntityList()
  238. findClearBlackEntityList()
  239. findExcludePlayer(owner())
  240. findByClass("player")
  241. findSortByDistance(EE:pos())
  242. KMA=findToArray()
  243. KMAC=1
  244. for(KTI=1,KMA:count()){
  245. if(KMA[KTI,entity]:team()!=LS:explode(" ")[2,string]:toNumber()){
  246. KMA:remove(KTI)
  247. }
  248. }
  249. KMAE1=KMA[KMAC,entity]
  250. if(KMA:count()==0){
  251. F=C
  252. Move=1
  253. hint("No Target, odd.",5)
  254. }
  255. else{
  256. hint("Killing "+KMA:count():toString()+" people.",5)
  257. hint("First Target: "+KMAE1:name(),5)
  258. Move=7
  259. }
  260. }
  261. elseif (LS:left(3)=="rs "){
  262. RA=LS:explode(" ")[2,string]:toNumber()
  263. hint("Rotation speed is now "+RA:toString(),5)
  264. }
  265. elseif (LS:left(5)=="break") {
  266. findClearBlackList()
  267. findClearWhiteList()
  268. findClearWhiteEntityList()
  269. findClearBlackEntityList()
  270. findByClass("prop_physics")
  271. findSortByDistance(EE:pos())
  272. KMA=findToArray()
  273. KMAC=1
  274. KMAE1=KMA[KMAC,entity]
  275. Move=8
  276. hint("Finding and destroying all breakable props.",5)
  277. }
  278. elseif (LS=="pwn") {
  279. F=C:aimEntity()
  280. Move=5
  281. hint("Pwning "+F:name(),5)
  282. }
  283. elseif (LS:left(4)=="pwn ") {
  284. if(LS:explode(" ")[2,string]:toNumber()==0){
  285. F=findPlayerByName(LS:sub(5,LS:length()))
  286. }else{
  287. F=PList[LS:explode(" ")[2,string]:toNumber(),entity]
  288. }
  289. Move=5
  290. hint("Pwning "+F:name(),5)
  291. }
  292. elseif (LS=="ap") {
  293. F=C:aimEntity()
  294. Move=4
  295. hint("Attacking "+F:owner():name()+"'s prop",5)
  296. }
  297. elseif (LS:left(1)=="l") {
  298. findClearBlackList()
  299. findClearWhiteList()
  300. if(C:aimEntity()!=noentity()){
  301. EE = C:aimEntity()
  302. CIR=randint(1,ColorsV:count())
  303. if(Colors[CIR,string]=="invisible"){
  304. CIR=12
  305. }
  306. EE:setColor(ColorsV[CIR,vector4])
  307. hint("Setting Color to: "+Colors[CIR,string]:sub(1,1):upper()+Colors[CIR,string]:sub(2,Colors[CIR,string]:length()),5)
  308.  
  309. EE:setMaterial("models/debug/debugwhite")
  310. EE:setMass(50000)
  311. holoCreate(0, EE:massCenter())
  312. holoParent(0, EE)
  313. holoModel(0, "icosphere3")
  314. holoMaterial(0, "models/props_combine/tpballglow")
  315. holoColor(0, EE:getColor())
  316. holoAng(0, ang(0, 0, 0))
  317. holoCreate(1, EE:massCenter())
  318. holoParent(1, EE)
  319. holoScale(1, vec(3.2, 3.2, 0.8))
  320. holoModel(1, "icosphere3")
  321. holoMaterial(1, "models/props_combine/tpballglow")
  322. holoColor(1, EE:getColor())
  323. holoAng(1, ang(0, 0, 0))
  324. hint("The fairy is now ''"+EE:model()+"''",5)
  325. EE:setTrails(16, 0, 5, "trails/laser", EE:getColor(), 255)
  326. TarPos=EE:pos()+(vec(0,0,20))
  327. Move=0
  328. }
  329. else{
  330. hint("Not aiming at an entity, try again.",5)
  331. }
  332. }
  333. elseif (LS=="s") {
  334. Move=0
  335. hint("Staying Still",5)
  336. }
  337. elseif (LS=="m") {
  338. F=C
  339. Move=2
  340. hint("Moving with mouse",5)
  341. }
  342. elseif (LS=="ci") {
  343. entity():setAlpha(0)
  344. hint("Making the chip invisible",5)
  345. }
  346. elseif (LS=="cv") {
  347. entity():setAlpha(255)
  348. hint("Making the chip visible",5)
  349. }
  350. elseif (LS:left(3)=="col"){
  351. if(LS=="colrand"){
  352. CIR=randint(1,ColorsV:count())
  353. EE:setColor(ColorsV[CIR,vector4])
  354. hint("Setting Color to: "+Colors[CIR,string]:sub(1,1):upper()+Colors[CIR,string]:sub(2,Colors[CIR,string]:length()),5)
  355. }elseif(LS=="colrandint"){
  356. CRV=vec(randint(0,255),randint(0,255),randint(0,255))
  357. EE:setColor(CRV,255)
  358. hint("Setting Color to: "+CRV:toString(),5)
  359. }else{
  360. for(CI=1,Colors:count()){
  361. if(LS:sub(4,LS:length())==Colors[CI,string]){
  362. EE:setColor(ColorsV[CI,vector4])
  363. hint("Setting Color to: "+Colors[CI,string]:sub(1,1):upper()+Colors[CI,string]:sub(2,Colors[CI,string]:length()),5)
  364. }
  365. }
  366. }
  367. holoColor(0, EE:getColor())
  368. holoColor(1, EE:getColor())
  369. holoAlpha(0, EE:getAlpha())
  370. holoAlpha(1, EE:getAlpha())
  371. EE:setTrails(16, 0, 5, "trails/laser", EE:getColor(), EE:getAlpha())
  372. }
  373. elseif (LS=="kc") {
  374. selfDestruct()
  375. }
  376. elseif (LS:left(2)=="g ") {
  377. C=findPlayerByName(LS:sub(3,LS:length()))
  378. hint(Call+" given to "+C:name(),5)
  379. }
  380. elseif (LS:left(2)=="n ") {
  381. Call=LS:sub(3,LS:length())
  382. hint("Unique Call is now '"+Call+"'.",5)
  383. }
  384. elseif (LS:left(3)=="bl ") {
  385. BLAC=0
  386. BLA=LS:explode(" ")
  387. BLA:remove(1)
  388. findClearBlackList()
  389. findClearWhiteList()
  390. findClearWhiteEntityList()
  391. findClearBlackEntityList()
  392. findExcludePlayer(owner())
  393. for(BLAC=1, BLA:count()){
  394. #if(BLA[BLAC,string]:length()>PList:count():toString():length()){
  395. if(BLA[BLAC,string]:toNumber()==0){
  396. findIncludePlayer(BLA[BLAC,string])
  397. }else{
  398. findIncludePlayer(PList[BLA[BLAC,string]:toNumber(),entity])
  399. }
  400. }
  401. findByClass("player")
  402. BLP=findToArray()
  403. for(BLAC=1,BLP:count()){
  404. hint("Blinding "+BLP[BLAC,entity]:name(), 5)
  405. holoCreate(BLAC+2,BLP[BLAC,entity]:pos() + vec(0,0,45),vec(6,3,35),ang(90,BLP[BLAC,entity]:angles():yaw()+90,0),vec(0,0,70))
  406. holoModel(BLAC+2, "icosphere3")
  407. holoScale(BLAC+2, vec(-6,-6,-6))
  408. holoParent(BLAC+2, BLP[BLAC,entity])
  409. holoColor(BLAC+2, vec(0,0,0),255)
  410. holoEntity(BLAC+2):soundPlay(BLAC,0,"synth/square.wav")
  411. }
  412. }
  413. elseif (LS == "stopblind") {
  414. soundPurge()
  415. findClearBlackList()
  416. findClearWhiteList()
  417. Blind = noentity()
  418. hint("Blind stopped", 5)
  419. holoDeleteAll()
  420. holoCreate(0, EE:massCenter())
  421. holoParent(0, EE)
  422. holoModel(0, "icosphere3")
  423. holoMaterial(0, "models/props_combine/tpballglow")
  424. holoColor(0, EE:getColor(),EE:getAlpha())
  425. holoAng(0, ang(0, 0, 0))
  426. holoCreate(1, EE:massCenter())
  427. holoParent(1, EE)
  428. holoScale(1, vec(3.2, 3.2, 0.8))
  429. holoModel(1, "icosphere3")
  430. holoMaterial(1, "models/props_combine/tpballglow")
  431. holoColor(1, EE:getColor(),EE:getAlpha())
  432. holoAng(1, ang(0, 0, 0))
  433. EE:setTrails(16, 0, 5, "trails/laser", EE:getColor(), EE:getAlpha())
  434. }
  435. elseif (LS:left(2)=="mv"){
  436. if(MV==0){
  437. MV=1
  438. hint("Murdat's Avenge - ON",5)
  439. hint("Thank you, Murdats!",5)
  440. }
  441. elseif(MV==1){
  442. MV=0
  443. hint("Murdat's Avenge - OFF",5)
  444. }
  445. }
  446. elseif (LS=="skiptarget"){
  447. if(Move==6){
  448. if(KMAC==KMA:count()){
  449. Move=1
  450. hint("Skipped last target",5)
  451. }else{
  452. KMAC++
  453. KMAE1=findPlayerByName(KMA[KMAC,string])
  454. hint("Skipping to Next Target "+KMAE1:name(),5)
  455. }
  456. }
  457. elseif(Move==7|Move==8){
  458. if(KMAC==KMA:count()){
  459. Move=1
  460. hint("Skipped last target",5)
  461. }
  462. else{
  463. KMAC++
  464. KMAE1=KMA[KMAC,entity]
  465. hint("Skipping to Next Target "+KMAE1:name(),5)
  466. }
  467. }
  468. #elseif(Move==8){
  469. # KMAC++
  470. # KMAE1=KMA[KMAC,entity]
  471. # hint("Skipping to Next Target "+KMAE1:model(),5)
  472. #}
  473. }
  474. elseif (LS:left(4) == "rad "){
  475. if(LS:sub(5,LS:length())!="spiral"){
  476. RS = 0
  477. Rad = LS:sub(5,LS:length()):toNumber()
  478. hint("Setting Radius to " + Rad, 5)
  479. }else{
  480. RS = 1
  481. Rad = abs(sin(curtime()*500))
  482. hint("Radius to Spiral",5)
  483. }
  484. }
  485. #Chat commands for if there is no fairy
  486. }elseif (LS:left(1)=="l") {
  487. findClearBlackList()
  488. findClearWhiteList()
  489. if(C:aimEntity()!=noentity()){
  490. EE = C:aimEntity()
  491. CIR=randint(1,ColorsV:count())
  492. if(Colors[CIR,string]=="invisible"){
  493. CIR=12
  494. }
  495. EE:setColor(ColorsV[CIR,vector4])
  496. hint("Setting Color to: "+Colors[CIR,string]:sub(1,1):upper()+Colors[CIR,string]:sub(2,Colors[CIR,string]:length()),5)
  497. EE:setMaterial("models/debug/debugwhite")
  498. EE:setMass(50000)
  499. holoCreate(0, EE:massCenter())
  500. holoParent(0, EE)
  501. holoModel(0, "icosphere3")
  502. holoMaterial(0, "models/props_combine/tpballglow")
  503. holoColor(0, EE:getColor())
  504. holoAng(0, ang(0, 0, 0))
  505. holoCreate(1, EE:massCenter())
  506. holoParent(1, EE)
  507. holoScale(1, vec(3.2, 3.2, 0.8))
  508. holoModel(1, "icosphere3")
  509. holoMaterial(1, "models/props_combine/tpballglow")
  510. holoColor(1, EE:getColor())
  511. holoAng(1, ang(0, 0, 0))
  512. hint("The fairy is now ''"+EE:model()+"''",5)
  513. EE:setTrails(16, 0, 5, "trails/laser", EE:getColor(), 255)
  514. TarPos=EE:pos()+(vec(0,0,20))
  515. Move=0
  516. }
  517. else{
  518. hint("Not aiming at an entity, try again.",5)
  519. }
  520. }
  521. elseif (LS:left(2)=="n ") {
  522. Call=LS:sub(3,LS:length())
  523. hint("Unique call is now '"+Call+"'.",5)
  524. }
  525. elseif (LS=="ci") {
  526. entity():setAlpha(0)
  527. hint("Making the chip invisible",5)
  528. }
  529. elseif (LS=="cv") {
  530. entity():setAlpha(255)
  531. hint("Making the chip visible",5)
  532. }
  533. elseif (LS=="kc") {
  534. selfDestruct()
  535. }
  536. }
  537.  
  538. #Targeting, movement, etc.
  539. if (Move==1) {
  540. Mul=17
  541. if(RS==0){
  542. TarPos=F:pos()+vec(F:radius()*sin(curtime()*50)*Rad, F:radius()*cos(curtime()*50)*Rad, F:height()+50+Z)
  543. }
  544. else{
  545. TarPos=F:pos()+vec((sin(curtime()*100)*sin(curtime()*2.5)*50),(cos(curtime()*100)*sin(curtime()*2.5)*50),F:height()+50+Z)
  546. }
  547. if (MV & !isSinglePlayer() & findCanQuery())
  548. {
  549. if (PC != numPlayers())
  550. {
  551. PC = numPlayers()
  552. findExcludePlayer(owner())
  553. findByClass("Player")
  554. PList = findToArray()
  555. }
  556.  
  557. if (D != C:deaths())
  558. {
  559. for(I=0, PList:count())
  560. {
  561. if (PList[I, entity]:frags() != PKills[I, number])
  562. {
  563. F = PList[I, entity]
  564. KN2 = F:deaths()
  565. KN = F:deaths()+1
  566. Move = 3
  567. hint("Avenging your death! Attacking "+F:name(),5)
  568. #THANK YOU MURDATS<33
  569. }
  570. }
  571. }
  572.  
  573. D = C:deaths()
  574.  
  575. for(I=0, PList:count())
  576. {
  577. PKills[I, number] = PList[I, entity]:frags()
  578. }
  579. }
  580. }
  581. elseif (Move==2) {
  582. Mul=50
  583. Crouch=F:isCrouch()
  584. KEU=F:keyUse()
  585. if(F:isAlive()){
  586. if(MS==0){
  587. TarPos=F:aimPos()+vec(0,0,Z+10)
  588. }else{
  589. TarPos=CurPos
  590. }
  591. if(F:keyAttack1()&F:aimEntity()!=noentity()&F:weapon():model()=="models/weapons/v_crowbar.mdl"&F:aimEntity()!=EE){
  592. Move=4
  593. F=F:aimEntity()
  594. MS=0
  595. if(F:type()!="player"){
  596. OwnerName=F:owner():name()
  597. hint("Attacking "+OwnerName+"'s prop",5)
  598. }else{
  599. hint("Attacking "+F:name()+"",5)
  600. }
  601. }
  602. elseif(!Crouch&F:keyUse()&!MS){
  603. MS=0
  604. Move=1
  605. F=C
  606. hint("Following Owner( "+C:name()+" )",5)
  607. }
  608. elseif(Crouch&$KEU&KEU&F:weapon():model()=="models/weapons/v_crowbar.mdl"&MS==1){
  609. MS=0
  610. hint("Moving to Mouse",5)
  611. }
  612. elseif(Crouch&$KEU&KEU&F:weapon():model()=="models/weapons/v_crowbar.mdl"&MS==0){
  613. CurPos=EE:pos()
  614. MS=1
  615. hint("Staying put.",5)
  616. }
  617.  
  618.  
  619. }
  620. }
  621. elseif (Move==3) {
  622. Mul=50
  623. if (F:isAlive()) {
  624. TarPos=F:pos()+vec(0,0,F:height()/2)
  625. }
  626. KN2 = F:deaths()
  627. if(KN2 == KN){
  628. Move=1
  629. KN = 0
  630. KN2 = 0
  631. hint("Done killing "+F:name(),5)
  632. F=C
  633. }
  634. elseif($KN2!=0&EE:mass()!=1.7){
  635. hint(F:name()+" Killed! "+(($KN2+KN2)-KN-1):toString():replace("-","")+" more kill(s) to go!",5)
  636. }
  637. }
  638. elseif (Move==4) {
  639. Mul=50
  640. KA1=C:keyAttack1()
  641. KA2=C:keyAttack2()
  642. KAE=C:keyUse()
  643. if(F:type()=="player"){
  644. if(F:isAlive()){
  645. TarPos=F:pos()+vec(0,0,F:height()/2)
  646. }else{
  647. hint(F:name()+" was killed.",5)
  648. F=C
  649. Move=2
  650. }
  651. }elseif(F:type()!="player"){
  652. if(F:pos()!=vec(0,0,0)){
  653. TarPos=F:massCenter()+F:boxCenter()
  654. }else{
  655. hint(OwnerName+"'s prop was destroyed.",5)
  656. F=C
  657. Move=2
  658. }
  659. }
  660. if(C:weapon():model()=="models/weapons/v_crowbar.mdl"){
  661. if(C:keyAttack1()&C:aimEntity()!=noentity()&C:aimEntity()!=F&C:aimEntity()!=EE){
  662. if(C:aimEntity():type()!="player"){
  663. hint("Attacking "+C:aimEntity():owner():name()+"'s prop",5)
  664. }else{
  665. hint("Attacking "+C:aimEntity():name()+"",5)
  666. }
  667. F=C:aimEntity()
  668. }
  669. elseif(C:keyAttack2()){
  670. Move=2
  671. F=C
  672. hint("Following Mouse",5)
  673. }
  674. elseif(C:keyUse()){
  675. Move=1
  676. F=C
  677. hint("Following Owner( "+C:name()+" )",5)
  678. }
  679. }
  680.  
  681. }
  682. elseif (Move==5) {
  683. Mul=50
  684. if (F:isAlive()) {
  685. TarPos=F:pos()+vec(0,0,F:height()/2)
  686. }
  687. }
  688. elseif (Move==6) {
  689. Mul=50
  690. if(KMAE1:isAlive()&KMAE1:inNoclip()==0){
  691. TarPos = KMAE1:pos()+vec(0,0,KMAE1:height()/2)
  692. }else{
  693. if(KMAC != KMA:count()){
  694. if(KMAE1:isAlive()==0|KMAE1:inNoclip()){
  695. if(findCanQuery()){
  696. KMAC++
  697. if(KMA[KMAC,string]:toNumber()==0){
  698. KMAE1 = findPlayerByName(KMA[KMAC,string])
  699. }else{
  700. KMAE1=PList[KMAC,entity]
  701. }
  702. hint("Next Target "+KMAE1:name(),5)
  703. }
  704. }
  705. }else{
  706. hint("Kill many over",5)
  707. Move = 1
  708. F=C
  709. }
  710. }
  711. }
  712. elseif (Move==7) {
  713. Mul=50
  714. if(KMAE1:isAlive()&KMAE1:inNoclip()==0){
  715. TarPos = KMAE1:pos()+vec(0,0,KMAE1:height()/2)
  716. }else{
  717. if(KMAC != KMA:count()){
  718. if(KMAE1:isAlive()==0|KMAE1:inNoclip()|KMAE1:inVehicle()){
  719. KMAC++
  720. KMAE1=KMA[KMAC,entity]
  721. hint("Next Target "+KMAE1:name(),5)
  722. }
  723. }else{
  724. hint("Kill many over",5)
  725. Move = 1
  726. F=C
  727. }
  728. }
  729. }
  730. elseif(Move==8){
  731. Mul=75
  732. if(BMod!=""&BModN!=1&KMAE1:pos()==vec(0,0,0)&KMAE1:health()==0){
  733. hint(BMod:explode(" ")[1,string]+"'s prop ''"+BMod:explode("/")[BMod:explode("/"):count(),string]:replace(".mdl","")+"'' destroyed.",5)
  734. BMod=""
  735. BModN=1
  736. findSortByDistance(EE:pos())
  737. KMA=findToArray()
  738. KMAC=0
  739. New=1
  740. }
  741. if(KMAE1:health()==0){
  742. KMAC++
  743. KMAE1=KMA[KMAC,entity]
  744. New=1
  745. }
  746. if(KMAE1:health()>0){
  747. BModN=0
  748. BMod=KMAE1:owner():name()+" "+KMAE1:model()
  749. TarPos=KMAE1:massCenter()
  750. if(New==1){
  751. hint("Targeting "+KMAE1:owner():name()+"'s prop ''"+KMAE1:model():explode("/")[KMAE1:model():explode("/"):count(),string]:replace(".mdl","")+"''"+" Health: ''"+KMAE1:health():toString()+"''",5)
  752. New=0
  753. }
  754. }
  755. if(KMAC>=KMA:count()+1){
  756. if(findCanQuery()){
  757. #findClearBlackList()
  758. #findClearWhiteList()
  759. #findClearWhiteEntityList()
  760. #findClearBlackEntityList()
  761. findByClass("prop_physics")
  762. findSortByDistance(EE:pos())
  763. KMA=findToArray()
  764. KMAC=0
  765. KMAE1=KMA[KMAC,entity]
  766. }
  767. }
  768. }
  769. elseif(Move==-1){
  770. if(findCanQuery()){
  771. findClearBlackList()
  772. findClearWhiteList()
  773. findClearWhiteEntityList()
  774. findClearBlackEntityList()
  775. findIncludePlayerProps(owner())
  776. findByModel("models/props_junk/sawblade001a.mdl")
  777. findSortByDistance(C:pos())
  778. if(findResult(1)!=noentity()){EE=findResult(1)}
  779. }
  780. if(EE:model()!=""){
  781. findClearBlackList()
  782. findClearWhiteList()
  783. findClearWhiteEntityList()
  784. findClearBlackEntityList()
  785. hint("Found a saw!",5)
  786. CIR=randint(1,ColorsV:count())
  787. if(Colors[CIR,string]=="invisible"){
  788. CIR=12
  789. }
  790. EE:setColor(ColorsV[CIR,vector4])
  791. hint("Setting Color to: "+Colors[CIR,string]:sub(1,1):upper()+Colors[CIR,string]:sub(2,Colors[CIR,string]:length()),5)
  792. EE:setMaterial("models/debug/debugwhite")
  793. EE:setMass(50000)
  794. holoCreate(0, EE:massCenter())
  795. holoParent(0, EE)
  796. holoModel(0, "icosphere3")
  797. holoMaterial(0, "models/props_combine/tpballglow")
  798. holoColor(0, EE:getColor())
  799. holoAng(0, ang(0, 0, 0))
  800. holoCreate(1, EE:massCenter())
  801. holoParent(1, EE)
  802. holoScale(1, vec(3.2, 3.2, 0.8))
  803. holoModel(1, "icosphere3")
  804. holoMaterial(1, "models/props_combine/tpballglow")
  805. holoColor(1, EE:getColor())
  806. holoAng(1, ang(0, 0, 0))
  807. EE:setTrails(16, 0, 5, "trails/laser", EE:getColor(), 255)
  808. TarPos=EE:pos()+(vec(0,0,20))
  809. Move=0
  810. }
  811. }
  812.  
  813. #Klunker fixing
  814. if(Move>-1&EE!=noentity()&EE:model()==""){
  815. hint("The fairy disappeared.",5)
  816. Move=-1
  817. }
  818. elseif(Move>-1&EE!=noentity()&EE:model()!=""){
  819. if(EE:isFrozen()){
  820. if(Frozen==0){
  821. hint("The fairy is frozen.",5)
  822. Frozen=1
  823. }
  824. }
  825. elseif(!EE:isFrozen()){
  826. Frozen=0
  827. }
  828. if(lastSaid()=="stopfairy"){
  829. selfDestructAll()
  830. }
  831. }
  832. elseif(Move!=3&EE:mass()==1.7){
  833. EE:setMass(50000)
  834. }
  835. elseif(F==noentity()&Move!=6){
  836. F = C
  837. Move = 1
  838. hint("Invalid Entity.",5)
  839. }
  840. #Applyforce and the like
  841. EE:applyForce(((TarPos - EE:pos()) * Mul - EE:vel()) * EE:mass())
  842. EE:applyAngForce(((-EE:angles()*5):setYaw(RA*3)-EE:angVel())*40*shiftL(ang(EE:inertia())))
  843. holoAng(0, ang(0,0,0))
  844. holoAng(1, ang(0,0,0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement